@thi.ng/bench 3.4.7 → 3.4.10
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 +7 -1
- package/README.md +3 -5
- package/package.json +9 -10
- package/profiler.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2023-
|
|
3
|
+
- **Last updated**: 2023-11-09T10:28:18Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
### [3.4.9](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@3.4.9) (2023-11-09)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
|
|
17
|
+
|
|
12
18
|
## [3.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@3.4.0) (2023-06-14)
|
|
13
19
|
|
|
14
20
|
#### 🚀 Features
|
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ For Node.js REPL:
|
|
|
74
74
|
const bench = await import("@thi.ng/bench");
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
Package sizes (brotli'd, pre-treeshake): ESM:
|
|
77
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 2.07 KB
|
|
78
78
|
|
|
79
79
|
## Dependencies
|
|
80
80
|
|
|
@@ -82,11 +82,9 @@ Package sizes (brotli'd, pre-treeshake): ESM: 1.98 KB
|
|
|
82
82
|
|
|
83
83
|
## Usage examples
|
|
84
84
|
|
|
85
|
-
Several
|
|
85
|
+
Several projects in this repo's
|
|
86
86
|
[/examples](https://github.com/thi-ng/umbrella/tree/develop/examples)
|
|
87
|
-
directory are using this package
|
|
88
|
-
|
|
89
|
-
A selection:
|
|
87
|
+
directory are using this package:
|
|
90
88
|
|
|
91
89
|
| Screenshot | Description | Live demo | Source |
|
|
92
90
|
|:--------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------|:--------------------------------------------------------------------------------------|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/bench",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.10",
|
|
4
4
|
"description": "Benchmarking & profiling utilities w/ various statistics & formatters (CSV, JSON, Markdown etc.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -28,21 +28,20 @@
|
|
|
28
28
|
"clean": "rimraf --glob '*.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
|
-
"doc:readme": "
|
|
32
|
-
"doc:stats": "tools:module-stats",
|
|
31
|
+
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
33
32
|
"pub": "yarn npm publish --access public",
|
|
34
|
-
"test": "
|
|
33
|
+
"test": "bun test"
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.9.
|
|
36
|
+
"@thi.ng/api": "^8.9.8"
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|
|
40
|
-
"@microsoft/api-extractor": "^7.38.
|
|
41
|
-
"@thi.ng/testament": "^0.
|
|
42
|
-
"@types/node": "^20.
|
|
39
|
+
"@microsoft/api-extractor": "^7.38.2",
|
|
40
|
+
"@thi.ng/testament": "^0.4.1",
|
|
41
|
+
"@types/node": "^20.9.0",
|
|
43
42
|
"rimraf": "^5.0.5",
|
|
44
43
|
"tools": "^0.0.1",
|
|
45
|
-
"typedoc": "^0.25.
|
|
44
|
+
"typedoc": "^0.25.3",
|
|
46
45
|
"typescript": "^5.2.2"
|
|
47
46
|
},
|
|
48
47
|
"keywords": [
|
|
@@ -117,5 +116,5 @@
|
|
|
117
116
|
],
|
|
118
117
|
"year": 2018
|
|
119
118
|
},
|
|
120
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "669a3151e4302480244fe3e60eff5e732ea5b7a7\n"
|
|
121
120
|
}
|
package/profiler.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { benchResult } from "./bench.js";
|
|
2
2
|
import { asMillis, now } from "./now.js";
|
|
3
3
|
export class Profiler {
|
|
4
|
+
_session;
|
|
5
|
+
_profiles;
|
|
6
|
+
_enabled;
|
|
7
|
+
_overhead = 0;
|
|
4
8
|
constructor(opts) {
|
|
5
|
-
this._overhead = 0;
|
|
6
9
|
const { warmup, enabled } = {
|
|
7
10
|
warmup: 1e6,
|
|
8
11
|
enabled: true,
|