Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
mongodb-3.0
-
None
-
None
Description
Not sure the difference between the Documentation and Technical Writing project so I will start here. Please move the ticket if this is not the right project for it.
In reviewing the server code recently, it is realized that the option "totals" is not implemented properly for the benchRun command documented on this page: https://docs.mongodb.org/v3.2/contributors/reference/js-benchmarking-harness/
Because that option is not implemented properly, we should remove reference to that option in the examples showed on the page above. I found two instances of this option used on the page in the example in the Dynamic Value section. The proper way to do this would be remove the line that contains "totals: true" and also the comma at the end of the previous lines.
// benchmark updates using the $inc operator
|
res = benchRun( {
|
ops : [ {
|
ns : "test.foo" , |
op : "update" , |
query : { _id : { "#RAND_INT" : [ 0 , 100 ] } } , |
update : { $inc : { x : 1 } }
|
} ] ,
|
parallel : 2 ,
|
seconds : 1 ,
|
totals : true |
} );
|
print( "threads: 2\t update/sec: " + res.update ); |
// benchmark inserts with random strings
|
res = benchRun( {
|
ops : [ {
|
ns : "test.foo" , |
op : "insert" , |
doc : { y : { "#RAND_STRING" : [ 10 ] } } |
} ] ,
|
parallel : 2 ,
|
seconds : 1 ,
|
totals : true |
} );
|
print( "threads: 2\t insert/sec: " + res.insert ); |