@naturalcycles/bench-lib 4.0.3 → 4.1.0

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.
@@ -1,4 +1,4 @@
1
- import { _range } from '@naturalcycles/js-lib';
1
+ import { _arrayFilled } from '@naturalcycles/js-lib';
2
2
  import { asciiColor, asciiPlot } from './vendor/asciichart.js';
3
3
  const colors = [
4
4
  asciiColor.blue,
@@ -14,9 +14,9 @@ export function plotAsciiChart(results) {
14
14
  const resultsLen = Object.keys(results).length;
15
15
  Object.values(results).forEach((result, i) => {
16
16
  series.push([
17
- ..._range(5 + 5 * i).map(() => 0),
17
+ ..._arrayFilled(5 + 5 * i, 0),
18
18
  result,
19
- ..._range(3 + 5 * (resultsLen - i)).map(() => 0),
19
+ ..._arrayFilled(3 + 5 * (resultsLen - i), 0),
20
20
  ]);
21
21
  });
22
22
  let s = asciiPlot(series, {
@@ -53,7 +53,7 @@ export async function runCannon(profiles, optInput = {}) {
53
53
  resultByProfile[profileName] = await runCannonProfile(profileName, profiles[profileName], opt);
54
54
  const summary = toSummary(profileName, resultByProfile[profileName]);
55
55
  if (!opt.includeLatencyPercentiles) {
56
- _omit(summary, ['latency90', 'latency99'], true);
56
+ _omit(summary, ['latency90', 'latency99'], { mutate: true });
57
57
  }
58
58
  summaries.push(summary);
59
59
  }
package/package.json CHANGED
@@ -39,7 +39,7 @@
39
39
  "engines": {
40
40
  "node": ">=22.12.0"
41
41
  },
42
- "version": "4.0.3",
42
+ "version": "4.1.0",
43
43
  "description": "Benchmarking library, based on Benchmark.js and Autocannon",
44
44
  "author": "Natural Cycles Team",
45
45
  "license": "MIT",