jstests/noPassthrough/latency_includes_lock_acquisition_time.js
/**
 * Configures the server to wait for 'millis' while acquiring locks in the CRUD path, then
 * invokes the no-arguments function 'func', then disables the aforementioned lock wait
 * behavior.
 */
Configures the server to wait for 'millis' while acquiring locks in the CRUD path, then
invokes the no-arguments function 'func', then disables the aforementioned lock wait
behavior.
Configures the server to wait for ' millis ' while acquiring locks in the CRUD path then invokes the no - arguments function ' func ' then disables the aforementioned lock wait behavior .
function runWithWait(millis, func) {
    assert.commandWorked(testDB.adminCommand({
        configureFailPoint: "setAutoGetCollectionWait",
        mode: "alwaysOn",
        data: {waitForMillis: millis}
    }));
    func();
    assert.commandWorked(testDB.adminCommand({
        configureFailPoint: "setAutoGetCollectionWait",
        mode: "off",
    }));
}
function runWithWait ( millis , func ) { assert . commandWorked ( testDB . adminCommand ( { configureFailPoint : "setAutoGetCollectionWait" , mode : "alwaysOn" , data : { waitForMillis : millis } } ) ) ; func ( ) ; assert . commandWorked ( testDB . adminCommand ( { configureFailPoint : "setAutoGetCollectionWait" , mode : "off" , } ) ) ; }
Configures the server to wait for 'millis' while acquiring locks in the CRUD path, then
 invokes the no-arguments function 'func', then disables the aforementioned lock wait
 behavior.
Configures the server to wait for ' millis ' while acquiring locks in the CRUD path then invokes the no - arguments function ' func ' then disables the aforementioned lock wait behavior .