jstests/aggregation/explain_per_stage_exec_stats.js
// Checks if a particular stage has expected statistics.
Checks if a particular stage has expected statistics.
Checks if a particular stage has expected statistics .
function assertStageExecutionStatsPresent(stage) {
    if (stage.hasOwnProperty("$sort")) {
        assert(stage.hasOwnProperty("totalDataSizeSortedBytesEstimate"), stage);
        assert(stage.hasOwnProperty("usedDisk"), stage);
    } else if (stage.hasOwnProperty("$group")) {
        assert(stage.hasOwnProperty("totalOutputDataSizeBytes"), stage);
        assert(stage.hasOwnProperty("usedDisk"), stage);
    }
}
function assertStageExecutionStatsPresent ( stage ) { if ( stage . hasOwnProperty ( "$sort" ) ) { assert ( stage . hasOwnProperty ( "totalDataSizeSortedBytesEstimate" ) , stage ) ; assert ( stage . hasOwnProperty ( "usedDisk" ) , stage ) ; } else if ( stage . hasOwnProperty ( "$group" ) ) { assert ( stage . hasOwnProperty ( "totalOutputDataSizeBytes" ) , stage ) ; assert ( stage . hasOwnProperty ( "usedDisk" ) , stage ) ; } }
Checks if a particular stage has expected statistics.
Checks if a particular stage has expected statistics .