mirror of https://github.com/lukechilds/node.git
Browse Source
Set process.env array entries in JS. PR-URL: https://github.com/nodejs/node/pull/3780 Reviewed-By: Fedor Indutny <fedor@indutny.com>v5.x
Trevor Norris
9 years ago
committed by
Jeremiah Senkpiel
2 changed files with 48 additions and 13 deletions
@ -0,0 +1,18 @@ |
|||
'use strict'; |
|||
|
|||
const common = require('../common'); |
|||
|
|||
const bench = common.createBenchmark(main, { |
|||
n: [1e5], |
|||
}); |
|||
|
|||
|
|||
function main(conf) { |
|||
const n = conf.n >>> 0; |
|||
bench.start(); |
|||
for (var i = 0; i < n; i++) { |
|||
// Access every item in object to process values.
|
|||
Object.keys(process.env); |
|||
} |
|||
bench.end(n); |
|||
} |
Loading…
Reference in new issue