diff options
author | Jonathan Reams <jbreams@mongodb.com> | 2016-08-09 15:45:03 -0400 |
---|---|---|
committer | Jonathan Reams <jbreams@mongodb.com> | 2016-08-10 16:12:33 -0400 |
commit | 08b8ccece70c72a88162604734f895f0d8e35d10 (patch) | |
tree | ca9b24eb2b7f9ae86808bc45b33674d20f35b30e /src/mongo/db/stats/counters.h | |
parent | 4af765175d02f20d3a2cdbbc8c04769d2bf443f7 (diff) | |
download | mongo-08b8ccece70c72a88162604734f895f0d8e35d10.tar.gz |
SERVER-25466 Add MessageCompressor stats to server status
Diffstat (limited to 'src/mongo/db/stats/counters.h')
-rw-r--r-- | src/mongo/db/stats/counters.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/mongo/db/stats/counters.h b/src/mongo/db/stats/counters.h index fe86aa16d67..435542beb37 100644 --- a/src/mongo/db/stats/counters.h +++ b/src/mongo/db/stats/counters.h @@ -95,14 +95,20 @@ extern OpCounters replOpCounters; class NetworkCounter { public: - NetworkCounter() : _bytesIn(0), _bytesOut(0), _requests(0) {} - void hit(long long bytesIn, long long bytesOut); + // Increment the counters for the number of bytes read directly off the wire + void hitPhysical(long long bytesIn, long long bytesOut); + // Increment the counters for the number of bytes passed out of the TransportLayer to the + // server + void hitLogical(long long bytesIn, long long bytesOut); void append(BSONObjBuilder& b); private: - AtomicInt64 _bytesIn; - AtomicInt64 _bytesOut; - AtomicInt64 _requests; + AtomicInt64 _physicalBytesIn{0}; + AtomicInt64 _physicalBytesOut{0}; + AtomicInt64 _logicalBytesIn{0}; + AtomicInt64 _logicalBytesOut{0}; + + AtomicInt64 _requests{0}; }; extern NetworkCounter networkCounter; |