@thi.ng/bench 3.1.19 → 3.1.20
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.
- package/CHANGELOG.md +1 -1
- package/README.md +9 -12
- package/api.d.ts +3 -3
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
2
|
|
|
3
|
-
# 
|
|
3
|
+
# 
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@thi.ng/bench)
|
|
6
6
|

|
|
7
|
-
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
This project is part of the
|
|
10
10
|
[@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
|
|
@@ -24,15 +24,15 @@ This project is part of the
|
|
|
24
24
|
|
|
25
25
|
## About
|
|
26
26
|
|
|
27
|
-
Benchmarking utilities w/ various statistics & formatters (CSV, Markdown etc.)
|
|
27
|
+
Benchmarking utilities w/ various statistics & formatters (CSV, Markdown etc.)
|
|
28
28
|
|
|
29
29
|
Though no public API change (only additions), since v2.0.0 this library
|
|
30
30
|
internally attempts to use high-res ES
|
|
31
31
|
[`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)
|
|
32
32
|
timestamps (in Node via
|
|
33
33
|
[`process.hrtime.bigint()`](https://nodejs.org/dist/latest-v12.x/docs/api/process.html#process_process_hrtime_bigint)).
|
|
34
|
-
If `BigInt` is not available in the target environment, timestamps are
|
|
35
|
-
|
|
34
|
+
If `BigInt` is not available in the target environment, timestamps are still
|
|
35
|
+
only sourced via `Date.now()`.
|
|
36
36
|
|
|
37
37
|
## Status
|
|
38
38
|
|
|
@@ -61,11 +61,8 @@ ES module import:
|
|
|
61
61
|
|
|
62
62
|
For Node.js REPL:
|
|
63
63
|
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
node --experimental-repl-await
|
|
67
|
-
|
|
68
|
-
> const bench = await import("@thi.ng/bench");
|
|
64
|
+
```js
|
|
65
|
+
const bench = await import("@thi.ng/bench");
|
|
69
66
|
```
|
|
70
67
|
|
|
71
68
|
Package sizes (brotli'd, pre-treeshake): ESM: 1.25 KB
|
|
@@ -212,7 +209,7 @@ option given to `benchmark()` or `suite()`.
|
|
|
212
209
|
|
|
213
210
|
## Authors
|
|
214
211
|
|
|
215
|
-
Karsten Schmidt
|
|
212
|
+
- Karsten Schmidt
|
|
216
213
|
|
|
217
214
|
If this project contributes to an academic publication, please cite it as:
|
|
218
215
|
|
|
@@ -227,4 +224,4 @@ If this project contributes to an academic publication, please cite it as:
|
|
|
227
224
|
|
|
228
225
|
## License
|
|
229
226
|
|
|
230
|
-
© 2018 - 2022 Karsten Schmidt // Apache
|
|
227
|
+
© 2018 - 2022 Karsten Schmidt // Apache License 2.0
|
package/api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Fn, Fn0, Fn2 } from "@thi.ng/api";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type Timestamp = number | bigint;
|
|
3
|
+
export type TimingResult<T> = [T, number];
|
|
4
4
|
export interface BenchmarkOpts {
|
|
5
5
|
/**
|
|
6
6
|
* Benchmark title (only used if `print` enabled)
|
|
@@ -38,7 +38,7 @@ export interface BenchmarkOpts {
|
|
|
38
38
|
*/
|
|
39
39
|
output: boolean;
|
|
40
40
|
}
|
|
41
|
-
export
|
|
41
|
+
export type OptsWithoutTitle = Omit<BenchmarkOpts, "title">;
|
|
42
42
|
export interface BenchmarkSuiteOpts extends OptsWithoutTitle {
|
|
43
43
|
}
|
|
44
44
|
export interface BenchmarkResult {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/bench",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.20",
|
|
4
4
|
"description": "Benchmarking utilities w/ various statistics & formatters (CSV, Markdown etc.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "yarn clean && tsc --declaration",
|
|
28
|
-
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
|
|
28
|
+
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc format",
|
|
29
29
|
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
30
30
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
31
31
|
"doc:readme": "yarn doc:stats && tools:readme",
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.
|
|
37
|
+
"@thi.ng/api": "^8.6.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@microsoft/api-extractor": "^7.33.
|
|
41
|
-
"@thi.ng/testament": "^0.3.
|
|
42
|
-
"@types/node": "^18.11.
|
|
40
|
+
"@microsoft/api-extractor": "^7.33.7",
|
|
41
|
+
"@thi.ng/testament": "^0.3.7",
|
|
42
|
+
"@types/node": "^18.11.13",
|
|
43
43
|
"rimraf": "^3.0.2",
|
|
44
44
|
"tools": "^0.0.1",
|
|
45
|
-
"typedoc": "^0.23.
|
|
46
|
-
"typescript": "^4.
|
|
45
|
+
"typedoc": "^0.23.22",
|
|
46
|
+
"typescript": "^4.9.4"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"benchmark",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
],
|
|
115
115
|
"year": 2018
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "f445a9cc8022bcdebbf6ff91fd66ced016d72f01\n"
|
|
118
118
|
}
|