mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-06 18:35:19 +00:00
cpp: remove unused variable g_socket_syscalls
This commit is contained in:
parent
eda0f844ee
commit
6f7399b355
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user