@naturalcycles/bench-lib 1.6.1 → 1.6.3

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,7 +1,7 @@
1
1
  export interface BenchDeferred {
2
- resolve(): void;
2
+ resolve: () => void;
3
3
  }
4
- export declare type BenchDeferredFunction = (done: BenchDeferred) => any;
4
+ export type BenchDeferredFunction = (done: BenchDeferred) => any;
5
5
  export interface RunBenchOptions {
6
6
  /**
7
7
  * Functions to benchmark.
@@ -59,4 +59,4 @@ export interface RunBenchOptions {
59
59
  /**
60
60
  * results[fnName] = 100 // ops/sec, or "hertz"
61
61
  */
62
- export declare type HertzMap = Record<string, number>;
62
+ export type HertzMap = Record<string, number>;
@@ -74,7 +74,6 @@ async function runBenchOnce(opt, run) {
74
74
  // console.log(event.target)
75
75
  })
76
76
  .on('complete', function () {
77
- // eslint-disable-next-line unicorn/no-array-callback-reference
78
77
  console.log(`Fastest in run ${(0, colors_1.yellow)(run)} is ` + this.filter('fastest').map('name'));
79
78
  // console.log(this[0].stats)
80
79
  // console.log(this)
@@ -1,6 +1,7 @@
1
1
  /// <reference types="node" />
2
- import type * as http from 'http';
3
- export declare type HttpServerFactory = () => Promise<http.Server>;
2
+ /// <reference types="node" />
3
+ import type * as http from 'node:http';
4
+ export type HttpServerFactory = () => Promise<http.Server>;
4
5
  export interface AutocannonOptions {
5
6
  body?: string | Buffer;
6
7
  method?: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.expressSyncFunctionFactory = exports.expressFunctionFactory = exports.expressWithMiddlewaresServerFactory = exports.bareExpressServerFactory = exports.bareNodeServerFactory = void 0;
4
- const http = require("http");
4
+ const http = require("node:http");
5
5
  const express = require("express");
6
6
  const helmet = require("helmet");
7
7
  const bareNodeServerFactory = async () => {
package/package.json CHANGED
@@ -9,18 +9,18 @@
9
9
  "autocannon": "^7.0.0",
10
10
  "benchmark": "^2.1.4",
11
11
  "express": "^4.17.1",
12
- "fs-extra": "^10.0.0",
13
- "helmet": "^4.6.0",
12
+ "fs-extra": "^11.1.0",
13
+ "helmet": "^7.0.0",
14
14
  "vega": "^5.10.1",
15
15
  "vega-lite": "^5.0.0"
16
16
  },
17
17
  "devDependencies": {
18
- "@naturalcycles/dev-lib": "^12.0.2",
18
+ "@naturalcycles/dev-lib": "^13.6.0",
19
19
  "@types/benchmark": "^2.1.0",
20
20
  "@types/express": "^4.17.6",
21
- "@types/node": "^16.0.0",
22
- "fastify": "^3.20.2",
23
- "jest": "^27.0.6"
21
+ "@types/node": "^20.1.0",
22
+ "fastify": "^4.6.0",
23
+ "jest": "^29.0.3"
24
24
  },
25
25
  "files": [
26
26
  "dist"
@@ -35,9 +35,9 @@
35
35
  "url": "https://github.com/NaturalCycles/bench-lib"
36
36
  },
37
37
  "engines": {
38
- "node": ">=12.13.1"
38
+ "node": ">=16.10.0"
39
39
  },
40
- "version": "1.6.1",
40
+ "version": "1.6.3",
41
41
  "description": "Benchmarking library, based on Benchmark.js and Autocannon",
42
42
  "author": "Natural Cycles Team",
43
43
  "license": "MIT"
package/CHANGELOG.md DELETED
@@ -1,104 +0,0 @@
1
- ## [1.6.1](https://github.com/NaturalCycles/bench-lib/compare/v1.6.0...v1.6.1) (2021-10-25)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * runBenchScript exiting early for 2+ runs ([d7b0d32](https://github.com/NaturalCycles/bench-lib/commit/d7b0d32489b9d689813f055d84df85f43cb29483))
7
-
8
- # [1.6.0](https://github.com/NaturalCycles/bench-lib/compare/v1.5.0...v1.6.0) (2021-10-25)
9
-
10
-
11
- ### Features
12
-
13
- * runBenchScript, runCannonScript ([8a676e1](https://github.com/NaturalCycles/bench-lib/commit/8a676e18d84a7babbb64d066ff3009ad27ac63ea))
14
-
15
- # [1.5.0](https://github.com/NaturalCycles/bench-lib/compare/v1.4.0...v1.5.0) (2021-08-25)
16
-
17
-
18
- ### Features
19
-
20
- * improvements ([9757eb9](https://github.com/NaturalCycles/bench-lib/commit/9757eb90c55fa8ec793d820de924dbbc82036c47))
21
-
22
- # [1.4.0](https://github.com/NaturalCycles/bench-lib/compare/v1.3.0...v1.4.0) (2021-08-15)
23
-
24
-
25
- ### Features
26
-
27
- * allow to add a `path` to autocannon url ([2193343](https://github.com/NaturalCycles/bench-lib/commit/2193343c065a28dc1b4c335384824b26b2371e8a))
28
-
29
- # [1.3.0](https://github.com/NaturalCycles/bench-lib/compare/v1.2.0...v1.3.0) (2021-08-15)
30
-
31
-
32
- ### Features
33
-
34
- * writeRawSummary option (default to true) ([93c4b35](https://github.com/NaturalCycles/bench-lib/commit/93c4b35cf303e2d69c5130e9bd1e15f221a76143))
35
-
36
- # [1.2.0](https://github.com/NaturalCycles/bench-lib/compare/v1.1.0...v1.2.0) (2021-08-15)
37
-
38
-
39
- ### Features
40
-
41
- * support autocannonOptions ([04f723b](https://github.com/NaturalCycles/bench-lib/commit/04f723b83ae8a14ba104e7f7b53d38f874579ac5))
42
-
43
- # [1.1.0](https://github.com/NaturalCycles/bench-lib/compare/v1.0.7...v1.1.0) (2021-08-15)
44
-
45
-
46
- ### Features
47
-
48
- * runCannot options/improvements ([06f3653](https://github.com/NaturalCycles/bench-lib/commit/06f3653dbb2fc9daa515c59de582c07b4ee63a42))
49
-
50
- ## [1.0.7](https://github.com/NaturalCycles/bench-lib/compare/v1.0.6...v1.0.7) (2021-05-20)
51
-
52
-
53
- ### Bug Fixes
54
-
55
- * deps, eslint ([f10baaf](https://github.com/NaturalCycles/bench-lib/commit/f10baaf8cbf30ba81ab36dad48f648969e0a08d3))
56
-
57
- ## [1.0.6](https://github.com/NaturalCycles/bench-lib/compare/v1.0.5...v1.0.6) (2021-02-26)
58
-
59
-
60
- ### Bug Fixes
61
-
62
- * deps ([61df76a](https://github.com/NaturalCycles/bench-lib/commit/61df76aeb0b915f1a68e42af5a48891fca0ef74f))
63
-
64
- ## [1.0.5](https://github.com/NaturalCycles/bench-lib/compare/v1.0.4...v1.0.5) (2020-12-12)
65
-
66
-
67
- ### Bug Fixes
68
-
69
- * deps ([70f998c](https://github.com/NaturalCycles/bench-lib/commit/70f998cad1d2733738c11942c356ae188af8d609))
70
-
71
- ## [1.0.4](https://github.com/NaturalCycles/bench-lib/compare/v1.0.3...v1.0.4) (2020-12-08)
72
-
73
-
74
- ### Bug Fixes
75
-
76
- * modernize ([57c5f69](https://github.com/NaturalCycles/bench-lib/commit/57c5f69fbf96c96615356a985d9d94f6a89409a2))
77
-
78
- ## [1.0.3](https://github.com/NaturalCycles/bench-lib/compare/v1.0.2...v1.0.3) (2020-09-21)
79
-
80
-
81
- ### Bug Fixes
82
-
83
- * deps ([c3c0e3d](https://github.com/NaturalCycles/bench-lib/commit/c3c0e3d39068f6f16516b4a5ab621b25721cc8f7))
84
-
85
- ## [1.0.2](https://github.com/NaturalCycles/bench-lib/compare/v1.0.1...v1.0.2) (2020-08-17)
86
-
87
-
88
- ### Bug Fixes
89
-
90
- * deps ([746e8e9](https://github.com/NaturalCycles/bench-lib/commit/746e8e92248a7967b42fbe81aabb88cb4db9c9fa))
91
-
92
- ## [1.0.1](https://github.com/NaturalCycles/bench-lib/compare/v1.0.0...v1.0.1) (2020-08-10)
93
-
94
-
95
- ### Bug Fixes
96
-
97
- * deps ([e949d93](https://github.com/NaturalCycles/bench-lib/commit/e949d93e7ff438dd6dbbde3e4ee15ded1e7b1254))
98
-
99
- # 1.0.0 (2020-04-25)
100
-
101
-
102
- ### Features
103
-
104
- * first version ([5dd6a07](https://github.com/NaturalCycles/bench-lib/commit/5dd6a072aefa8125589cc7e4203ddcaebc766a09))