1
This commit is contained in:
parent
c99c33e2e9
commit
5e891d67a7
@ -12,6 +12,7 @@
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
#include <a8/a8.h>
|
||||
#include <a8/perfmonitor.h>
|
||||
#include <a8/tcpclient.h>
|
||||
|
||||
const int MAX_RECV_BUFFERSIZE = 1024 * 64;
|
||||
@ -80,6 +81,9 @@ namespace a8
|
||||
}
|
||||
send_buffer_mutex_->unlock();
|
||||
NotifySendCond();
|
||||
#ifdef MMCHK
|
||||
a8::PerfMonitor::Instance()->AddV("a8.TcpClient.count", 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -228,6 +232,9 @@ namespace a8
|
||||
worknode = worknode->next;
|
||||
free(currnode->buff);
|
||||
free(currnode);
|
||||
#ifdef MMCHK
|
||||
a8::PerfMonitor::Instance()->SubV("a8.TcpClient.count", 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
@ -241,6 +248,9 @@ namespace a8
|
||||
worknode = worknode->next;
|
||||
free(currnode->buff);
|
||||
free(currnode);
|
||||
#ifdef MMCHK
|
||||
a8::PerfMonitor::Instance()->SubV("a8.TcpClient.count", 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,10 +24,16 @@ namespace a8
|
||||
{
|
||||
INIT_LIST_HEAD(&session_entry);
|
||||
max_packet_len_ = DEFAULT_MAX_PACKET_LEN;
|
||||
#ifdef MMCHK
|
||||
a8::PerfMonitor::Instance()->AddV("a8.TcpSession.count", 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
TcpSession::~TcpSession()
|
||||
{
|
||||
#ifdef MMCHK
|
||||
a8::PerfMonitor::Instance()->SubV("a8.TcpSession.count", 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
void TcpSession::SetMaxPacketLen(int max_packet_len)
|
||||
@ -86,6 +92,9 @@ namespace a8
|
||||
}
|
||||
send_buffer_mutex_.unlock();
|
||||
++master->send_node_num;
|
||||
#ifdef MMCHK
|
||||
a8::PerfMonitor::Instance()->AddV("a8.TcpSession.sendBuf", 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -266,6 +275,9 @@ namespace a8
|
||||
}
|
||||
free(pdelnode);
|
||||
--master->send_node_num;
|
||||
#ifdef MMCHK
|
||||
a8::PerfMonitor::Instance()->SubV("a8.TcpSession.sendBuf", 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -279,6 +291,9 @@ namespace a8
|
||||
}
|
||||
free(pdelnode);
|
||||
--master->send_node_num;
|
||||
#ifdef MMCHK
|
||||
a8::PerfMonitor::Instance()->SubV("a8.TcpSession.sendBuf", 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -303,6 +318,9 @@ namespace a8
|
||||
a8::SendQueueNode *pdelnode = work_node_;
|
||||
work_node_ = work_node_->next;
|
||||
--master->send_node_num;
|
||||
#ifdef MMCHK
|
||||
a8::PerfMonitor::Instance()->SubV("a8.TcpSession.sendBuf", 1);
|
||||
#endif
|
||||
++master->sent_node_num;
|
||||
master->sent_bytes_num += pdelnode->sent_bytes;
|
||||
if (!work_node_) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user