Skip to content

Commit

Permalink
benchmark: add benchmark script for resourceUsage
Browse files Browse the repository at this point in the history
Added a benchmark script for process method to benchmark the method
resourceUsage.
  • Loading branch information
yashLadha committed Aug 9, 2020
1 parent 8825eb4 commit 90b305a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions benchmark/process/resourceUsage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

const common = require('../common.js');
const bench = common.createBenchmark(main, {
n: [1e5]
});

function main({ n }) {
bench.start();
for (let i = 0; i < n; i++) {
process.resourceUsage();
}
bench.end(n);
}

0 comments on commit 90b305a

Please sign in to comment.