We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent deb9622 commit bed4612Copy full SHA for bed4612
1 file changed
benchmark/v8/get-stats.js
@@ -0,0 +1,23 @@
1
+'use strict';
2
+
3
+const common = require('../common.js');
4
+const v8 = require('v8');
5
6
+const bench = common.createBenchmark(main, {
7
+ method: [
8
+ 'getHeapStatistics',
9
+ 'getHeapSpaceStatistics'
10
+ ],
11
+ n: [1e6],
12
+ flags: ['--ignition --turbo', '']
13
+});
14
15
+function main(conf) {
16
+ const n = +conf.n;
17
+ const method = conf.method;
18
+ var i = 0;
19
+ bench.start();
20
+ for (; i < n; i++)
21
+ v8[method]();
22
+ bench.end(n);
23
+}
0 commit comments