@thi.ng/bench 3.5.6 → 3.5.7
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 +1 -1
- package/format/markdown.js +14 -14
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2024-
|
|
3
|
+
- **Last updated**: 2024-06-21T19:34:38Z
|
|
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.5.7](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@3.5.7) (2024-06-21)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- enforce uniform naming convention of internal functions ([56992b2](https://github.com/thi-ng/umbrella/commit/56992b2))
|
|
17
|
+
|
|
12
18
|
### [3.5.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@3.5.1) (2024-03-27)
|
|
13
19
|
|
|
14
20
|
#### 🩹 Bug fixes
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 193 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/format/markdown.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { EMPTY, FLOAT } from "../api.js";
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const column =
|
|
2
|
+
const __n = (n, char = "-") => new Array(n).fill(char).join("");
|
|
3
|
+
const __pad = (w) => {
|
|
4
|
+
const column = __n(w, " ");
|
|
5
5
|
return (x) => {
|
|
6
6
|
const s = typeof x === "number" ? FLOAT(x) : x;
|
|
7
7
|
return s.length < w ? column.substring(0, w - s.length) + s : s.substring(0, w);
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
10
|
+
const __row = (cols) => `|${cols.map((x, i) => COLUMNS[i](x)).join("|")}|`;
|
|
11
|
+
const C24 = __pad(24);
|
|
12
|
+
const C12 = __pad(12);
|
|
13
|
+
const C8 = __pad(8);
|
|
14
|
+
const D24 = __n(24);
|
|
15
|
+
const D12 = __n(11) + ":";
|
|
16
|
+
const D8 = __n(7) + ":";
|
|
17
|
+
const COLUMNS = [C24, C8, C8, C12, C12, C8, C8, C8, C8, C8, C8, C8];
|
|
18
|
+
const DASHES = [D24, D8, D8, D12, D12, D8, D8, D8, D8, D8, D8, D8];
|
|
19
19
|
const FORMAT_MD = {
|
|
20
|
-
prefix: () =>
|
|
20
|
+
prefix: () => __row([
|
|
21
21
|
"Title",
|
|
22
22
|
"Iter",
|
|
23
23
|
"Size",
|
|
@@ -34,7 +34,7 @@ const FORMAT_MD = {
|
|
|
34
34
|
|${DASHES.join("|")}|`,
|
|
35
35
|
start: EMPTY,
|
|
36
36
|
warmup: EMPTY,
|
|
37
|
-
result: (res) =>
|
|
37
|
+
result: (res) => __row([
|
|
38
38
|
res.title,
|
|
39
39
|
"" + res.iter,
|
|
40
40
|
"" + res.size,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/bench",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.7",
|
|
4
4
|
"description": "Benchmarking & profiling utilities w/ various statistics & formatters (CSV, JSON, Markdown etc.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@thi.ng/api": "^8.11.
|
|
39
|
+
"@thi.ng/api": "^8.11.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@microsoft/api-extractor": "^7.
|
|
43
|
-
"@thi.ng/testament": "^0.4.
|
|
44
|
-
"@types/node": "^20.
|
|
45
|
-
"esbuild": "^0.21.
|
|
42
|
+
"@microsoft/api-extractor": "^7.47.0",
|
|
43
|
+
"@thi.ng/testament": "^0.4.30",
|
|
44
|
+
"@types/node": "^20.14.6",
|
|
45
|
+
"esbuild": "^0.21.5",
|
|
46
46
|
"tools": "^0.0.1",
|
|
47
47
|
"typedoc": "^0.25.13",
|
|
48
|
-
"typescript": "^5.
|
|
48
|
+
"typescript": "^5.5.2"
|
|
49
49
|
},
|
|
50
50
|
"keywords": [
|
|
51
51
|
"benchmark",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
],
|
|
120
120
|
"year": 2018
|
|
121
121
|
},
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "154c95cf9d6bab32174498ec3b5b5d87e42be7f9\n"
|
|
123
123
|
}
|