@thi.ng/bench 3.0.8 → 3.1.3

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +95 -59
  2. package/package.json +108 -102
package/CHANGELOG.md CHANGED
@@ -1,111 +1,147 @@
1
1
  # Change Log
2
2
 
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [3.0.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/bench@3.0.7...@thi.ng/bench@3.0.8) (2021-11-10)
7
-
8
- **Note:** Version bump only for package @thi.ng/bench
9
-
10
-
11
-
3
+ - **Last updated**: 2021-12-13T10:26:00Z
4
+ - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
12
5
 
6
+ All notable changes to this project will be documented in this file.
7
+ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
13
8
 
14
- ## [3.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/bench@3.0.6...@thi.ng/bench@3.0.7) (2021-11-03)
9
+ **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
+ and/or version bumps of transitive dependencies.
15
11
 
16
- **Note:** Version bump only for package @thi.ng/bench
12
+ ## [3.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@3.1.0) (2021-11-17)
17
13
 
14
+ #### 🚀 Features
18
15
 
16
+ - Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
17
+ Improving the overall build ergonomics
18
+ - introduced a tools workspaces
19
+ - imported it in all needed packages/examples
20
+ - inclusive project root
19
21
 
22
+ #### ♻️ Refactoring
20
23
 
24
+ - testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
25
+ this commit reverts (partly) changes made in:
26
+ ef346d7a8753590dc9094108a3d861a8dbd5dd2c
27
+ overall purpose is better testament ergonomics:
28
+ instead of having to pass NODE_OPTIONS with every invocation
29
+ having a binary to handle this for us.
21
30
 
22
- # [3.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/bench@2.1.6...@thi.ng/bench@3.0.0) (2021-10-12)
31
+ ### [3.0.8](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@3.0.8) (2021-11-10)
23
32
 
33
+ #### ♻️ Refactoring
24
34
 
