[SERVER-21015] benchRun() findOne option "check" does not work Created: 19/Oct/15  Updated: 06/Dec/22  Resolved: 15/Nov/18

Status: Closed
Project: Core Server
Component/s: Performance, Shell
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: J Rassi Assignee: Backlog - Performance Team
Resolution: Won't Fix Votes: 0
Labels: close, mtig
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Product Performance
Operating System: ALL
Participants:

 Description   

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
}



 Comments   
Comment by Ian Whalen (Inactive) [ 18/Feb/16 ]

CC martin.bligh in case he wants to pull this onto the integration backlog.

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