benchmark/smallbank/load.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; i++) {
        let acc_id = generateAccount();
        account_array.push(acc_id);
        let acc = {
            'customer_id': acc_id,
            'customer_name': random_string(),
            'initial_checking_balance': initial_balance,
            'initial_savings_balance': initial_balance,
            'transaction_type': 'create_account'
        };
        workload.push(acc);
    }
    return workload;
}
function generateWorkload ( ) { let workload = [ ] ; for ( let i = 0 ; i < txnPerBatch ; i ++ ) { let acc_id = generateAccount ( ) ; account_array . push ( acc_id ) ; let acc = { 'customer_id' : acc_id , 'customer_name' : random_string ( ) , 'initial_checking_balance' : initial_balance , 'initial_savings_balance' : initial_balance , 'transaction_type' : 'create_account' } ; 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 .