THRIFT-928. cpp: Thrift Server Client Stats
authorDavid Reiss <dreiss@apache.org>
Wed, 6 Oct 2010 17:10:08 +0000 (17:10 +0000)
committerDavid Reiss <dreiss@apache.org>
Wed, 6 Oct 2010 17:10:08 +0000 (17:10 +0000)
commit23248713345e36d8ed66704a9a58a5f39a48d942
treee6aa7c9d97776a88be24ba1de8ca6cabcbacec05
parentb7762a032aa4190c6b99a5394e69b29aceb57281
THRIFT-928. cpp: Thrift Server Client Stats

Add the ability for Thrift servers to monitor client connections.  It is
activated by #including server/TClientInfo.h and creating 1) a
TClientInfoCallHandler passed to the processor with setEventHandler()
and 2) a TClientInforServerHandler passed to the server with
setServerEventHandler().

The result vector, showing active connections, provides client address
and the thrift call it is executing (or last executed), the time
connected, and the number of calls made since connection.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005139 13f79535-47bb-0310-9956-ffa450edef68
17 files changed:
compiler/cpp/src/generate/t_cpp_generator.cc
contrib/fb303/TClientInfo.cpp [new file with mode: 0644]
contrib/fb303/TClientInfo.h [new file with mode: 0644]
lib/cpp/src/TProcessor.h
lib/cpp/src/processor/PeekProcessor.cpp
lib/cpp/src/processor/PeekProcessor.h
lib/cpp/src/processor/StatsProcessor.h
lib/cpp/src/server/TNonblockingServer.cpp
lib/cpp/src/server/TServer.h
lib/cpp/src/server/TSimpleServer.cpp
lib/cpp/src/server/TThreadPoolServer.cpp
lib/cpp/src/server/TThreadedServer.cpp
lib/cpp/src/transport/TFileTransport.cpp
lib/cpp/src/transport/TServerSocket.cpp
lib/cpp/src/transport/TSocket.cpp
lib/cpp/src/transport/TSocket.h
test/cpp/src/TestServer.cpp