summaryrefslogtreecommitdiff
path: root/benchmark/os
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/os')
-rw-r--r--benchmark/os/networkInterfaces.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/benchmark/os/networkInterfaces.js b/benchmark/os/networkInterfaces.js
new file mode 100644
index 0000000000..3fa6073ae5
--- /dev/null
+++ b/benchmark/os/networkInterfaces.js
@@ -0,0 +1,15 @@
+'use strict';
+
+const common = require('../common.js');
+const networkInterfaces = require('os').networkInterfaces;
+
+const bench = common.createBenchmark(main, {
+ n: [1e4]
+});
+
+function main({ n }) {
+ bench.start();
+ for (var i = 0; i < n; ++i)
+ networkInterfaces();
+ bench.end(n);
+}