jstests/replsets/dbcheck.js
// the batches in the health log.
the batches in the health log.
the batches in the health log .
function healthLogCounts(healthlog) {
    const debugBuild = healthlog.getDB().getSiblingDB('admin').adminCommand('buildInfo').debug;
    if (!debugBuild) {
        return;
    }
    let result = healthlog.aggregate([
        {$match: {"operation": "dbCheckBatch"}},
        {
            $group: {
                "_id": null,
                "totalDocs": {$sum: "$data.count"},
                "totalBytes": {$sum: "$data.bytes"}
            }
        }
    ]);
    assert(result.hasNext(), "dbCheck put no batches in health log");
    return result.next();
}
function healthLogCounts ( healthlog ) { const debugBuild = healthlog . getDB ( ) . getSiblingDB ( 'admin' ) . adminCommand ( 'buildInfo' ) . debug ; if ( ! debugBuild ) { return ; } let result = healthlog . aggregate ( [ { $match : { "operation" : "dbCheckBatch" } } , { $group : { "_id" : null , "totalDocs" : { $sum : "$data.count" } , "totalBytes" : { $sum : "$data.bytes" } } } ] ) ; assert ( result . hasNext ( ) , "dbCheck put no batches in health log" ) ; return result . next ( ) ; }
the batches in the health log.
the batches in the health log .
// These tests only run on debug builds because they rely on dbCheck health-logging // all info-level batch results.