diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp index 270137f..90dfc42 100644 --- a/src/mongo/db/commands/mr.cpp +++ b/src/mongo/db/commands/mr.cpp @@ -1135,11 +1135,11 @@ namespace mongo { if ( state.numEmits() ) shouldHaveData = true; - timingBuilder.append( "mapTime" , mapTime / 1000 ); + timingBuilder.append( "mapTime" , (int)(mapTime / 1000) ); timingBuilder.append( "emitLoop" , t.millis() ); op->setMessage( "m/r: (2/3) final reduce in memory" ); - Timer t; + Timer rt; // do reduce in memory // this will be the last reduce needed for inline mode state.reduceInMemory(); @@ -1147,16 +1147,17 @@ namespace mongo { state.dumpToInc(); // final reduce state.finalReduce( op , pm ); - inReduce += t.micros(); + inReduce += rt.micros(); countsBuilder.appendNumber( "reduce" , state.numReduces() ); - timingBuilder.append( "reduceTime" , inReduce / 1000 ); + timingBuilder.append( "reduceTime" , (int)(inReduce / 1000) ); timingBuilder.append( "mode" , state.jsMode() ? "js" : "mixed" ); long long finalCount = state.postProcessCollection(op, pm); state.appendResults( result ); - timingBuilder.append( "total" , t.millis() ); - result.append( "timeMillis" , t.millis() ); + int timeMillis = t.millis(); + timingBuilder.append( "total" , timeMillis ); + result.append( "timeMillis" , timeMillis ); countsBuilder.appendNumber( "output" , finalCount ); if ( config.verbose ) result.append( "timing" , timingBuilder.obj() ); result.append( "counts" , countsBuilder.obj() );