benchmark-suite
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

performance-suite

Performance suite

  var suite = new BenchmarkSuite('Suite Name', 'Memory' /* or 'Operations' */);
  suite.add(`Test 1`, function (fn) {
    for (var i = 0; i < 100; i++) {
      var array = new Array(100);
      array.reverse();
    }
    assert.ok(!!fn);
    fn();
  });

  suite.on('cycle', function (results) {
    assert.ok(results);
    cycles++;
  });
  suite.on('complete', function (results) {
    assert.ok(results);
    completes++;
  });

  await suite.run({ time: 1000 });

/benchmark-suite/

    Package Sidebar

    Install

    npm i benchmark-suite

    Weekly Downloads

    1,019

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    73.8 kB

    Total Files

    20

    Last publish

    Collaborators

    • kmalakoff