diff options
author | Dan Pasette <dan@10gen.com> | 2013-05-22 22:38:52 -0400 |
---|---|---|
committer | Dan Pasette <dan@10gen.com> | 2013-06-24 19:42:26 -0400 |
commit | 82674f15106984028627c9ecba18f84b55cd6dea (patch) | |
tree | 70b5d66c09dbe919f318d70548868c94e86679a0 /src/mongo/db/stats/timer_stats.cpp | |
parent | eb7ba8adc1ea407ebd88a8b829a6adbaf109e681 (diff) | |
download | mongo-82674f15106984028627c9ecba18f84b55cd6dea.tar.gz |
SERVER-9005 - Only record wtime metrics when w>1
Diffstat (limited to 'src/mongo/db/stats/timer_stats.cpp')
-rw-r--r-- | src/mongo/db/stats/timer_stats.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/stats/timer_stats.cpp b/src/mongo/db/stats/timer_stats.cpp index 970f5671872..f0543b22123 100644 --- a/src/mongo/db/stats/timer_stats.cpp +++ b/src/mongo/db/stats/timer_stats.cpp @@ -31,7 +31,10 @@ namespace mongo { int TimerHolder::recordMillis() { _recorded = true; - return _stats->record( _t ); + if ( _stats ) { + return _stats->record( _t ); + } + return _t.millis(); } void TimerStats::recordMillis( int millis ) { |