Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bestest/execution

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bestest/execution

Execution-related helper functions, required for Bestest benchmarking.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@bestest/execution

Helpers to measure function execution time. Required for Bestest benchmarking tool.

Example

const { measureFunctionExecution } = require('@bestest/execution')

const testCase = () => Math.random()
const testOptions = {
  maxExecutionsPerSample: Infinity,
  includeDetails: false
}

measureFunctionExecution(testCase, testOptions, measurement => {
  console.log(measurement)

  // Remember, that presented time is in picoseconds (10^-12 s)
  //
  // {
  //   timePrecision: 23.12480712166172,
  //   executionsPerSample: 2696,
  //   concurrentExecutions: 1,
  //   startTime: 132188876478633000,
  //   endTime: 132189876488453000,
  //   took: 1000009820000,
  //   executions: { total: 134516921, successful: 134516921, failed: 0 },
  //   timeEntries: undefined
  // }
})

Changelog

  • 1.0.0 (on 2019-08-07): initial version

Keywords

FAQs

Package last updated on 07 Aug 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc