Package Exports
- @bestest/execution
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bestest/execution) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@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