jstests/sharding/hedging_metrics_server_status.js
/*
 * Verifies that eventually the hedgingMetrics in the server status response is equal to
 * the expected hedgingMetrics.
 */
Verifies that eventually the hedgingMetrics in the server status response is equal to
the expected hedgingMetrics.
Verifies that eventually the hedgingMetrics in the server status response is equal to the expected hedgingMetrics .
function checkServerStatusHedgingMetrics(mongosConn, expectedHedgingMetrics) {
    assert.soon(
        () => {
            const serverStatus = assert.commandWorked(mongosConn.adminCommand({serverStatus: 1}));
            verifyServerStatusFields(serverStatus);
            return bsonWoCompare(serverStatus.hedgingMetrics, expectedHedgingMetrics) === 0;
        },
        `expect the hedgingMetrics to eventually be equal to ${tojson(expectedHedgingMetrics)}`,
        serverStatusCheckTimeoutMS);
}
function checkServerStatusHedgingMetrics ( mongosConn , expectedHedgingMetrics ) { assert . soon ( ( ) => { const serverStatus = assert . commandWorked ( mongosConn . adminCommand ( { serverStatus : 1 } ) ) ; verifyServerStatusFields ( serverStatus ) ; return bsonWoCompare ( serverStatus . hedgingMetrics , expectedHedgingMetrics ) === 0 ; } , ` ${ tojson ( expectedHedgingMetrics ) } ` , serverStatusCheckTimeoutMS ) ; }
Verifies that eventually the hedgingMetrics in the server status response is equal to
 the expected hedgingMetrics.
Verifies that eventually the hedgingMetrics in the server status response is equal to the expected hedgingMetrics .