Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
benchmark: add benchmark script for resourceUsage
Added a benchmark script for process method to benchmark the method
resourceUsage.
  • Loading branch information
yashLadha committed Aug 9, 2020
commit 90b305aace228fa572de04f4b2f22d9b127caf07
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);
}