code: function initializeDB() {
    db = new loki('perftest');
  
    var start, end, totalTime;
    var totalTimes = [];
    var totalMS = 0.0;
  
    samplecoll = db.addCollection('samplecoll');
    /*
      {
        asyncListeners: true,
        disableChangesApi: true,
        transactional: false,
        clone: false 
      }
    ); 
    */
  
    for (var idx = 0; idx < arraySize; idx++) {
      var v1 = genRandomVal();
      var v2 = genRandomVal();
  
      start = process.hrtime();
      samplecoll.insert({
        customId: idx,
        val: v1,
        val2: v2,
        val3: "more data 1234567890"
      });
      end = process.hrtime(start);
      totalTimes.push(end);
    }
  
    for (var idx = 0; idx < totalTimes.length; idx++) {
      totalMS += totalTimes[idx][0] * 1e3 + totalTimes[idx][1] / 1e6;
    }
  
  
    //var totalMS = end[0] * 1e3 + end[1]/1e6;
    totalMS = totalMS.toFixed(2);
    var rate = arraySize * 1000 / totalMS;
    rate = rate.toFixed(2);
    console.log("load (insert) : " + totalMS + "ms (" + rate + ") ops/s");
  }
docs: in addition to the loki id we will create a key of our own (customId) which is number from 1- totalIterations we will later perform find() queries against customId with and without an index