track network in/out SERVER-2081

This commit is contained in:
Eliot Horowitz
2010-11-09 00:14:52 -05:00
parent dd56085dbe
commit 0c7e7101a6
8 changed files with 54 additions and 12 deletions

View File

@@ -23,6 +23,7 @@
#include "message_server.h"
#include "../db/cmdline.h"
#include "../db/stats/counters.h"
namespace mongo {
@@ -46,6 +47,7 @@ namespace mongo {
while ( 1 ){
m.reset();
p->clearCounters();
if ( ! p->recv(m) ) {
if( !cmdLine.quiet )
@@ -55,6 +57,7 @@ namespace mongo {
}
handler->process( m , p.get() );
networkCounter.hit( p->getBytesIn() , p->getBytesOut() );
}
}
catch ( const SocketException& ){