You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I never liked the name "horizons" (except on the day I chose it I guess). I think a much clearer name is "auto sample conditions".
This changes the `--horizon` flag and the `horizons` JSON config setting (yes... one was singular, the other plural) to `--auto-sample-conditions` and `autoSampleConditions` respectively.
It's backwards compatible, with a warning printed if you use the old style.
Related to #221
<-------------------------------> n=50 X -10% X +10%
180
+
<------------------> n=100 ✔️ -10% X +10%
178
181
<-----> n=200 ✔️ -10% ✔️ +10%
179
182
180
183
|---------|---------|---------|---------| difference in runtime
181
184
-20% -10% 0 +10% +20%
182
185
183
-
n = sample size
184
-
<---> = confidence interval for percent difference of mean runtimes
185
-
✔️ = resolved horizon
186
-
❌ = unresolved horizon
186
+
n = sample size
187
+
<--> = confidence interval for percent difference of mean runtimes
188
+
✔️ = resolved condition
189
+
X = unresolved condition
187
190
```
188
191
189
192
In this example, by `n=50` we are not sure whether A is faster or slower than B
@@ -192,10 +195,10 @@ than 10%, but we're still not sure if it's _slower_ by more than 10%. By `n=200`
192
195
we have also ruled out that B is slower than A by more than 10%, so we stop
193
196
sampling. Note that we still don't know which is _absolutely_ faster, we just
194
197
know that whatever the difference is, it is neither faster nor slower than 10%
195
-
(and if we did want to know, we could add `0` to our horizons).
198
+
(and if we did want to know, we could add `0` to our conditions).
196
199
197
-
Note that, if the _actual_ difference is very close to a horizon, then it is
198
-
likely that the horizon will never be met, and the timeout will expire.
200
+
Note that, if the _actual_ difference is very close to a condition, then it is
201
+
likely that the condition will never be met, and the timeout will expire.
199
202
200
203
## Measurement modes
201
204
@@ -705,7 +708,7 @@ Defaults are the same as the corresponding command-line flags.
705
708
"root": "./benchmarks",
706
709
"sampleSize": 50,
707
710
"timeout": 3,
708
-
"horizons": ["0%", "1%"],
711
+
"autoSampleConditions": ["0%", "1%"],
709
712
"benchmarks": [
710
713
{
711
714
"name": "foo",
@@ -806,9 +809,9 @@ tach http://example.com
806
809
| `--package-version` / `-p` | _(none)_ | Specify an NPM package version to swap in ([details](#swap-npm-dependencies)) |
807
810
| `--browser` / `-b` | `chrome` | Which browsers to launch in automatic mode, comma-delimited (chrome, firefox, safari, edge, ie) ([details](#browsers)) |
808
811
| `--window-size` | `1024,768` | "width,height" in pixels of the browser windows that will be created |
809
-
| `--sample-size` / `-n` | `50` | Minimum number of times to run each benchmark ([details](#sample-size)] |
810
-
| `--horizon` | `0%` | The degrees of difference to try and resolve when auto-sampling ("N%" or "Nms", comma-delimited) ([details](#auto-sampling)) |
811
-
| `--timeout` | `3` | The maximum number of minutes to spend auto-sampling ([details](#auto-sampling)) |
812
+
| `--sample-size` / `-n` | `50` | Minimum number of times to run each benchmark ([details](#sample-size)) |
813
+
| `--auto-sample-conditions` | `0%` | The degrees of difference to try and resolve when auto-sampling ("N%" or "Nms", comma-delimited) ([details](#auto-sample-conditions)) |
814
+
| `--timeout` | `3` | The maximum number of minutes to spend auto-sampling ([details](#auto-sample)) |
812
815
| `--measure` | `callback` | Which time interval to measure (`callback`, `global`, `fcp`) ([details](#measurement-modes)) |
813
816
| `--measurement-expression` | `window.tachometerResult` | JS expression to poll for on page to retrieve measurement result when `measure` setting is set to `global` |
814
817
| `--remote-accessible-host` | matches `--host` | When using a browser over a remote WebDriver connection, the URL that those browsers should use to access the local tachometer server ([details](#remote-control)) |
Copy file name to clipboardExpand all lines: config.schema.json
+8-1
Original file line number
Diff line number
Diff line change
@@ -453,6 +453,13 @@
453
453
"description": "An optional reference to the JSON Schema for this file.\n\nIf none is given, and the file is a valid tachometer config file,\ntachometer will write back to the config file to give this a value.",
454
454
"type": "string"
455
455
},
456
+
"autoSampleConditions": {
457
+
"description": "The degrees of difference to try and resolve when auto-sampling\n(e.g. 0ms, +1ms, -1ms, 0%, +1%, -1%, default 0%).",
458
+
"items": {
459
+
"type": "string"
460
+
},
461
+
"type": "array"
462
+
},
456
463
"benchmarks": {
457
464
"description": "Benchmarks to run.",
458
465
"items": {
@@ -462,7 +469,7 @@
462
469
"type": "array"
463
470
},
464
471
"horizons": {
465
-
"description": "The degrees of difference to try and resolve when auto-sampling\n(e.g. 0ms, +1ms, -1ms, 0%, +1%, -1%, default 0%).",
472
+
"description": "Deprecated alias for autoSampleConditions.",
0 commit comments