[SERVER-5608] MapReduce returns incorrect timeMillis and, when verbose, timing data Created: 15/Apr/12  Updated: 11/Jul/16  Resolved: 19/Apr/12

Status: Closed
Project: Core Server
Component/s: MapReduce
Affects Version/s: 2.1.0
Fix Version/s: 2.1.1

Type: Bug Priority: Trivial - P5
Reporter: Peter Grant Assignee: Eric Milkie
Resolution: Done Votes: 0
Labels: mapreduce, timing
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File mr_timing.patch    
Operating System: ALL
Participants:

 Description   

Running MapReduce with verbose=true:
...
"timeMillis" : 0,
"timing" : {
"mapTime" : NumberLong(11921),
"emitLoop" : 13524,
"reduceTime" : NumberLong(556),
"mode" : "js",
"total" : 0



 Comments   
Comment by auto [ 18/Apr/12 ]

Author:

{u'login': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-5608 fix m-r timing output

Patch submitted by Peter Grant, Github petercgrant.
A timer with the same one-letter name was occluding a previous Timer.
Branch: master
https://github.com/mongodb/mongo/commit/8c6c559e7d97321fdb14793d098016cd1b105fe5

Comment by Eric Milkie [ 18/Apr/12 ]

I modified the patch a little bit. You can just call appendNumber() and it will strip off the NumberLong text without downcasting the value of the number.

Comment by Eric Milkie [ 18/Apr/12 ]

contributor agreement signed

Comment by Eric Milkie [ 15/Apr/12 ]

Hi Peter. Thanks for the patch; I will work on incorporating it on Monday. In the meantime, can you please sign the contributor agreement here: http://www.10gen.com/contributor

Comment by Peter Grant [ 15/Apr/12 ]

Looks like there's a Timer t that's shadowing another Timer t. The timings are also two ints and two longs. Attaching a patch that will take care of both issues.

After the patch:
"timeMillis" : 14248,
"timing" : {
"mapTime" : 12616,
"emitLoop" : 14247,
"reduceTime" : 557,
"mode" : "js",
"total" : 14248

Generated at Thu Feb 08 03:09:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.