console.log("===== RESULT (insert) ===== "+opsPerSecond+" ops/s");
profiler.step('Finished inserting '+n+' docs');
profiler.insertOpsPerSecond=opsPerSecond;
returncb();
}
@ -251,10 +253,11 @@ module.exports.removeDocs = function (options, d, n, profiler, cb) {
functionrunFrom(i){
if(i===n){// Finished
console.log("===== RESULT (1 remove + 1 insert) ===== "+Math.floor(1000*n/profiler.elapsedSinceLastStep())+" ops/s");
console.log("====== IMPORTANT: Please note that this is the time that was needed to perform "+n+" removes and "+n+" inserts");
console.log("====== The extra inserts are needed to keep collection size at "+n+" items for the benchmark to make sense");
console.log("====== Use the insert speed logged above to calculate the actual remove speed, which is higher (should be significantly so if you use indexing)");
// opsPerSecond corresponds to 1 insert + 1 remove, needed to keep collection size at 10,000
// We need to subtract the time taken by one insert to get the time actually taken by one remove