25
- ### Build System
35
+ - update all countdown loops ([a5f374b](https://github.com/thi-ng/umbrella/commit/a5f374b))
26
36
 
27
- * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
37
+ ### [3.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@3.0.1) (2021-10-13)
28
38
 
39
+ #### ♻️ Refactoring
29
40
 
30
- ### Features
41
+ - update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
42
+ - update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
43
+ - add .js suffix for all relative imports
31
44
 
32
- * **bench:** add timeDiff, Timestamp type ([c612de0](https://github.com/thi-ng/umbrella/commit/c612de0574d59d9e0951443ae98b8bd14c3a0a09))
45
+ # [3.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@3.0.0) (2021-10-12)
33
46
 
47
+ #### 🛑 Breaking changes
34
48
 
35
- ### BREAKING CHANGES
49
+ - major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
50
+ - BREAKING CHANGE: discontinue CommonJS & UMD versions
51
+ - only ESM modules will be published from now on
52
+ - CJS obsolete due to ESM support in recent versions of node:
53
+ - i.e. launch NodeJS via:
54
+ - `node --experimental-specifier-resolution=node --experimental-repl-await`
55
+ - in the node REPL use `await import(...)` instead of `require()`
56
+ - UMD obsolete due to widespread browser support for ESM
57
+ Also:
58
+ - normalize/restructure/reorg all package.json files
59
+ - cleanup all build scripts, remove obsolete
60
+ - switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
36
61
 
37
- * discontinue CommonJS & UMD versions
62
+ #### 🚀 Features
38
63
 
39
- - only ESM modules will be published from now on
40
- - CJS obsolete due to ESM support in recent versions of node:
41
- - i.e. launch NodeJS via:
42
- - `node --experimental-specifier-resolution=node --experimental-repl-await`
43
- - in the node REPL use `await import(...)` instead of `require()`
44
- - UMD obsolete due to widespread browser support for ESM
64
+ - add timeDiff, Timestamp type ([c612de0](https://github.com/thi-ng/umbrella/commit/c612de0))
45
65
 
46
- Also:
47
- - normalize/restructure/reorg all package.json files
48
- - cleanup all build scripts, remove obsolete
49
- - switch from mocha to @thi.ng/testament for all tests
66
+ #### ♻️ Refactoring
50
67
 
68
+ - update all test stubs ([f2d6d53](https://github.com/thi-ng/umbrella/commit/f2d6d53))
69
+ - update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
70
+ - update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
51
71
 
72
+ ## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@2.1.0) (2021-03-12)
52
73
 
74
+ #### 🚀 Features
53
75
 
76
+ - add suite & formatters, update benchmark() ([5ea02bd](https://github.com/thi-ng/umbrella/commit/5ea02bd))
77
+ - add `suite()` benchmark runner
78
+ - update `BenchmarkOpts` & `benchmark()`
79
+ - add `size` option to configure calls per iteration
80
+ - add `format` option to configure formatter
81
+ - add `BenchmarkFormatter` interface
82
+ - add `FORMAT_DEFAULT`, `FORMAT_CSV` & `FORMAT_MD` formatters
54
83
 
84
+ ### [2.0.24](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@2.0.24) (2020-12-07)
55
85
 
56
- # [2.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/bench@2.0.31...@thi.ng/bench@2.1.0) (2021-03-12)
86
+ #### ♻️ Refactoring
57
87
 
58
- ### Features
88
+ - update type-only imports ([e6c8d98](https://github.com/thi-ng/umbrella/commit/e6c8d98))
59
89
 
60
- - **bench:** add suite & formatters, update benchmark() ([5ea02bd](https://github.com/thi-ng/umbrella/commit/5ea02bd0cfe71ff388d24906b7ce2a7ce4e72ce8))
90
+ ### [2.0.6](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@2.0.6) (2020-04-03)
61
91
 
62
- ## [2.0.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/bench@2.0.5...@thi.ng/bench@2.0.6) (2020-04-03)
92
+ #### 🩹 Bug fixes
63
93
 
64
- ### Bug Fixes
94
+ - update timedResult() to always downscale to ms ([fb2c632](https://github.com/thi-ng/umbrella/commit/fb2c632))
95
+ - fallback handlingin now() ([6494851](https://github.com/thi-ng/umbrella/commit/6494851))
65
96
 
66
- - **bench:** fallback handlingin now() ([6494851](https://github.com/thi-ng/umbrella/commit/64948518a6412cabf53664ac9f89bac2b7ef6892))
67
- - **bench:** update timedResult() to always downscale to ms ([fb2c632](https://github.com/thi-ng/umbrella/commit/fb2c6327358ccaf93314d2cdbfd3f8ff04becbd1))
97
+ ### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@2.0.1) (2020-02-25)
68
98
 
69
- # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/bench@1.0.11...@thi.ng/bench@2.0.0) (2020-01-24)
99
+ #### ♻️ Refactoring
70
100
 
71
- ### Bug Fixes
101
+ - update imports ([cfdcd3a](https://github.com/thi-ng/umbrella/commit/cfdcd3a))
72
102
 
73
- - **bench:** update now() to only OPTIONALLY use bigint timestamps ([7ac391b](https://github.com/thi-ng/umbrella/commit/7ac391b58b7e8b3b6fdc458d1edda6ca441d379b))
103
+ # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@2.0.0) (2020-01-24)
74
104
 
75
- ### Features
105
+ #### 🛑 Breaking changes
76
106
 
77
- - **bench:** add types, benchmark(), bigint timestamps, restructure ([e0af94c](https://github.com/thi-ng/umbrella/commit/e0af94cfbedea46a4131ec8243f2553e49a5e644))
107
+ - add types, benchmark(), bigint timestamps, restructure ([e0af94c](https://github.com/thi-ng/umbrella/commit/e0af94c))
108
+ - split module into separate files
109
+ - add BenchmarkOpts / BenchmarkResult types
110
+ - add benchmark()
111
+ - add now() timestamp fn (uses nanosec timer on Node)
112
+ - BREAKING CHANGE: Though no public API change, this library internally
113
+ uses ES BigInt timestamps now (in Node via `process.hrtime.bigint()`).
78
114
 
79
- ### BREAKING CHANGES
115
+ #### 🩹 Bug fixes
80
116
 
81
- - **bench:** Though no public API change, this library internally uses ES BigInt timestamps now (in Node via `process.hrtime.bigint()`).
117
+ - update now() to only OPTIONALLY use bigint timestamps ([7ac391b](https://github.com/thi-ng/umbrella/commit/7ac391b))
82
118
 
83
- # [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/bench@0.3.1...@thi.ng/bench@1.0.0) (2019-01-21)
119
+ # [1.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@1.0.0) (2019-01-21)
84
120
 
85
- ### Build System
121
+ #### 🛑 Breaking changes
86
122
 
87
123
  - update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
124
+ - BREAKING CHANGE: enabled multi-outputs (ES6 modules, CJS, UMD)
125
+ - build scripts now first build ES6 modules in package root, then call
126
+ `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
127
+ - all imports MUST be updated to only refer to package level
128
+ (not individual files anymore). tree shaking in user land will get rid of
129
+ all unused imported symbols.
88
130
 
89
- ### BREAKING CHANGES
90
-
91
- - enabled multi-outputs (ES6 modules, CJS, UMD)
92
- - build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
93
- - all imports MUST be updated to only refer to package level (not individual files anymore). tree shaking in user land will get rid of all unused imported symbols.
94
-
95
- # [0.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/bench@0.2.4...@thi.ng/bench@0.3.0) (2018-10-21)
131
+ ## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@0.3.0) (2018-10-21)
96
132
 
97
- ### Features
133
+ #### 🚀 Features
98
134
 
99
- - **bench:** add timedResult() / benchResult() ([0cf708f](https://github.com/thi-ng/umbrella/commit/0cf708f))
135
+ - add timedResult() / benchResult() ([0cf708f](https://github.com/thi-ng/umbrella/commit/0cf708f))
100
136
 
101
- # [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/bench@0.1.5...@thi.ng/bench@0.2.0) (2018-08-28)
137
+ ## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@0.2.0) (2018-08-28)
102
138
 
103
- ### Features
139
+ #### 🚀 Features
104
140
 
105
- - **bench:** add opt prefix arg, update docs ([4a37367](https://github.com/thi-ng/umbrella/commit/4a37367))
141
+ - add opt prefix arg, update docs ([4a37367](https://github.com/thi-ng/umbrella/commit/4a37367))
106
142
 
107
- # 0.1.0 (2018-05-10)
143
+ ## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bench@0.1.0) (2018-05-10)
108
144
 
109
- ### Features
145
+ #### 🚀 Features
110
146
 
111
- - **bench:** add new package [@thi](https://github.com/thi).ng/bench ([9466d4b](https://github.com/thi-ng/umbrella/commit/9466d4b))
147
+ - add new package [@thi.ng/bench](https://github.com/thi-ng/umbrella/tree/main/packages/bench) ([9466d4b](https://github.com/thi-ng/umbrella/commit/9466d4b))
package/package.json CHANGED
@@ -1,112 +1,118 @@
1
1
  {
2
- "name": "@thi.ng/bench",
3
- "version": "3.0.8",
4
- "description": "Benchmarking utilities w/ various statistics & formatters (CSV, Markdown etc.)",
5
- "type": "module",
6
- "module": "./index.js",
7
- "typings": "./index.d.ts",
8
- "sideEffects": false,
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thi-ng/umbrella.git"
2
+ "name": "@thi.ng/bench",
3
+ "version": "3.1.3",
4
+ "description": "Benchmarking utilities w/ various statistics & formatters (CSV, Markdown etc.)",
5
+ "type": "module",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thi-ng/umbrella.git"
12
+ },
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/bench#readme",
14
+ "funding": [
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/postspectacular"
12
18
  },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/bench#readme",
14
- "funding": [
15
- {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/postspectacular"
18
- },
19
- {
20
- "type": "patreon",
21
- "url": "https://patreon.com/thing_umbrella"
22
- }
23
- ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
25
- "license": "Apache-2.0",
26
- "scripts": {
27
- "build": "yarn clean && tsc --declaration",
28
- "clean": "rimraf *.js *.d.ts *.map doc",
29
- "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
- "doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
31
- "doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
32
- "doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
33
- "pub": "yarn build && yarn publish --access public",
34
- "test": "testament test"
19
+ {
20
+ "type": "patreon",
21
+ "url": "https://patreon.com/thing_umbrella"
22
+ }
23
+ ],
24
+ "author": "Karsten Schmidt <k+npm@thi.ng>",
25
+ "license": "Apache-2.0",
26
+ "scripts": {
27
+ "build": "yarn clean && tsc --declaration",
28
+ "clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
29
+ "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
+ "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
+ "doc:readme": "yarn doc:stats && tools:readme",
32
+ "doc:stats": "tools:module-stats",
33
+ "pub": "yarn npm publish --access public",
34
+ "test": "testament test"
35
+ },
36
+ "dependencies": {
37
+ "@thi.ng/api": "^8.3.3"
38
+ },
39
+ "devDependencies": {
40
+ "@microsoft/api-extractor": "^7.19.2",
41
+ "@thi.ng/testament": "^0.2.3",
42
+ "@types/node": "^16.11.12",
43
+ "rimraf": "^3.0.2",
44
+ "tools": "^0.0.1",
45
+ "typedoc": "^0.22.10",
46
+ "typescript": "^4.5.3"
47
+ },
48
+ "keywords": [
49
+ "benchmark",
50
+ "bigint",
51
+ "csv",
52
+ "execution",
53
+ "format",
54
+ "functional",
55
+ "hrtime",
56
+ "markdown",
57
+ "measure",
58
+ "statistics",
59
+ "table",
60
+ "time",
61
+ "typescript"
62
+ ],
63
+ "publishConfig": {
64
+ "access": "public"
65
+ },
66
+ "browser": {
67
+ "process": false,
68
+ "setTimeout": false
69
+ },
70
+ "engines": {
71
+ "node": ">=12.7"
72
+ },
73
+ "files": [
74
+ "*.js",
75
+ "*.d.ts",
76
+ "format"
77
+ ],
78
+ "exports": {
79
+ ".": {
80
+ "import": "./index.js"
35
81
  },
36
- "dependencies": {
37
- "@thi.ng/api": "^8.2.0"
82
+ "./api": {
83
+ "import": "./api.js"
38
84
  },
39
- "devDependencies": {
40
- "@thi.ng/testament": "^0.1.6"
85
+ "./bench": {
86
+ "import": "./bench.js"
41
87
  },
42
- "keywords": [
43
- "benchmark",
44
- "bigint",
45
- "csv",
46
- "execution",
47
- "format",
48
- "functional",
49
- "hrtime",
50
- "markdown",
51
- "measure",
52
- "statistics",
53
- "table",
54
- "time",
55
- "typescript"
56
- ],
57
- "publishConfig": {
58
- "access": "public"
88
+ "./benchmark": {
89
+ "import": "./benchmark.js"
59
90
  },
60
- "browser": {
61
- "process": false,
62
- "setTimeout": false
91
+ "./format/csv": {
92
+ "import": "./format/csv.js"
63
93
  },
64
- "engines": {
65
- "node": ">=12.7"
94
+ "./format/default": {
95
+ "import": "./format/default.js"
66
96
  },
67
- "files": [
68
- "*.js",
69
- "*.d.ts",
70
- "format"
71
- ],
72
- "exports": {
73
- ".": {
74
- "import": "./index.js"
75
- },
76
- "./api": {
77
- "import": "./api.js"
78
- },
79
- "./bench": {
80
- "import": "./bench.js"
81
- },
82
- "./benchmark": {
83
- "import": "./benchmark.js"
84
- },
85
- "./format/csv": {
86
- "import": "./format/csv.js"
87
- },
88
- "./format/default": {
89
- "import": "./format/default.js"
90
- },
91
- "./format/markdown": {
92
- "import": "./format/markdown.js"
93
- },
94
- "./now": {
95
- "import": "./now.js"
96
- },
97
- "./suite": {
98
- "import": "./suite.js"
99
- },
100
- "./timed": {
101
- "import": "./timed.js"
102
- }
97
+ "./format/markdown": {
98
+ "import": "./format/markdown.js"
103
99
  },
104
- "thi.ng": {
105
- "related": [
106
- "csv",
107
- "hiccup-markdown"
108
- ],
109
- "year": 2018
100
+ "./now": {
101
+ "import": "./now.js"
110
102
  },
111
- "gitHead": "5fe52419af63984ebe53032201b2a6174b9cb159"
112
- }
103
+ "./suite": {
104
+ "import": "./suite.js"
105
+ },
106
+ "./timed": {
107
+ "import": "./timed.js"
108
+ }
109
+ },
110
+ "thi.ng": {
111
+ "related": [
112
+ "csv",
113
+ "hiccup-markdown"
114
+ ],
115
+ "year": 2018
116
+ },
117
+ "gitHead": "2db9dd34c0c2c60cbfde3dad0bca352b20292f5c\n"
118
+ }