benchmark/ycsb/insert.js
/**
 * Generates small bank workload with specified number of accounts
 * and operations.
 * @returns {Object} array of json objects and each denotes
 * one operations
 **/
Generates small bank workload with specified number of accounts
and operations.
@returns {Object} array of json objects and each denotes
one operations
Generates small bank workload with specified number of accounts and operations . @returns { Object } array of json objects and each denotes one operations
function generateWorkload() {
    let workload = [];
    for(let i= 0; i < txnPerBatch && firedTxnCount < recordCount; i++, firedTxnCount++) {
        let key = buildKey(recordStartIdx + firedTxnCount);
        let val = buildValue();
        let acc = {
            'key': key,
            'val': val,
            'transaction_type': 'insert'
        };
        workload.push(acc);
    }
    return workload;
}
function generateWorkload ( ) { let workload = [ ] ; for ( let i = 0 ; i < txnPerBatch && firedTxnCount < recordCount ; i ++ , firedTxnCount ++ ) { let key = buildKey ( recordStartIdx + firedTxnCount ) ; let val = buildValue ( ) ; let acc = { 'key' : key , 'val' : val , 'transaction_type' : 'insert' } ; workload . push ( acc ) ; } return workload ; }
Generates small bank workload with specified number of accounts
 and operations.
Generates small bank workload with specified number of accounts and operations .
// console.log("Inserted Key: " + key);