@indutny/bencher 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -123,10 +123,10 @@ function warmUp(m) {
123
123
  let iterations = 1;
124
124
  let duration = 0;
125
125
  do {
126
- iterations *= 1.25;
126
+ iterations *= 2;
127
127
  duration = measure(m, Math.round(iterations));
128
128
  } while (duration < maxSampleDuration);
129
- iterations = Math.round(iterations / 1.25);
129
+ iterations = Math.max(iterations / 2, (maxSampleDuration / duration) * iterations);
130
130
  return iterations;
131
131
  }
132
132
  function measure(m, iterations) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indutny/bencher",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Simple benchmarking tool",
5
5
  "bin": {
6
6
  "bencher": "./dist/bin/bencher.js"