From 82674f15106984028627c9ecba18f84b55cd6dea Mon Sep 17 00:00:00 2001 From: Dan Pasette Date: Wed, 22 May 2013 22:38:52 -0400 Subject: SERVER-9005 - Only record wtime metrics when w>1 --- src/mongo/db/stats/timer_stats.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mongo/db/stats/timer_stats.cpp') 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 ) { -- cgit v1.2.1