• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3const common = require('../common.js');
4const { randomBytes } = require('crypto');
5
6const bench = common.createBenchmark(main, {
7  size: [64, 1024, 8192, 512 * 1024],
8  n: [1e3],
9});
10
11function main({ n, size }) {
12  bench.start();
13  for (let i = 0; i < n; ++i)
14    randomBytes(size);
15  bench.end(n);
16}
17