jstests/core/timeseries/libs/timeseries.js
/**
     * Adjusts the values in 'fields' by a random amount.
     * Ensures that the new values stay in the range [0, 100].
     */
Adjusts the values in 'fields' by a random amount.
Ensures that the new values stay in the range [0, 100].
Adjusts the values in ' fields ' by a random amount . Ensures that the new values stay in the range [ 0 100 ] .
static updateUsages(fields) {
        for (const field in fields) {
            fields[field] += Math.round(Random.genNormal(0, 1));
            fields[field] = Math.max(fields[field], 0);
            fields[field] = Math.min(fields[field], 100);
        }
    }
static updateUsages ( fields ) { for ( const field in fields ) { fields [ field ] += Math . round ( Random . genNormal ( 0 , 1 ) ) ; fields [ field ] = Math . max ( fields [ field ] , 0 ) ; fields [ field ] = Math . min ( fields [ field ] , 100 ) ; } }
Adjusts the values in 'fields' by a random amount.
Adjusts the values in ' fields ' by a random amount .