@thi.ng/bench 3.2.2 → 3.2.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2023-02-10T14:03:10Z
3
+ - **Last updated**: 2023-02-27T21:43:54Z
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,13 @@ 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.2.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@3.2.3) (2023-02-17)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update timeDiff() ([37054e0](https://github.com/thi-ng/umbrella/commit/37054e0))
17
+ - default 2nd arg to current timestamp
18
+
12
19
  ## [3.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@3.2.0) (2023-02-05)
13
20
 
14
21
  #### 🚀 Features
package/README.md CHANGED
@@ -90,7 +90,7 @@ A selection:
90
90
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-knn.jpg" width="240"/> | Doodle w/ K-nearest neighbor search result visualization | [Demo](https://demo.thi.ng/umbrella/geom-knn/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-knn) |
91
91
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-knn-hash.jpg" width="240"/> | K-nearest neighbor search in an hash grid | [Demo](https://demo.thi.ng/umbrella/geom-knn-hash/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-knn-hash) |
92
92
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-voronoi-mst.jpg" width="240"/> | Poisson-disk shape-aware sampling, Voronoi & Minimum Spanning Tree visualization | [Demo](https://demo.thi.ng/umbrella/geom-voronoi-mst/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-voronoi-mst) |
93
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/markdown-parser.jpg" width="240"/> | Minimal Markdown to Hiccup to HTML parser / transformer | [Demo](https://demo.thi.ng/umbrella/markdown/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/markdown) |
93
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/markdown-parser.jpg" width="240"/> | Markdown to Hiccup to HTML parser / transformer | [Demo](https://demo.thi.ng/umbrella/markdown/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/markdown) |
94
94
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/parse-playground.png" width="240"/> | Parser grammar livecoding editor/playground & codegen | [Demo](https://demo.thi.ng/umbrella/parse-playground/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/parse-playground) |
95
95
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/pixel-sorting.png" width="240"/> | Interactive pixel sorting tool using thi.ng/color & thi.ng/pixel | [Demo](https://demo.thi.ng/umbrella/pixel-sorting/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-sorting) |
96
96
  | | Full umbrella repo doc string search w/ paginated results | [Demo](https://demo.thi.ng/umbrella/rdom-search-docs/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-search-docs) |
package/now.d.ts CHANGED
@@ -7,8 +7,8 @@ import type { Timestamp } from "./api.js";
7
7
  */
8
8
  export declare const now: Fn0<Timestamp>;
9
9
  /**
10
- * Returns the difference in milliseconds between 2 given
11
- * {@link Timestamp}s.
10
+ * Returns the difference in milliseconds between 2 given {@link Timestamp}s.
11
+ * `b` defaults to result of {@link now}.
12
12
  *
13
13
  * @param a
14
14
  * @param b
package/now.js CHANGED
@@ -15,12 +15,12 @@ export const now = typeof BigInt !== "undefined"
15
15
  ? () => performance.now() * 1e6
16
16
  : () => Date.now() * 1e6;
17
17
  /**
18
- * Returns the difference in milliseconds between 2 given
19
- * {@link Timestamp}s.
18
+ * Returns the difference in milliseconds between 2 given {@link Timestamp}s.
19
+ * `b` defaults to result of {@link now}.
20
20
  *
21
21
  * @param a
22
22
  * @param b
23
23
  */
24
- export const timeDiff = (a, b) => (typeof BigInt !== "undefined"
24
+ export const timeDiff = (a, b = now()) => (typeof BigInt !== "undefined"
25
25
  ? Number(b - a)
26
26
  : b - a) * 1e-6;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/bench",
3
- "version": "3.2.2",
3
+ "version": "3.2.4",
4
4
  "description": "Benchmarking utilities w/ various statistics & formatters (CSV, Markdown etc.)",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -114,5 +114,5 @@
114
114
  ],
115
115
  "year": 2018
116
116
  },
117
- "gitHead": "cafa4ecea90fb681949dc3885a5bd6ddefa38b51\n"
117
+ "gitHead": "060a3a69281094df70be0e4f326a0ac3bbc3dd1d\n"
118
118
  }