Socket
Socket
Sign inDemoInstall

benchmark-suite

Package Overview
Dependencies
5
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    benchmark-suite

A simple suite of benchmarking tests


Version published
Weekly downloads
384
decreased by-25.29%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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 });

Keywords

FAQs

Last updated on 20 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc