summaryrefslogtreecommitdiff
path: root/benchmark/process/bench-env.js
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/process/bench-env.js')
-rw-r--r--benchmark/process/bench-env.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/benchmark/process/bench-env.js b/benchmark/process/bench-env.js
new file mode 100644
index 0000000000..66f966f587
--- /dev/null
+++ b/benchmark/process/bench-env.js
@@ -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);
+}