@jonahsnider/benchmark
Version:
A Node.js benchmarking library with support for multithreading and TurboFan optimization isolation.
16 lines • 670 B
JavaScript
export async function compatibleImport(path) {
const mod = (await import(path));
return mod.default;
}
export const SKIP_SUITE = { run: { trials: 0 }, warmup: { trials: 0 } };
export const SHORT_SUITE = { run: { trials: 1e3 }, warmup: { trials: 1e3 } };
export const SHORT_TIMED_SUITE = { run: { durationMs: 100 }, warmup: { durationMs: 100 } };
/** @see https://github.com/nodejs/node/blob/cf56abe6bba2ccc7b3553f4255ab1fd683e06f8f/lib/internal/errors.js#L823-L829 */
export class AbortError extends Error {
code = 'ABORT_ERR';
name = 'AbortError';
constructor() {
super('The operation was aborted');
}
}
//# sourceMappingURL=utils.js.map