Repository: thrift
Updated Branches:
  refs/heads/master eda0f844e -> 6f7399b35


cpp: remove unused variable g_socket_syscalls


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/6f7399b3
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/6f7399b3
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/6f7399b3

Branch: refs/heads/master
Commit: 6f7399b355b77b3e6dc32ffa475d42493afe2d90
Parents: eda0f84
Author: Roger Meier <[email protected]>
Authored: Wed Mar 4 14:32:59 2015 +0100
Committer: Roger Meier <[email protected]>
Committed: Wed Mar 4 14:32:59 2015 +0100

----------------------------------------------------------------------
 lib/cpp/src/thrift/transport/TSocket.cpp | 5 -----
 test/cpp/src/TestClient.cpp              | 2 --
 2 files changed, 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/6f7399b3/lib/cpp/src/thrift/transport/TSocket.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/src/thrift/transport/TSocket.cpp 
b/lib/cpp/src/thrift/transport/TSocket.cpp
index ea85bfb..3295073 100644
--- a/lib/cpp/src/thrift/transport/TSocket.cpp
+++ b/lib/cpp/src/thrift/transport/TSocket.cpp
@@ -69,9 +69,6 @@ namespace transport {
 
 using namespace std;
 
-// Global var to track total socket sys calls
-uint32_t g_socket_syscalls = 0;
-
 /**
  * TSocket implementation.
  *
@@ -461,7 +458,6 @@ try_again:
   int got = static_cast<int>(recv(socket_, cast_sockopt(buf), len, 0));
   int errno_copy = THRIFT_GET_SOCKET_ERROR; // THRIFT_GETTIMEOFDAY can change
                                             // THRIFT_GET_SOCKET_ERROR
-  ++g_socket_syscalls;
 
   // Check for error on read
   if (got < 0) {
@@ -575,7 +571,6 @@ uint32_t TSocket::write_partial(const uint8_t* buf, 
uint32_t len) {
 #endif // ifdef MSG_NOSIGNAL
 
   int b = static_cast<int>(send(socket_, const_cast_sockopt(buf + sent), len - 
sent, flags));
-  ++g_socket_syscalls;
 
   if (b < 0) {
     if (THRIFT_GET_SOCKET_ERROR == THRIFT_EWOULDBLOCK || 
THRIFT_GET_SOCKET_ERROR == THRIFT_EAGAIN) {

http://git-wip-us.apache.org/repos/asf/thrift/blob/6f7399b3/test/cpp/src/TestClient.cpp
----------------------------------------------------------------------
diff --git a/test/cpp/src/TestClient.cpp b/test/cpp/src/TestClient.cpp
index c496bcb..2a89a28 100644
--- a/test/cpp/src/TestClient.cpp
+++ b/test/cpp/src/TestClient.cpp
@@ -51,7 +51,6 @@ using namespace apache::thrift::async;
 // Length of argv[0] - Length of script dir
 #define EXECUTABLE_FILE_NAME_LENGTH 19
 
-// extern uint32_t g_socket_syscalls;
 
 // Current time, microseconds since the epoch
 uint64_t now() {
@@ -718,7 +717,6 @@ int main(int argc, char** argv) {
     transport->close();
   }
 
-  //  printf("\nSocket syscalls: %u", g_socket_syscalls);
   printf("\nAll tests done.\n");
 
   uint64_t time_avg = time_tot / numTests;

Reply via email to