benchmark/ycsb/insert.js
/**
 * Generate unique account key for the transaction
 * @returns {Number} account key
 **/
Generate unique account key for the transaction
@returns {Number} account key
Generate unique account key for the transaction @returns { Number } account key
function buildKey(recordIdx) {
    let recordIdxStr = recordIdx.toString();
    let paddingLen = 16 - recordIdxStr.length;
    let key = "user";
    for (let i = 0;i < paddingLen; ++i) {
        key += "0";
    }
    key += recordIdxStr;
    if (orderedinserts) {
        return key;
    } else {
        return crypto.createHash('md5').update(key).digest('hex');
    }
}
function buildKey ( recordIdx ) { let recordIdxStr = recordIdx . toString ( ) ; let paddingLen = 16 - recordIdxStr . length ; let key = "user" ; for ( let i = 0 ; i < paddingLen ; ++ i ) { key += "0" ; } key += recordIdxStr ; if ( orderedinserts ) { return key ; } else { return crypto . createHash ( 'md5' ) . update ( key ) . digest ( 'hex' ) ; } }
Generate unique account key for the transaction
 @returns {Number} account key
Generate unique account key for the transaction @returns { Number } account key