@thi.ng/bench 3.4.28 → 3.4.29
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/package.json +4 -4
- package/profiler.d.ts +6 -0
- package/profiler.js +6 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/bench",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.29",
|
|
4
4
|
"description": "Benchmarking & profiling utilities w/ various statistics & formatters (CSV, JSON, Markdown etc.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"test": "bun test"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@thi.ng/api": "^8.9.
|
|
38
|
+
"@thi.ng/api": "^8.9.26"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@microsoft/api-extractor": "^7.40.1",
|
|
42
|
-
"@thi.ng/testament": "^0.4.
|
|
42
|
+
"@thi.ng/testament": "^0.4.20",
|
|
43
43
|
"@types/node": "^20.11.17",
|
|
44
44
|
"esbuild": "^0.20.0",
|
|
45
45
|
"rimraf": "^5.0.5",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
],
|
|
120
120
|
"year": 2018
|
|
121
121
|
},
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n"
|
|
123
123
|
}
|
package/profiler.d.ts
CHANGED
|
@@ -104,6 +104,8 @@ export declare class Profiler implements IDeref<IObjectOf<ProfileResult>>, IEnab
|
|
|
104
104
|
*
|
|
105
105
|
* * @example
|
|
106
106
|
* ```ts
|
|
107
|
+
* import { Profiler } from "@thi.ng/bench";
|
|
108
|
+
*
|
|
107
109
|
* const profiler = new Profiler();
|
|
108
110
|
*
|
|
109
111
|
* // recursive function
|
|
@@ -170,6 +172,10 @@ export declare class Profiler implements IDeref<IObjectOf<ProfileResult>>, IEnab
|
|
|
170
172
|
*
|
|
171
173
|
* @example
|
|
172
174
|
* ```ts
|
|
175
|
+
* import { Profiler } from "@thi.ng/bench";
|
|
176
|
+
*
|
|
177
|
+
* const profiler = new Profiler();
|
|
178
|
+
*
|
|
173
179
|
* const sum = profiler.wrap(
|
|
174
180
|
* "sum",
|
|
175
181
|
* (vec: number[]) => vec.reduce((acc, x) => acc + x, 0)
|
package/profiler.js
CHANGED
|
@@ -95,6 +95,8 @@ class Profiler {
|
|
|
95
95
|
*
|
|
96
96
|
* * @example
|
|
97
97
|
* ```ts
|
|
98
|
+
* import { Profiler } from "@thi.ng/bench";
|
|
99
|
+
*
|
|
98
100
|
* const profiler = new Profiler();
|
|
99
101
|
*
|
|
100
102
|
* // recursive function
|
|
@@ -196,6 +198,10 @@ class Profiler {
|
|
|
196
198
|
*
|
|
197
199
|
* @example
|
|
198
200
|
* ```ts
|
|
201
|
+
* import { Profiler } from "@thi.ng/bench";
|
|
202
|
+
*
|
|
203
|
+
* const profiler = new Profiler();
|
|
204
|
+
*
|
|
199
205
|
* const sum = profiler.wrap(
|
|
200
206
|
* "sum",
|
|
201
207
|
* (vec: number[]) => vec.reduce((acc, x) => acc + x, 0)
|