playwright-performance-regression 0.0.0 → 0.1.0-next.1
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 +286 -0
- package/LICENSE +21 -0
- package/README.md +214 -2
- package/dist/chunk-3CLCMD2Q.js +3411 -0
- package/dist/chunk-4SFI55HF.cjs +319 -0
- package/dist/chunk-B64P2D5A.js +756 -0
- package/dist/chunk-DYLCGMI2.js +63 -0
- package/dist/chunk-GCA73FFP.cjs +1139 -0
- package/dist/chunk-HBGADXLP.js +254 -0
- package/dist/chunk-L5C63HEF.js +1097 -0
- package/dist/chunk-WZVQK7CQ.cjs +758 -0
- package/dist/cli.js +3833 -0
- package/dist/config.cjs +256 -0
- package/dist/config.d.cts +15 -0
- package/dist/config.d.ts +15 -0
- package/dist/config.js +252 -0
- package/dist/fixture.cjs +16 -0
- package/dist/fixture.d.cts +22 -0
- package/dist/fixture.d.ts +22 -0
- package/dist/fixture.js +4 -0
- package/dist/index.cjs +14 -0
- package/dist/index.d.cts +637 -0
- package/dist/index.d.ts +637 -0
- package/dist/index.js +1 -0
- package/dist/perf-api-V4PeHVE0.d.cts +22 -0
- package/dist/perf-api-V4PeHVE0.d.ts +22 -0
- package/dist/reporter.cjs +4787 -0
- package/dist/reporter.d.cts +18 -0
- package/dist/reporter.d.ts +18 -0
- package/dist/reporter.js +1406 -0
- package/dist/test.cjs +14 -0
- package/dist/test.d.cts +7 -0
- package/dist/test.d.ts +7 -0
- package/dist/test.js +10 -0
- package/package.json +144 -4
- package/schemas/common.schema.json +81 -0
- package/schemas/config.schema.json +875 -0
- package/schemas/outcome.schema.json +44 -0
- package/schemas/run-report.schema.json +505 -0
- package/schemas/samples.schema.json +169 -0
- package/schemas/thresholds.schema.json +138 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://pkg.invalid/schemas/outcome.schema.json",
|
|
4
|
+
"title": "Outcome file",
|
|
5
|
+
"description": "Small file the reporter writes at the end of onEnd to the path from PW_PERF_OUTCOME_FILE (ADR-0009). Read and deleted by the CLI. Not written when the run was started without the CLI.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "runId", "mode", "exitCode", "tests", "evaluation", "toolErrors", "paths"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": { "const": 1 },
|
|
11
|
+
"runId": { "$ref": "common.schema.json#/$defs/runId" },
|
|
12
|
+
"mode": { "$ref": "common.schema.json#/$defs/mode" },
|
|
13
|
+
"exitCode": {
|
|
14
|
+
"description": "Exit code the CLI must use, computed by buildOutcome() in core (00, chapter 11; 02-REQ-26): 0 ok, 2 performance violations block the run, 3 tool error or untrustworthy result. Precedence 3 > 2 > 0. Failed tests alone never give a non-zero code in perf mode (gate.maxFailedTestShare, 09-REQ-24); code 1 is reserved and never written. An interrupted or timed-out run without a signal has RUN_INCOMPLETE in toolErrors, so 3; the CLI itself uses 130/143 after a signal it received, regardless of this file (04).",
|
|
15
|
+
"enum": [0, 2, 3]
|
|
16
|
+
},
|
|
17
|
+
"tests": { "type": "object", "additionalProperties": false, "required": ["status"], "properties": { "status": { "$ref": "common.schema.json#/$defs/testsStatus" } } },
|
|
18
|
+
"evaluation": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": ["status", "gateEnabled"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"status": { "$ref": "common.schema.json#/$defs/evaluationStatus" },
|
|
24
|
+
"gateEnabled": { "description": "False in thresholds mode.", "type": "boolean" }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"toolErrors": { "description": "Same entries as toolErrors in the run report.", "type": "array", "items": { "$ref": "common.schema.json#/$defs/issue" } },
|
|
28
|
+
"paths": {
|
|
29
|
+
"description": "Absolute paths of files written in this run, for the CLI summary.",
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["reportJson", "reportHtml", "thresholds", "thresholdsDiff"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"reportJson": { "description": "Null when the report could not be written.", "oneOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] },
|
|
35
|
+
"reportHtml": { "description": "Null when the HTML report could not be written.", "oneOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] },
|
|
36
|
+
"thresholds": { "description": "Thresholds files written (thresholds mode only).", "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
37
|
+
"thresholdsDiff": {
|
|
38
|
+
"description": "Thresholds diff in Markdown (10-REQ-19); null outside thresholds mode or when not written.",
|
|
39
|
+
"oneOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://pkg.invalid/schemas/run-report.schema.json",
|
|
4
|
+
"title": "Run report",
|
|
5
|
+
"description": "Result of one perf-mode run. Written by the reporter in onEnd; read by the CLI (thresholds --from, report) and rendered to HTML (11). Everything the HTML report shows must be here (01-REQ-22).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schemaVersion",
|
|
10
|
+
"tool",
|
|
11
|
+
"runId",
|
|
12
|
+
"mode",
|
|
13
|
+
"startedAt",
|
|
14
|
+
"finishedAt",
|
|
15
|
+
"env",
|
|
16
|
+
"configDir",
|
|
17
|
+
"config",
|
|
18
|
+
"normalization",
|
|
19
|
+
"ci",
|
|
20
|
+
"host",
|
|
21
|
+
"playwright",
|
|
22
|
+
"runConditions",
|
|
23
|
+
"tests",
|
|
24
|
+
"evaluation",
|
|
25
|
+
"thresholdFiles",
|
|
26
|
+
"warnings",
|
|
27
|
+
"toolErrors",
|
|
28
|
+
"origins",
|
|
29
|
+
"endpoints",
|
|
30
|
+
"custom"
|
|
31
|
+
],
|
|
32
|
+
"properties": {
|
|
33
|
+
"schemaVersion": {"const": 1},
|
|
34
|
+
"tool": {"$ref": "common.schema.json#/$defs/tool"},
|
|
35
|
+
"runId": {"$ref": "common.schema.json#/$defs/runId"},
|
|
36
|
+
"mode": {"$ref": "common.schema.json#/$defs/mode"},
|
|
37
|
+
"startedAt": {"description": "Reporter onBegin.", "$ref": "common.schema.json#/$defs/timestamp"},
|
|
38
|
+
"finishedAt": {"description": "Reporter onEnd, before writing files.", "$ref": "common.schema.json#/$defs/timestamp"},
|
|
39
|
+
"env": {"$ref": "common.schema.json#/$defs/envLabelOrNull"},
|
|
40
|
+
"configDir": {
|
|
41
|
+
"description": "Absolute directory of the Playwright config file; base for relative paths (01-REQ-21).",
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1
|
|
44
|
+
},
|
|
45
|
+
"config": {
|
|
46
|
+
"description": "Effective package config after merging with defaults (00, 4.4), in JSON form (02-REQ-17, 03).",
|
|
47
|
+
"$ref": "config.schema.json"
|
|
48
|
+
},
|
|
49
|
+
"normalization": {
|
|
50
|
+
"description": "Normalization fingerprint of this run (07-REQ-21); copied to generated.normalization of derived thresholds files and compared with it (09-REQ-04).",
|
|
51
|
+
"$ref": "common.schema.json#/$defs/fingerprint"
|
|
52
|
+
},
|
|
53
|
+
"ci": {
|
|
54
|
+
"description": "CI metadata read from well-known environment variables (02-REQ-28); null outside CI or when no known provider is detected and CI is unset.",
|
|
55
|
+
"oneOf": [{"$ref": "#/$defs/ciInfo"}, {"type": "null"}]
|
|
56
|
+
},
|
|
57
|
+
"host": {
|
|
58
|
+
"description": "Machine that ran the tests (02-REQ-28).",
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"required": ["platform", "arch", "nodeVersion", "ci", "cpuCount", "cpuModel"],
|
|
62
|
+
"properties": {
|
|
63
|
+
"platform": {"description": "process.platform", "type": "string"},
|
|
64
|
+
"arch": {"description": "process.arch", "type": "string"},
|
|
65
|
+
"nodeVersion": {"description": "process.version", "type": "string"},
|
|
66
|
+
"ci": {"description": "True when the CI environment variable is set.", "type": "boolean"},
|
|
67
|
+
"cpuCount": {"description": "os.availableParallelism()", "type": "integer", "minimum": 1},
|
|
68
|
+
"cpuModel": {"description": "os.cpus()[0].model, trimmed; empty string when unknown.", "type": "string"}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"playwright": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": ["version"],
|
|
75
|
+
"properties": {"version": {"description": "FullConfig.version", "type": "string"}}
|
|
76
|
+
},
|
|
77
|
+
"runConditions": {
|
|
78
|
+
"description": "Effective run conditions read from FullConfig in onBegin (ADR-0006).",
|
|
79
|
+
"type": "object",
|
|
80
|
+
"additionalProperties": false,
|
|
81
|
+
"required": ["workers", "projects", "overriddenSettings"],
|
|
82
|
+
"properties": {
|
|
83
|
+
"workers": {"type": "integer", "minimum": 1},
|
|
84
|
+
"projects": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": ["name", "role", "browserName", "repeatEach", "retries"],
|
|
90
|
+
"properties": {
|
|
91
|
+
"name": {"description": "Project name; empty string for the default project.", "type": "string"},
|
|
92
|
+
"role": {
|
|
93
|
+
"description": "measured: repeated and measured; dependency / teardown: referenced by another project, not repeated (D-04).",
|
|
94
|
+
"enum": ["measured", "dependency", "teardown"]
|
|
95
|
+
},
|
|
96
|
+
"browserName": {"oneOf": [{"type": "string"}, {"type": "null"}]},
|
|
97
|
+
"repeatEach": {"type": "integer", "minimum": 1},
|
|
98
|
+
"retries": {"type": "integer", "minimum": 0}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"overriddenSettings": {
|
|
103
|
+
"description": "Playwright settings changed by withPerf(), e.g. 'use.video', 'retries' (01-REQ-37).",
|
|
104
|
+
"type": "array",
|
|
105
|
+
"items": {"type": "string"}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"tests": {
|
|
110
|
+
"description": "Functional test results, independent of the evaluation (P-08). Counters follow TestCase.outcome().",
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"required": ["status", "expected", "unexpected", "flaky", "skipped"],
|
|
114
|
+
"properties": {
|
|
115
|
+
"status": {"$ref": "common.schema.json#/$defs/testsStatus"},
|
|
116
|
+
"expected": {"$ref": "common.schema.json#/$defs/count"},
|
|
117
|
+
"unexpected": {"$ref": "common.schema.json#/$defs/count"},
|
|
118
|
+
"flaky": {"$ref": "common.schema.json#/$defs/count"},
|
|
119
|
+
"skipped": {"$ref": "common.schema.json#/$defs/count"}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"evaluation": {
|
|
123
|
+
"description": "Run-level evaluation summary. Per-key details live in endpoints/custom (02-REQ-15).",
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": ["status", "gateEnabled", "counts"],
|
|
127
|
+
"properties": {
|
|
128
|
+
"status": {"$ref": "common.schema.json#/$defs/evaluationStatus"},
|
|
129
|
+
"gateEnabled": {"description": "False in thresholds mode.", "type": "boolean"},
|
|
130
|
+
"counts": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"additionalProperties": false,
|
|
133
|
+
"required": ["api", "custom"],
|
|
134
|
+
"properties": {"api": {"$ref": "#/$defs/evaluationCounts"}, "custom": {"$ref": "#/$defs/evaluationCounts"}}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"thresholdFiles": {
|
|
139
|
+
"description": "Thresholds files the reporter tried to load.",
|
|
140
|
+
"type": "array",
|
|
141
|
+
"items": {"$ref": "#/$defs/thresholdFileInfo"}
|
|
142
|
+
},
|
|
143
|
+
"warnings": {"type": "array", "items": {"$ref": "common.schema.json#/$defs/issue"}},
|
|
144
|
+
"toolErrors": {
|
|
145
|
+
"description": "Problems that make the run result incomplete or untrustworthy; non-empty means exit code 3 (09-REQ-23). Collector and custom measurement diagnostics go to warnings.",
|
|
146
|
+
"type": "array",
|
|
147
|
+
"items": {"$ref": "common.schema.json#/$defs/issue"}
|
|
148
|
+
},
|
|
149
|
+
"origins": {
|
|
150
|
+
"description": "Origins of measured requests and their labels (07-REQ-03), sorted by origin. Shows which backend the run measured.",
|
|
151
|
+
"type": "array",
|
|
152
|
+
"items": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"additionalProperties": false,
|
|
155
|
+
"required": ["origin", "label", "requestCount"],
|
|
156
|
+
"properties": {
|
|
157
|
+
"origin": {"description": "Canonical origin (scheme, host, port).", "type": "string", "minLength": 1},
|
|
158
|
+
"label": {"description": "Label used in keys; empty string for the base origin.", "type": "string"},
|
|
159
|
+
"requestCount": {"$ref": "common.schema.json#/$defs/count"}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"endpoints": {
|
|
164
|
+
"description": "Aggregates of backend endpoints by normalized key.",
|
|
165
|
+
"type": "object",
|
|
166
|
+
"propertyNames": {"$ref": "common.schema.json#/$defs/key"},
|
|
167
|
+
"additionalProperties": {"$ref": "#/$defs/aggregate"}
|
|
168
|
+
},
|
|
169
|
+
"custom": {
|
|
170
|
+
"description": "Aggregates of custom measurements by name.",
|
|
171
|
+
"type": "object",
|
|
172
|
+
"propertyNames": {"$ref": "common.schema.json#/$defs/key"},
|
|
173
|
+
"additionalProperties": {"$ref": "#/$defs/aggregate"}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"$defs": {
|
|
177
|
+
"evaluationCounts": {
|
|
178
|
+
"type": "object",
|
|
179
|
+
"additionalProperties": false,
|
|
180
|
+
"required": [
|
|
181
|
+
"keys",
|
|
182
|
+
"fromFile",
|
|
183
|
+
"fromDefaults",
|
|
184
|
+
"notEvaluated",
|
|
185
|
+
"tooFewSamples",
|
|
186
|
+
"fileEntriesNotEvaluated",
|
|
187
|
+
"medianOnly",
|
|
188
|
+
"unseenThresholdEntries",
|
|
189
|
+
"violations",
|
|
190
|
+
"blockingViolations",
|
|
191
|
+
"muted"
|
|
192
|
+
],
|
|
193
|
+
"properties": {
|
|
194
|
+
"keys": {"description": "Keys seen in the run.", "$ref": "common.schema.json#/$defs/count"},
|
|
195
|
+
"fromFile": {"description": "Keys evaluated with thresholds from the file.", "$ref": "common.schema.json#/$defs/count"},
|
|
196
|
+
"fromDefaults": {"description": "Keys evaluated with default thresholds.", "$ref": "common.schema.json#/$defs/count"},
|
|
197
|
+
"notEvaluated": {"description": "Keys not evaluated, for any reason.", "$ref": "common.schema.json#/$defs/count"},
|
|
198
|
+
"tooFewSamples": {
|
|
199
|
+
"description": "Keys not evaluated because no rule had enough samples (part of notEvaluated).",
|
|
200
|
+
"$ref": "common.schema.json#/$defs/count"
|
|
201
|
+
},
|
|
202
|
+
"fileEntriesNotEvaluated": {
|
|
203
|
+
"description": "Keys with an entry in the thresholds file that were seen but not evaluated: too few samples (part of tooFewSamples, 09-REQ-17).",
|
|
204
|
+
"$ref": "common.schema.json#/$defs/count"
|
|
205
|
+
},
|
|
206
|
+
"medianOnly": {
|
|
207
|
+
"description": "Evaluated keys for which median was the only time rule run (too few samples for the percentile rule).",
|
|
208
|
+
"$ref": "common.schema.json#/$defs/count"
|
|
209
|
+
},
|
|
210
|
+
"unseenThresholdEntries": {
|
|
211
|
+
"description": "Entries in the thresholds file whose key did not occur in the run.",
|
|
212
|
+
"$ref": "common.schema.json#/$defs/count"
|
|
213
|
+
},
|
|
214
|
+
"violations": {"description": "Keys with at least one failed check.", "$ref": "common.schema.json#/$defs/count"},
|
|
215
|
+
"blockingViolations": {"description": "Keys with at least one blocking failed check.", "$ref": "common.schema.json#/$defs/count"},
|
|
216
|
+
"muted": {"description": "Keys with active (not expired) muting.", "$ref": "common.schema.json#/$defs/count"}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"thresholdFileInfo": {
|
|
220
|
+
"type": "object",
|
|
221
|
+
"additionalProperties": false,
|
|
222
|
+
"required": ["kind", "path", "status", "generated", "unseenKeys"],
|
|
223
|
+
"properties": {
|
|
224
|
+
"kind": {"$ref": "common.schema.json#/$defs/kind"},
|
|
225
|
+
"path": {"description": "Path relative to configDir, with forward slashes.", "type": "string", "minLength": 1},
|
|
226
|
+
"status": {
|
|
227
|
+
"description": "loaded; missing (not an error, 00 4.5); invalid (tool error, exit code 3).",
|
|
228
|
+
"enum": ["loaded", "missing", "invalid"]
|
|
229
|
+
},
|
|
230
|
+
"generated": {
|
|
231
|
+
"description": "Copy of the file's 'generated' block; null when missing, invalid or hand-written.",
|
|
232
|
+
"oneOf": [{"type": "object"}, {"type": "null"}]
|
|
233
|
+
},
|
|
234
|
+
"unseenKeys": {
|
|
235
|
+
"description": "Keys present in the file but not seen in the run, sorted.",
|
|
236
|
+
"type": "array",
|
|
237
|
+
"items": {"$ref": "common.schema.json#/$defs/key"}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"aggregate": {
|
|
242
|
+
"description": "Statistics of all samples of one key (08).",
|
|
243
|
+
"type": "object",
|
|
244
|
+
"additionalProperties": false,
|
|
245
|
+
"required": [
|
|
246
|
+
"count",
|
|
247
|
+
"successCount",
|
|
248
|
+
"errorCount",
|
|
249
|
+
"fromFailedTests",
|
|
250
|
+
"testCount",
|
|
251
|
+
"statuses",
|
|
252
|
+
"timeSources",
|
|
253
|
+
"stats",
|
|
254
|
+
"ttfb",
|
|
255
|
+
"slowest",
|
|
256
|
+
"topTests",
|
|
257
|
+
"samples",
|
|
258
|
+
"evaluation"
|
|
259
|
+
],
|
|
260
|
+
"properties": {
|
|
261
|
+
"count": {"description": "All samples, successful or not.", "$ref": "common.schema.json#/$defs/count"},
|
|
262
|
+
"successCount": {
|
|
263
|
+
"description": "Successful samples with browser timing (endpoints) or outcome ok (custom); only these enter time statistics (08-REQ-02).",
|
|
264
|
+
"$ref": "common.schema.json#/$defs/count"
|
|
265
|
+
},
|
|
266
|
+
"errorCount": {
|
|
267
|
+
"description": "Samples counted as errors: endpoints with a status in checks.errors.statuses, custom measurements with outcome error or unfinished (08-REQ-05).",
|
|
268
|
+
"$ref": "common.schema.json#/$defs/count"
|
|
269
|
+
},
|
|
270
|
+
"fromFailedTests": {
|
|
271
|
+
"description": "Samples that came from tests that did not pass (D-05).",
|
|
272
|
+
"$ref": "common.schema.json#/$defs/count"
|
|
273
|
+
},
|
|
274
|
+
"testCount": {
|
|
275
|
+
"description": "Distinct tests in which the key occurred; repetitions of the same test count once (08-REQ-06).",
|
|
276
|
+
"$ref": "common.schema.json#/$defs/count"
|
|
277
|
+
},
|
|
278
|
+
"statuses": {
|
|
279
|
+
"description": "Sample count per status. Endpoints: HTTP code, FAILED (failed without response), ABORTED (cancelled by the browser), PENDING (in flight at test end). Custom: ok, error, unfinished (08-REQ-05).",
|
|
280
|
+
"type": "object",
|
|
281
|
+
"propertyNames": {"pattern": "^(?:[1-5][0-9]{2}|FAILED|ABORTED|PENDING|ok|error|unfinished)$"},
|
|
282
|
+
"additionalProperties": {"type": "integer", "minimum": 1}
|
|
283
|
+
},
|
|
284
|
+
"timeSources": {
|
|
285
|
+
"type": "object",
|
|
286
|
+
"additionalProperties": false,
|
|
287
|
+
"required": ["browser", "node"],
|
|
288
|
+
"properties": {"browser": {"$ref": "common.schema.json#/$defs/count"}, "node": {"$ref": "common.schema.json#/$defs/count"}}
|
|
289
|
+
},
|
|
290
|
+
"stats": {
|
|
291
|
+
"description": "Time statistics of successful samples; null when successCount is 0.",
|
|
292
|
+
"oneOf": [{"$ref": "#/$defs/stats"}, {"type": "null"}]
|
|
293
|
+
},
|
|
294
|
+
"ttfb": {
|
|
295
|
+
"description": "TTFB of successful samples that have it. Null for custom measurements and when no sample has TTFB.",
|
|
296
|
+
"oneOf": [
|
|
297
|
+
{
|
|
298
|
+
"type": "object",
|
|
299
|
+
"additionalProperties": false,
|
|
300
|
+
"required": ["p50", "p95"],
|
|
301
|
+
"properties": {"p50": {"$ref": "common.schema.json#/$defs/ms"}, "p95": {"$ref": "common.schema.json#/$defs/ms"}}
|
|
302
|
+
},
|
|
303
|
+
{"type": "null"}
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
"slowest": {
|
|
307
|
+
"description": "Up to 3 slowest successful samples, slowest first.",
|
|
308
|
+
"type": "array",
|
|
309
|
+
"maxItems": 3,
|
|
310
|
+
"items": {"$ref": "#/$defs/slowSample"}
|
|
311
|
+
},
|
|
312
|
+
"topTests": {
|
|
313
|
+
"description": "Up to 5 tests with the most samples of this key (08-REQ-33), most samples first.",
|
|
314
|
+
"type": "array",
|
|
315
|
+
"maxItems": 5,
|
|
316
|
+
"items": {
|
|
317
|
+
"type": "object",
|
|
318
|
+
"additionalProperties": false,
|
|
319
|
+
"required": ["title", "project", "file", "line", "sampleCount"],
|
|
320
|
+
"properties": {
|
|
321
|
+
"title": {"type": "string"},
|
|
322
|
+
"project": {"type": "string"},
|
|
323
|
+
"file": {"type": "string"},
|
|
324
|
+
"line": {"type": "integer", "minimum": 1},
|
|
325
|
+
"sampleCount": {"description": "Samples of this key from all repetitions of the test.", "type": "integer", "minimum": 1}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"samples": {
|
|
330
|
+
"description": "Retained successful durations, used to derive thresholds without rerunning tests (thresholds --from).",
|
|
331
|
+
"type": "object",
|
|
332
|
+
"additionalProperties": false,
|
|
333
|
+
"required": ["durations", "sampled"],
|
|
334
|
+
"properties": {
|
|
335
|
+
"durations": {
|
|
336
|
+
"description": "Sorted ascending. At most advanced.maxSamplesPerKey values (08).",
|
|
337
|
+
"type": "array",
|
|
338
|
+
"items": {"$ref": "common.schema.json#/$defs/ms"}
|
|
339
|
+
},
|
|
340
|
+
"sampled": {
|
|
341
|
+
"description": "True when successCount exceeded the limit and durations is a seeded uniform sample (P-06).",
|
|
342
|
+
"type": "boolean"
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"evaluation": {"$ref": "#/$defs/keyEvaluation"}
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"stats": {
|
|
350
|
+
"type": "object",
|
|
351
|
+
"additionalProperties": false,
|
|
352
|
+
"required": ["min", "avg", "max", "percentiles"],
|
|
353
|
+
"properties": {
|
|
354
|
+
"min": {"$ref": "common.schema.json#/$defs/ms"},
|
|
355
|
+
"avg": {"$ref": "common.schema.json#/$defs/ms"},
|
|
356
|
+
"max": {"$ref": "common.schema.json#/$defs/ms"},
|
|
357
|
+
"percentiles": {
|
|
358
|
+
"description": "Always p50, p90, p95, p99, plus the evaluated percentile when it is another one (08).",
|
|
359
|
+
"type": "object",
|
|
360
|
+
"required": ["p50", "p90", "p95", "p99"],
|
|
361
|
+
"propertyNames": {"$ref": "common.schema.json#/$defs/percentileName"},
|
|
362
|
+
"additionalProperties": {"$ref": "common.schema.json#/$defs/ms"}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"slowSample": {
|
|
367
|
+
"type": "object",
|
|
368
|
+
"additionalProperties": false,
|
|
369
|
+
"required": ["duration", "startedAt", "test"],
|
|
370
|
+
"properties": {
|
|
371
|
+
"duration": {"$ref": "common.schema.json#/$defs/ms"},
|
|
372
|
+
"startedAt": {
|
|
373
|
+
"description": "Start of the request (startTime) or of the custom measurement (endTime - duration), UTC.",
|
|
374
|
+
"$ref": "common.schema.json#/$defs/timestamp"
|
|
375
|
+
},
|
|
376
|
+
"test": {"$ref": "#/$defs/testRef"},
|
|
377
|
+
"url": {
|
|
378
|
+
"description": "Raw URL. Present only when raw URLs are enabled in config (D-11, 02-REQ-16).",
|
|
379
|
+
"type": "string",
|
|
380
|
+
"minLength": 1
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
"testRef": {
|
|
385
|
+
"type": "object",
|
|
386
|
+
"additionalProperties": false,
|
|
387
|
+
"required": ["title", "project", "file", "line", "repeatEachIndex"],
|
|
388
|
+
"properties": {
|
|
389
|
+
"title": {"description": "Titles from the outermost describe to the test, joined with ' › '.", "type": "string"},
|
|
390
|
+
"project": {"type": "string"},
|
|
391
|
+
"file": {"description": "Relative to configDir, with forward slashes.", "type": "string"},
|
|
392
|
+
"line": {"type": "integer", "minimum": 1},
|
|
393
|
+
"repeatEachIndex": {"type": "integer", "minimum": 0}
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
"keyEvaluation": {
|
|
397
|
+
"description": "Evaluation of one key (rules: 09).",
|
|
398
|
+
"type": "object",
|
|
399
|
+
"additionalProperties": false,
|
|
400
|
+
"required": ["result", "reason", "thresholdSource", "limits", "checks", "muted"],
|
|
401
|
+
"properties": {
|
|
402
|
+
"result": {"enum": ["pass", "fail", "not-evaluated"]},
|
|
403
|
+
"reason": {
|
|
404
|
+
"description": "Why the key was not evaluated (P-10): too-few-samples (no enabled rule had enough samples), no-rules (all applicable rules disabled), thresholds-error (the thresholds file of this kind is invalid, 09-REQ-12). Null otherwise.",
|
|
405
|
+
"oneOf": [{"enum": ["too-few-samples", "no-rules", "thresholds-error"]}, {"type": "null"}]
|
|
406
|
+
},
|
|
407
|
+
"thresholdSource": {"description": "Where the applicable limits come from.", "enum": ["file", "default"]},
|
|
408
|
+
"limits": {
|
|
409
|
+
"description": "Limits applied to this key after filling missing ones from the rule limits in the config (02-REQ-21, 09-REQ-06). t, minApdex and maxWilson are null when the apdex and wilson rules do not apply (default thresholds, or a file entry without t); with t set, a missing minApdex or maxWilson comes from checks.slowShare.apdex.limit / wilson.limit.",
|
|
410
|
+
"type": "object",
|
|
411
|
+
"additionalProperties": false,
|
|
412
|
+
"required": ["t", "median", "percentile", "p99", "minApdex", "maxWilson", "maxErrorRate"],
|
|
413
|
+
"properties": {
|
|
414
|
+
"t": {"oneOf": [{"$ref": "common.schema.json#/$defs/msLimit"}, {"type": "null"}]},
|
|
415
|
+
"median": {"$ref": "common.schema.json#/$defs/msLimit"},
|
|
416
|
+
"percentile": {"$ref": "common.schema.json#/$defs/msLimit"},
|
|
417
|
+
"p99": {"$ref": "common.schema.json#/$defs/msLimit"},
|
|
418
|
+
"minApdex": {"oneOf": [{"$ref": "common.schema.json#/$defs/ratio"}, {"type": "null"}]},
|
|
419
|
+
"maxWilson": {"oneOf": [{"$ref": "common.schema.json#/$defs/ratio"}, {"type": "null"}]},
|
|
420
|
+
"maxErrorRate": {"$ref": "common.schema.json#/$defs/ratio"}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"checks": {
|
|
424
|
+
"description": "Checks that were run (which ones depends on the sample count, 09). Empty when not evaluated.",
|
|
425
|
+
"type": "array",
|
|
426
|
+
"items": {"$ref": "#/$defs/check"}
|
|
427
|
+
},
|
|
428
|
+
"muted": {
|
|
429
|
+
"description": "Muting from the thresholds file entry (gate: warn, 09-REQ-26), or null when the entry is not muted or the key has no entry.",
|
|
430
|
+
"oneOf": [
|
|
431
|
+
{
|
|
432
|
+
"type": "object",
|
|
433
|
+
"additionalProperties": false,
|
|
434
|
+
"required": ["until", "note", "expired"],
|
|
435
|
+
"properties": {
|
|
436
|
+
"until": {"type": "string", "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$"},
|
|
437
|
+
"note": {"type": "string", "minLength": 1},
|
|
438
|
+
"expired": {"description": "True when the run started after 'until': muting no longer applies.", "type": "boolean"}
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
{"type": "null"}
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"check": {
|
|
447
|
+
"type": "object",
|
|
448
|
+
"additionalProperties": false,
|
|
449
|
+
"required": ["rule", "n", "actual", "observed", "limit", "passed", "hardLimitExceeded", "blocking"],
|
|
450
|
+
"properties": {
|
|
451
|
+
"rule": {
|
|
452
|
+
"description": "Rule name (09, 5.2). apdex, wilson and errors compare a bound of a 95% interval (09-REQ-09).",
|
|
453
|
+
"enum": ["median", "percentile", "p99", "apdex", "wilson", "errors"]
|
|
454
|
+
},
|
|
455
|
+
"n": {
|
|
456
|
+
"description": "Samples the rule used: retained timing samples for time, apdex and wilson rules, all samples of the key for errors.",
|
|
457
|
+
"type": "integer",
|
|
458
|
+
"minimum": 1
|
|
459
|
+
},
|
|
460
|
+
"actual": {
|
|
461
|
+
"description": "Value compared with the limit: ms for median/percentile/p99; for apdex the upper bound, for wilson and errors the lower bound of the 95% interval.",
|
|
462
|
+
"type": "number",
|
|
463
|
+
"minimum": 0
|
|
464
|
+
},
|
|
465
|
+
"observed": {
|
|
466
|
+
"description": "Point estimate behind a bound: Apdex score, share of samples slower than T, error rate. Null for time rules.",
|
|
467
|
+
"oneOf": [{"type": "number", "minimum": 0, "maximum": 1}, {"type": "null"}]
|
|
468
|
+
},
|
|
469
|
+
"limit": {"type": "number", "minimum": 0},
|
|
470
|
+
"passed": {"type": "boolean"},
|
|
471
|
+
"hardLimitExceeded": {
|
|
472
|
+
"description": "Time rules only (median, percentile, p99): the value exceeds limit x gate.hardLimitFactor (09-REQ-11). Always false for apdex, wilson and errors.",
|
|
473
|
+
"type": "boolean"
|
|
474
|
+
},
|
|
475
|
+
"blocking": {
|
|
476
|
+
"description": "This failed check fails the run under the gate policy (D-16, D-17). False for passed checks.",
|
|
477
|
+
"type": "boolean"
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
"ciInfo": {
|
|
482
|
+
"type": "object",
|
|
483
|
+
"additionalProperties": false,
|
|
484
|
+
"required": ["provider", "commit", "branch", "buildUrl"],
|
|
485
|
+
"properties": {
|
|
486
|
+
"provider": {
|
|
487
|
+
"description": "github, gitlab, jenkins, azure, or other (CI set, provider unknown).",
|
|
488
|
+
"enum": ["github", "gitlab", "jenkins", "azure", "other"]
|
|
489
|
+
},
|
|
490
|
+
"commit": {
|
|
491
|
+
"description": "Commit SHA, or null when unknown.",
|
|
492
|
+
"oneOf": [{"type": "string", "minLength": 1}, {"type": "null"}]
|
|
493
|
+
},
|
|
494
|
+
"branch": {
|
|
495
|
+
"description": "Branch name, or null when unknown.",
|
|
496
|
+
"oneOf": [{"type": "string", "minLength": 1}, {"type": "null"}]
|
|
497
|
+
},
|
|
498
|
+
"buildUrl": {
|
|
499
|
+
"description": "URL of the CI job or build, or null when unknown.",
|
|
500
|
+
"oneOf": [{"type": "string", "minLength": 1}, {"type": "null"}]
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|