Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-21015

benchRun() findOne option "check" does not work

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Performance, Shell
    • Product Performance
    • ALL

      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
      }
      

            Assignee:
            backlog-server-perf [DO NOT USE] Backlog - Performance Team
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: