playwright-performance-regression 0.1.0-next.1 → 0.1.0-next.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 +431 -0
- package/README.md +96 -64
- package/dist/{chunk-L5C63HEF.js → chunk-CISGJCFW.js} +378 -48
- package/dist/chunk-CXE5IWZY.js +1648 -0
- package/dist/{chunk-B64P2D5A.js → chunk-E2IX265O.js} +395 -206
- package/dist/chunk-IUI4AFE5.cjs +658 -0
- package/dist/{chunk-WZVQK7CQ.cjs → chunk-KELMALEG.cjs} +408 -218
- package/dist/{chunk-GCA73FFP.cjs → chunk-LUA4WRIQ.cjs} +382 -47
- package/dist/chunk-RL27E3AB.js +595 -0
- package/dist/{chunk-DYLCGMI2.js → chunk-S6UH6QPK.js} +6 -1
- package/dist/cli.js +2761 -2339
- package/dist/config.cjs +122 -137
- package/dist/config.d.cts +3 -2
- package/dist/config.d.ts +3 -2
- package/dist/config.js +117 -132
- package/dist/fixture.cjs +9 -5
- package/dist/fixture.d.cts +10 -4
- package/dist/fixture.d.ts +10 -4
- package/dist/fixture.js +4 -4
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +121 -25
- package/dist/index.d.ts +121 -25
- package/dist/index.js +1 -1
- package/dist/perf-api-2DH_keLh.d.cts +17 -0
- package/dist/perf-api-2DH_keLh.d.ts +17 -0
- package/dist/reporter.cjs +5713 -1237
- package/dist/reporter.js +6905 -693
- package/dist/test.cjs +4 -4
- package/dist/test.js +4 -4
- package/package.json +19 -1
- package/schemas/common.schema.json +2 -2
- package/schemas/config.schema.json +72 -26
- package/schemas/outcome.schema.json +2 -2
- package/schemas/run-report.schema.json +549 -20
- package/schemas/samples.schema.json +48 -37
- package/schemas/thresholds.schema.json +1 -1
- package/dist/chunk-3CLCMD2Q.js +0 -3411
- package/dist/chunk-4SFI55HF.cjs +0 -319
- package/dist/chunk-HBGADXLP.js +0 -254
- package/dist/perf-api-V4PeHVE0.d.cts +0 -22
- package/dist/perf-api-V4PeHVE0.d.ts +0 -22
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://pkg.invalid/schemas/samples.schema.json",
|
|
4
4
|
"title": "Sample batch",
|
|
5
|
-
"description": "Raw samples collected during one test execution, attached to the test result as the '
|
|
5
|
+
"description": "Raw samples collected during one test execution, attached to the test result as the 'pw-perf-samples' attachment (ADR-0003). In perf mode every test in a measured project gets this attachment, even when it is empty (05-REQ-15). Written by the collector, read by the reporter. Test metadata is not included; the reporter adds it from TestCase/TestResult.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
|
-
"required": ["schemaVersion", "collector", "requests", "
|
|
8
|
+
"required": ["schemaVersion", "collector", "requests", "apiRequests", "diagnostics"],
|
|
9
9
|
"properties": {
|
|
10
|
-
"schemaVersion": {"const":
|
|
10
|
+
"schemaVersion": {"const": 3},
|
|
11
11
|
"collector": {
|
|
12
12
|
"description": "Collector that produced the batch.",
|
|
13
13
|
"type": "object",
|
|
@@ -31,18 +31,59 @@
|
|
|
31
31
|
"type": "array",
|
|
32
32
|
"items": {"$ref": "#/$defs/requestSample"}
|
|
33
33
|
},
|
|
34
|
-
"
|
|
35
|
-
"description": "
|
|
34
|
+
"apiRequests": {
|
|
35
|
+
"description": "Calls of APIRequestContext methods (request fixture, page.request, context.request, trackRequestContext; 15) in the order they finished; calls still running when the end-of-test wait ran out come last, with status PENDING. The reporter keys them with the prefix 'request ' (15-REQ-01).",
|
|
36
36
|
"type": "array",
|
|
37
|
-
"items": {"$ref": "#/$defs/
|
|
37
|
+
"items": {"$ref": "#/$defs/apiRequestSample"}
|
|
38
38
|
},
|
|
39
39
|
"diagnostics": {
|
|
40
|
-
"description": "Collector
|
|
40
|
+
"description": "Collector diagnostics caught during the test (01-REQ-13, 05 §9). Repeated issues are collapsed using 'count'. The reporter turns every diagnostic into an entry in 'warnings' (09-REQ-23); none of them is a tool error.",
|
|
41
41
|
"type": "array",
|
|
42
42
|
"items": {"$ref": "common.schema.json#/$defs/issue"}
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"$defs": {
|
|
46
|
+
"apiRequestSample": {
|
|
47
|
+
"description": "One call of an APIRequestContext method, timed with the worker's clock (15-REQ-05).",
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"required": ["method", "url", "status", "startTime", "duration", "source"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"method": {"description": "HTTP method, uppercase (fetch without a method: GET).", "type": "string", "pattern": "^[A-Z]+$"},
|
|
53
|
+
"url": {
|
|
54
|
+
"description": "Called URL: absolute as given, a relative one resolved against the test's baseURL, otherwise response.url() or the text of the call (15-REQ-05). Never written to thresholds files (P-07).",
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1
|
|
57
|
+
},
|
|
58
|
+
"status": {
|
|
59
|
+
"description": "HTTP status code; FAILED when the call threw; PENDING when it was still running after the end-of-test wait (15-REQ-08).",
|
|
60
|
+
"oneOf": [{"type": "integer", "minimum": 100, "maximum": 599}, {"const": "FAILED"}, {"const": "PENDING"}]
|
|
61
|
+
},
|
|
62
|
+
"failureText": {
|
|
63
|
+
"description": "First line of the error message of the call. Present only when status is FAILED.",
|
|
64
|
+
"type": "string",
|
|
65
|
+
"minLength": 1
|
|
66
|
+
},
|
|
67
|
+
"startTime": {"description": "Date.now() when the method was called, whole ms.", "$ref": "common.schema.json#/$defs/epochMs"},
|
|
68
|
+
"duration": {
|
|
69
|
+
"description": "From the call to the settled promise (performance.now() in the worker), including reading the whole body. Null for FAILED and PENDING.",
|
|
70
|
+
"$ref": "common.schema.json#/$defs/msOrNull"
|
|
71
|
+
},
|
|
72
|
+
"source": {
|
|
73
|
+
"description": "request: the request fixture; context: page.request or context.request; tracked: a context passed to trackRequestContext(). Informational: all give keys with the same prefix (15-REQ-05).",
|
|
74
|
+
"enum": ["request", "context", "tracked"]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"if": {"properties": {"status": {"const": "FAILED"}}},
|
|
78
|
+
"then": {"required": ["failureText"]},
|
|
79
|
+
"else": {"not": {"required": ["failureText"]}},
|
|
80
|
+
"allOf": [
|
|
81
|
+
{
|
|
82
|
+
"if": {"properties": {"status": {"enum": ["FAILED", "PENDING"]}}},
|
|
83
|
+
"then": {"properties": {"duration": {"type": "null"}}}
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
46
87
|
"requestSample": {
|
|
47
88
|
"description": "One backend request observed in a tracked browser context, after collector filters (05).",
|
|
48
89
|
"type": "object",
|
|
@@ -134,36 +175,6 @@
|
|
|
134
175
|
}
|
|
135
176
|
}
|
|
136
177
|
]
|
|
137
|
-
},
|
|
138
|
-
"customSample": {
|
|
139
|
-
"description": "One custom measurement (06).",
|
|
140
|
-
"type": "object",
|
|
141
|
-
"additionalProperties": false,
|
|
142
|
-
"required": ["name", "outcome", "duration", "endTime"],
|
|
143
|
-
"properties": {
|
|
144
|
-
"name": {
|
|
145
|
-
"description": "Measurement name given by the user (06-REQ-03): 1–200 characters, no leading or trailing whitespace, no control characters.",
|
|
146
|
-
"type": "string",
|
|
147
|
-
"minLength": 1,
|
|
148
|
-
"maxLength": 200,
|
|
149
|
-
"pattern": "^[^\\s\\u0000-\\u001F\\u007F](?:[^\\u0000-\\u001F\\u007F]*[^\\s\\u0000-\\u001F\\u007F])?$"
|
|
150
|
-
},
|
|
151
|
-
"outcome": {
|
|
152
|
-
"description": "ok: finished normally; error: the measured function threw; unfinished: started but never ended before test end. Meaning of each outcome for statistics: 06, 08.",
|
|
153
|
-
"enum": ["ok", "error", "unfinished"]
|
|
154
|
-
},
|
|
155
|
-
"duration": {
|
|
156
|
-
"description": "Measured duration (performance.now()). Null for unfinished.",
|
|
157
|
-
"$ref": "common.schema.json#/$defs/msOrNull"
|
|
158
|
-
},
|
|
159
|
-
"endTime": {
|
|
160
|
-
"description": "Wall-clock end time. Null for unfinished.",
|
|
161
|
-
"oneOf": [{"$ref": "common.schema.json#/$defs/epochMs"}, {"type": "null"}]
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
"if": {"properties": {"outcome": {"const": "unfinished"}}},
|
|
165
|
-
"then": {"properties": {"duration": {"type": "null"}, "endTime": {"type": "null"}}},
|
|
166
|
-
"else": {"properties": {"duration": {"type": "number"}, "endTime": {"type": "integer"}}}
|
|
167
178
|
}
|
|
168
179
|
}
|
|
169
180
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": ["schemaVersion", "kind", "generated", "entries"],
|
|
9
9
|
"properties": {
|
|
10
|
-
"schemaVersion": {"const":
|
|
10
|
+
"schemaVersion": {"const": 2},
|
|
11
11
|
"kind": {"$ref": "common.schema.json#/$defs/kind"},
|
|
12
12
|
"generated": {
|
|
13
13
|
"description": "How the file was derived. Null for a file written entirely by hand. Contains no wall-clock time of generation, so deriving twice from the same report gives identical files (S-04).",
|