|
The "check" option to the findOne operation allows the caller to specify a Javascript predicate function which is called with the object returned by the query; each time the operation is run, benchRun() asserts that the predicate function returns true.
However, this option does not work; whenever it is used, an error is always thrown with message "no createDirectClient in clientOnly". See the following shell session:
> benchRun({ops:[{op: "findOne", query: {}, ns: "test.foo", check: function(obj) { return true; }}], seconds: 5})
|
connecting to: test
|
2015-10-19T14:54:11.176-0400 E - DBException not handled in benchRun thread :: caused by :: 10256 no createDirectClient in clientOnly
|
{
|
"note" : "values per second",
|
"errCount" : NumberLong(0),
|
"trapped" : "error: not implemented",
|
"findOneLatencyAverageMicros" : 255.1,
|
"totalOps" : NumberLong(10),
|
"totalOps/s" : 1.9999312023666385,
|
"findOne" : 1.9999312023666385,
|
"insert" : 0,
|
"delete" : 0,
|
"update" : 0,
|
"query" : 0,
|
"command" : 0
|
}
|
|