diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2015-06-02 15:06:22 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2015-06-05 14:21:57 -0400 |
commit | 54040db4fa000284cb1148b93e85f81c54ca12d6 (patch) | |
tree | 1e2affd65adaecfb35507ddf64aa507b8e606d85 /src/mongo/db/curop.cpp | |
parent | f4ca1b7eb3850719049d938b4b4562b6324ec284 (diff) | |
download | mongo-54040db4fa000284cb1148b93e85f81c54ca12d6.tar.gz |
SERVER-18277 Move server status metrics code out of curop.cpp into curop_metrics.cpp.
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index 2998492b145..cbb38a83ca3 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -32,7 +32,6 @@ #include "mongo/db/curop.h" -#include "mongo/base/counter.h" #include "mongo/base/disallow_copying.h" #include "mongo/bson/mutable/document.h" #include "mongo/db/client.h" @@ -373,57 +372,6 @@ namespace mongo { return _targetEpochMicros - now; } - - static Counter64 returnedCounter; - static Counter64 insertedCounter; - static Counter64 updatedCounter; - static Counter64 deletedCounter; - static Counter64 scannedCounter; - static Counter64 scannedObjectCounter; - - static ServerStatusMetricField<Counter64> displayReturned( "document.returned", &returnedCounter ); - static ServerStatusMetricField<Counter64> displayUpdated( "document.updated", &updatedCounter ); - static ServerStatusMetricField<Counter64> displayInserted( "document.inserted", &insertedCounter ); - static ServerStatusMetricField<Counter64> displayDeleted( "document.deleted", &deletedCounter ); - static ServerStatusMetricField<Counter64> displayScanned( "queryExecutor.scanned", &scannedCounter ); - static ServerStatusMetricField<Counter64> displayScannedObjects( "queryExecutor.scannedObjects", - &scannedObjectCounter ); - - static Counter64 idhackCounter; - static Counter64 scanAndOrderCounter; - static Counter64 fastmodCounter; - static Counter64 writeConflictsCounter; - - static ServerStatusMetricField<Counter64> displayIdhack( "operation.idhack", &idhackCounter ); - static ServerStatusMetricField<Counter64> displayScanAndOrder( "operation.scanAndOrder", &scanAndOrderCounter ); - static ServerStatusMetricField<Counter64> displayFastMod( "operation.fastmod", &fastmodCounter ); - static ServerStatusMetricField<Counter64> displayWriteConflicts( "operation.writeConflicts", - &writeConflictsCounter ); - - void OpDebug::recordStats() { - if ( nreturned > 0 ) - returnedCounter.increment( nreturned ); - if ( ninserted > 0 ) - insertedCounter.increment( ninserted ); - if ( nMatched > 0 ) - updatedCounter.increment( nMatched ); - if ( ndeleted > 0 ) - deletedCounter.increment( ndeleted ); - if ( nscanned > 0 ) - scannedCounter.increment( nscanned ); - if ( nscannedObjects > 0 ) - scannedObjectCounter.increment( nscannedObjects ); - - if ( idhack ) - idhackCounter.increment(); - if ( scanAndOrder ) - scanAndOrderCounter.increment(); - if ( fastmod ) - fastmodCounter.increment(); - if ( writeConflicts ) - writeConflictsCounter.increment( writeConflicts ); - } - void OpDebug::reset() { extra.reset(); |