1.1.1 • Published 3 years ago

@remusao/bench v1.1.1

Weekly downloads
1
License
MPL-2.0
Repository
github
Last release
3 years ago

@remusao/bench

Easily measure performance of a function against array of inputs.

import bench from '@remusao/bench';

function getLengthOfUrl(url: string): number {
  return url.length;
}

const opsPerSecond = bench(getLengthOfUrl, [
  '',
  'https://example.com',
  'http://foo.bar',
]);
1.1.1

3 years ago

1.1.0

4 years ago