jstests/libs/profiler.js
/**
 * Throws an assertion if the profiler does not contain any entries matching "filter". Optional
 * arguments "errorMsgFilter" and "errorMsgProj" limit profiler output if this asserts.
 */
Throws an assertion if the profiler does not contain any entries matching "filter". Optional
arguments "errorMsgFilter" and "errorMsgProj" limit profiler output if this asserts.
Throws an assertion if the profiler does not contain any entries matching " filter " . Optional arguments " errorMsgFilter " and " errorMsgProj " limit profiler output if this asserts .
function profilerHasAtLeastOneMatchingEntryOrThrow(
    {profileDB, filter, errorMsgFilter, errorMsgProj}) {
    assert.gte(profileDB.system.profile.find(filter).itcount(),
               1,
               "Expected at least 1 op matching: " + tojson(filter) + " in profiler " +
                   tojson(profileDB.system.profile.find(errorMsgFilter, errorMsgProj).toArray()));
}
function profilerHasAtLeastOneMatchingEntryOrThrow ( { profileDB , filter , errorMsgFilter , errorMsgProj } ) { assert . gte ( profileDB . system . profile . find ( filter ) . itcount ( ) , 1 , "Expected at least 1 op matching: " + tojson ( filter ) + " in profiler " + tojson ( profileDB . system . profile . find ( errorMsgFilter , errorMsgProj ) . toArray ( ) ) ) ; }
Throws an assertion if the profiler does not contain any entries matching "filter".
Throws an assertion if the profiler does not contain any entries matching " filter " .