playwright-performance-regression 1.0.1 → 1.1.0

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/dist/test.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkCTE5EY35_cjs = require('./chunk-CTE5EY35.cjs');
4
- require('./chunk-LEIBG5A4.cjs');
5
- require('./chunk-W7NEFS5V.cjs');
3
+ var chunkVBNIFMNE_cjs = require('./chunk-VBNIFMNE.cjs');
4
+ require('./chunk-VXGTC6DB.cjs');
5
+ require('./chunk-VYODYUEL.cjs');
6
6
  var test$1 = require('@playwright/test');
7
7
 
8
- var test = chunkCTE5EY35_cjs.withPerfFixtures(test$1.test);
8
+ var test = chunkVBNIFMNE_cjs.withPerfFixtures(test$1.test);
9
9
 
10
10
  Object.defineProperty(exports, "expect", {
11
11
  enumerable: true,
package/dist/test.js CHANGED
@@ -1,7 +1,6 @@
1
- import { withPerfFixtures } from './chunk-ZHJQFWES.js';
2
- import './chunk-S6UH6QPK.js';
3
- import './chunk-ORWOFAZ5.js';
4
- import './chunk-5Y34Q4DR.js';
1
+ import { withPerfFixtures } from './chunk-PTQWKPHU.js';
2
+ import './chunk-ZEQ2IGDC.js';
3
+ import './chunk-Q73KMM6D.js';
5
4
  import { test as test$1 } from '@playwright/test';
6
5
  export { expect } from '@playwright/test';
7
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-performance-regression",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Catch backend performance regressions from the Playwright tests you already have.",
5
5
  "keywords": [
6
6
  "playwright",
@@ -144,8 +144,8 @@
144
144
  "devDependencies": {
145
145
  "@arethetypeswrong/cli": "0.18.5",
146
146
  "@eslint/js": "^10.0.1",
147
- "@playwright/test": "1.57.0",
148
- "@types/node": "^22.20.5",
147
+ "@playwright/test": "1.65.1",
148
+ "@types/node": "^26.6.6",
149
149
  "ajv": "8.20.0",
150
150
  "axe-core": "4.14.1",
151
151
  "esbuild": "0.28.2",
@@ -144,6 +144,13 @@
144
144
  "items": {"type": "string", "pattern": "^(?:[1-5]xx|[1-5][0-9]{2})$"},
145
145
  "default": ["2xx", "3xx"]
146
146
  },
147
+ "coldSamples": {
148
+ "description": "The first N timed samples of every key in each pass are cold (first call after the start of the application, which webServer starts again in every pass): they stay out of the evaluated time statistics when at least checks.time.median.minSamples warm samples are left (08-REQ-41, 08-REQ-42). 0 turns it off.",
149
+ "type": "integer",
150
+ "minimum": 0,
151
+ "maximum": 5,
152
+ "default": 1
153
+ },
147
154
  "steps": {
148
155
  "description": "Durations of test.step steps as keys of kind 'step' (06). true (default) enables with defaults, false disables, an object enables with settings (03-REQ-18).",
149
156
  "default": true,
@@ -245,6 +252,20 @@
245
252
  "items": {"type": "string", "minLength": 1},
246
253
  "default": []
247
254
  },
255
+ "operations": {
256
+ "description": "Endpoints that get a key per operation (18): GraphQL ('graphql': operationName or the first named operation, batches by the sorted names) and tRPC ('trpc': procedure names from the path), e.g. [{\"type\": \"graphql\", \"match\": \"/graphql\"}] gives 'POST /graphql#GetTickets'. match is tested against the URL path without the query; the first matching entry wins. The request body is read only for POST requests matching a graphql entry, up to 64 KB, in the worker, and never written anywhere.",
257
+ "type": "array",
258
+ "items": {
259
+ "type": "object",
260
+ "additionalProperties": false,
261
+ "required": ["type", "match"],
262
+ "properties": {
263
+ "type": {"description": "Built-in operation extractor.", "enum": ["graphql", "trpc"]},
264
+ "match": {"$ref": "#/$defs/urlPattern", "description": "A string matches as a case-sensitive substring of the URL path; {regex, flags} is a JavaScript regular expression tested against the path."}
265
+ }
266
+ },
267
+ "default": []
268
+ },
248
269
  "keyBuilder": {
249
270
  "description": "Snapshot only: \"[function]\" when a custom keyBuilder function was configured (TypeScript/JavaScript config).",
250
271
  "const": "[function]"
@@ -640,6 +661,53 @@
640
661
  }
641
662
  }
642
663
  }
664
+ },
665
+ "nonSuccess": {
666
+ "description": "Share of responses outside measure.successStatuses (e.g. fast 401s) must not exceed the limit; lower Wilson bound compared (09-REQ-38). Endpoint keys only.",
667
+ "type": "object",
668
+ "additionalProperties": false,
669
+ "default": {},
670
+ "properties": {
671
+ "enabled": {"description": "Run this rule.", "type": "boolean", "default": true},
672
+ "minSamples": {
673
+ "description": "Minimum samples for the rule to run (09-REQ-07).",
674
+ "type": "integer",
675
+ "minimum": 1,
676
+ "default": 5
677
+ },
678
+ "limit": {
679
+ "description": "Limit for keys without an entry in the thresholds file. null (default): the rule runs only for keys whose entry has maxNonSuccessRate.",
680
+ "type": "object",
681
+ "additionalProperties": false,
682
+ "default": {},
683
+ "properties": {
684
+ "api": {"description": "Endpoint keys: maximum share of responses outside measure.successStatuses, or null.", "oneOf": [{"$ref": "common.schema.json#/$defs/ratio"}, {"type": "null"}], "default": null}
685
+ }
686
+ },
687
+ "margin": {
688
+ "description": "Headroom added to the source run value when deriving this limit (10, chapter 5).",
689
+ "type": "object",
690
+ "additionalProperties": false,
691
+ "default": {},
692
+ "properties": {
693
+ "factor": {
694
+ "type": "number",
695
+ "minimum": 0,
696
+ "maximum": 10,
697
+ "description": "Multiplier of the source non-success rate.",
698
+ "default": 1.5
699
+ },
700
+ "add": {
701
+ "type": "number",
702
+ "minimum": 0,
703
+ "maximum": 1,
704
+ "description": "Added after multiplying.",
705
+ "default": 0.02
706
+ },
707
+ "min": {"type": "number", "minimum": 0, "maximum": 1, "description": "Minimum derived limit.", "default": 0.05}
708
+ }
709
+ }
710
+ }
643
711
  }
644
712
  }
645
713
  },
@@ -735,6 +803,19 @@
735
803
  "minimum": 0,
736
804
  "maximum": 100,
737
805
  "default": 0.5
806
+ },
807
+ "workloadShift": {
808
+ "description": "Warning THRESHOLDS_WORKLOAD_SHIFT when a key gets a different number of samples per pass than in the thresholds run (09-REQ-41).",
809
+ "type": "object",
810
+ "additionalProperties": false,
811
+ "default": {},
812
+ "properties": {
813
+ "factor": {
814
+ "description": "Warn when samples per pass change by this factor or more in either direction; null turns the warning off.",
815
+ "oneOf": [{"type": "number", "exclusiveMinimum": 1, "maximum": 100}, {"type": "null"}],
816
+ "default": 2
817
+ }
818
+ }
738
819
  }
739
820
  }
740
821
  },
@@ -917,6 +998,16 @@
917
998
  "add": {"type": "number", "minimum": 0, "maximum": 1, "description": "Added after multiplying."},
918
999
  "min": {"type": "number", "minimum": 0, "maximum": 1, "description": "Minimum derived limit."}
919
1000
  }
1001
+ },
1002
+ "nonSuccess": {
1003
+ "description": "Since 1.1.0 (10-REQ-25); missing in files written by 1.0.x.",
1004
+ "type": "object",
1005
+ "additionalProperties": false,
1006
+ "properties": {
1007
+ "factor": {"type": "number", "minimum": 0, "maximum": 10, "description": "Multiplier of the source non-success rate."},
1008
+ "add": {"type": "number", "minimum": 0, "maximum": 1, "description": "Added after multiplying."},
1009
+ "min": {"type": "number", "minimum": 0, "maximum": 1, "description": "Minimum derived limit."}
1010
+ }
920
1011
  }
921
1012
  }
922
1013
  }
@@ -21,6 +21,7 @@
21
21
  "host",
22
22
  "playwright",
23
23
  "passes",
24
+ "shards",
24
25
  "runConditions",
25
26
  "tests",
26
27
  "evaluation",
@@ -33,7 +34,7 @@
33
34
  "testBreakdown"
34
35
  ],
35
36
  "properties": {
36
- "schemaVersion": {"const": 4},
37
+ "schemaVersion": {"const": 5},
37
38
  "tool": {"$ref": "common.schema.json#/$defs/tool"},
38
39
  "runId": {"$ref": "common.schema.json#/$defs/runId"},
39
40
  "mode": {"$ref": "common.schema.json#/$defs/mode"},
@@ -114,6 +115,46 @@
114
115
  }
115
116
  }
116
117
  },
118
+ "shards": {
119
+ "description": "Shards merged into this report (17-REQ-17): null for a run without shards, an object after PW_PERF_MODE=merge.",
120
+ "oneOf": [
121
+ {
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "required": ["total", "missing", "list"],
125
+ "properties": {
126
+ "total": {"description": "n of --shard=i/n.", "type": "integer", "minimum": 1},
127
+ "missing": {
128
+ "description": "Shard numbers without a shard file (MERGE_SHARD_MISSING), ascending.",
129
+ "type": "array",
130
+ "items": {"type": "integer", "minimum": 1}
131
+ },
132
+ "list": {
133
+ "description": "The merged shards by index, ascending.",
134
+ "type": "array",
135
+ "items": {
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "required": ["index", "runId", "startedAt", "finishedAt", "status", "passes", "tests", "samples", "host", "buildUrl"],
139
+ "properties": {
140
+ "index": {"description": "i of --shard=i/n.", "type": "integer", "minimum": 1},
141
+ "runId": {"$ref": "common.schema.json#/$defs/runId"},
142
+ "startedAt": {"$ref": "common.schema.json#/$defs/timestamp"},
143
+ "finishedAt": {"$ref": "common.schema.json#/$defs/timestamp"},
144
+ "status": {"$ref": "common.schema.json#/$defs/testsStatus"},
145
+ "passes": {"$ref": "#/properties/passes"},
146
+ "tests": {"$ref": "#/properties/tests"},
147
+ "samples": {"description": "Request and step samples of the shard.", "$ref": "common.schema.json#/$defs/count"},
148
+ "host": {"$ref": "#/properties/host"},
149
+ "buildUrl": {"description": "ci.buildUrl of the shard job, or null.", "oneOf": [{"type": "string", "minLength": 1}, {"type": "null"}]}
150
+ }
151
+ }
152
+ }
153
+ }
154
+ },
155
+ {"type": "null"}
156
+ ]
157
+ },
117
158
  "runConditions": {
118
159
  "description": "Effective run conditions read from FullConfig in onBegin (ADR-0006).",
119
160
  "type": "object",
@@ -327,7 +368,10 @@
327
368
  "samples",
328
369
  "evaluation",
329
370
  "histogram",
330
- "hints"
371
+ "hints",
372
+ "cold",
373
+ "nonSuccessCount",
374
+ "failedTimings"
331
375
  ],
332
376
  "properties": {
333
377
  "count": {"description": "All samples, successful or not.", "$ref": "common.schema.json#/$defs/count"},
@@ -450,6 +494,20 @@
450
494
  {"type": "null"}
451
495
  ]
452
496
  },
497
+ "cold": {
498
+ "description": "Cold samples: the first measure.coldSamples timed samples of the key in each pass (08-REQ-41, 08-REQ-43). Null when measure.coldSamples is 0 or the key has no timed samples.",
499
+ "oneOf": [{"$ref": "#/$defs/cold"}, {"type": "null"}]
500
+ },
501
+ "nonSuccessCount": {
502
+ "description": "Endpoints: samples with an HTTP status outside measure.successStatuses, whatever checks.errors.statuses says (08-REQ-46). Null for steps.",
503
+ "oneOf": [{"$ref": "common.schema.json#/$defs/count"}, {"type": "null"}]
504
+ },
505
+ "failedTimings": {
506
+ "description": "Endpoints: durations of the non-success samples per status, up to 5 statuses with the most samples (08-REQ-47); not part of the time statistics. Empty for steps.",
507
+ "type": "array",
508
+ "maxItems": 5,
509
+ "items": {"$ref": "#/$defs/failedTiming"}
510
+ },
453
511
  "hints": {
454
512
  "description": "Hints that explain the result of the key, in rule priority order (11-REQ-34); at most 3.",
455
513
  "type": "array",
@@ -478,6 +536,9 @@
478
536
  "evaluation",
479
537
  "histogram",
480
538
  "hints",
539
+ "cold",
540
+ "nonSuccessCount",
541
+ "failedTimings",
481
542
  "location",
482
543
  "stepErrorsFromFailedTests"
483
544
  ],
@@ -682,6 +743,20 @@
682
743
  }
683
744
  ]
684
745
  },
746
+ "cold": {
747
+ "description": "Cold samples: the first measure.coldSamples timed samples of the key in each pass (08-REQ-41, 08-REQ-43). Null when measure.coldSamples is 0 or the key has no timed samples.",
748
+ "oneOf": [{"$ref": "#/$defs/cold"}, {"type": "null"}]
749
+ },
750
+ "nonSuccessCount": {
751
+ "description": "Endpoints: samples with an HTTP status outside measure.successStatuses, whatever checks.errors.statuses says (08-REQ-46). Null for steps.",
752
+ "oneOf": [{"$ref": "common.schema.json#/$defs/count"}, {"type": "null"}]
753
+ },
754
+ "failedTimings": {
755
+ "description": "Endpoints: durations of the non-success samples per status, up to 5 statuses with the most samples (08-REQ-47); not part of the time statistics. Empty for steps.",
756
+ "type": "array",
757
+ "maxItems": 5,
758
+ "items": {"$ref": "#/$defs/failedTiming"}
759
+ },
685
760
  "hints": {
686
761
  "description": "Hints that explain the result of the key, in rule priority order (11-REQ-34); at most 3.",
687
762
  "type": "array",
@@ -888,6 +963,78 @@
888
963
  }
889
964
  }
890
965
  },
966
+ "cold": {
967
+ "description": "Cold samples of one key (08-REQ-43).",
968
+ "type": "object",
969
+ "additionalProperties": false,
970
+ "required": ["count", "excluded", "reason", "durations", "max", "warmP50", "ratio", "test"],
971
+ "properties": {
972
+ "count": {"description": "Number of cold samples (at most measure.coldSamples per pass and shard).", "type": "integer", "minimum": 1},
973
+ "excluded": {
974
+ "description": "True when the cold samples are left out of the time statistics and successCount (08-REQ-42).",
975
+ "type": "boolean"
976
+ },
977
+ "reason": {
978
+ "description": "too-few-samples: without the cold samples the key would have fewer than checks.time.median.minSamples warm samples, so the cold samples stay in the statistics.",
979
+ "oneOf": [{"const": "too-few-samples"}, {"type": "null"}]
980
+ },
981
+ "durations": {
982
+ "description": "Durations of the cold samples in input order, at most the first 5.",
983
+ "type": "array",
984
+ "minItems": 1,
985
+ "maxItems": 5,
986
+ "items": {"$ref": "common.schema.json#/$defs/ms"}
987
+ },
988
+ "max": {"description": "Largest cold duration.", "$ref": "common.schema.json#/$defs/ms"},
989
+ "warmP50": {
990
+ "description": "p50 of the warm samples; when every sample is cold (excluded false), the p50 of all timed samples (08-REQ-43).",
991
+ "oneOf": [{"$ref": "common.schema.json#/$defs/ms"}, {"type": "null"}]
992
+ },
993
+ "ratio": {
994
+ "description": "max / warmP50, 2 decimal places; null when warmP50 is null or 0.",
995
+ "oneOf": [{"type": "number", "minimum": 0}, {"type": "null"}]
996
+ },
997
+ "test": {"description": "Test of the first cold sample.", "$ref": "#/$defs/testRef"}
998
+ }
999
+ },
1000
+ "failedTiming": {
1001
+ "type": "object",
1002
+ "additionalProperties": false,
1003
+ "required": ["status", "count", "p50", "p95"],
1004
+ "properties": {
1005
+ "status": {"type": "integer", "minimum": 100, "maximum": 599},
1006
+ "count": {"description": "Timed samples with this status.", "type": "integer", "minimum": 1},
1007
+ "p50": {"$ref": "common.schema.json#/$defs/ms"},
1008
+ "p95": {"$ref": "common.schema.json#/$defs/ms"}
1009
+ }
1010
+ },
1011
+ "workload": {
1012
+ "description": "Samples of the key in the thresholds run (base, the source block of the entry) and in this run (now) (09-REQ-40).",
1013
+ "type": "object",
1014
+ "additionalProperties": false,
1015
+ "required": ["base", "now", "perPassRatio", "shifted"],
1016
+ "properties": {
1017
+ "base": {"$ref": "#/$defs/workloadSide"},
1018
+ "now": {"$ref": "#/$defs/workloadSide"},
1019
+ "perPassRatio": {
1020
+ "description": "(now.count / now.passes) / (base.count / base.passes), 2 decimal places; null when base.count is 0.",
1021
+ "oneOf": [{"type": "number", "minimum": 0}, {"type": "null"}]
1022
+ },
1023
+ "shifted": {"description": "perPassRatio is at least thresholds.workloadShift.factor or at most its inverse (09-REQ-41).", "type": "boolean"}
1024
+ }
1025
+ },
1026
+ "workloadSide": {
1027
+ "type": "object",
1028
+ "additionalProperties": false,
1029
+ "required": ["count", "successCount", "passes", "workers", "share"],
1030
+ "properties": {
1031
+ "count": {"$ref": "common.schema.json#/$defs/count"},
1032
+ "successCount": {"$ref": "common.schema.json#/$defs/count"},
1033
+ "passes": {"type": "integer", "minimum": 1},
1034
+ "workers": {"type": "integer", "minimum": 1},
1035
+ "share": {"description": "count of the key / count of all keys of the kind, 4 decimal places.", "$ref": "common.schema.json#/$defs/ratio"}
1036
+ }
1037
+ },
891
1038
  "slowSample": {
892
1039
  "type": "object",
893
1040
  "additionalProperties": false,
@@ -922,7 +1069,7 @@
922
1069
  "description": "Evaluation of one key (rules: 09).",
923
1070
  "type": "object",
924
1071
  "additionalProperties": false,
925
- "required": ["result", "reason", "thresholdSource", "limits", "checks", "muted"],
1072
+ "required": ["result", "reason", "thresholdSource", "limits", "checks", "muted", "workload"],
926
1073
  "properties": {
927
1074
  "result": {"enum": ["pass", "fail", "not-evaluated"]},
928
1075
  "reason": {
@@ -934,7 +1081,7 @@
934
1081
  "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.",
935
1082
  "type": "object",
936
1083
  "additionalProperties": false,
937
- "required": ["t", "median", "percentile", "p99", "minApdex", "maxWilson", "maxErrorRate"],
1084
+ "required": ["t", "median", "percentile", "p99", "minApdex", "maxWilson", "maxErrorRate", "maxNonSuccessRate"],
938
1085
  "properties": {
939
1086
  "t": {"oneOf": [{"$ref": "common.schema.json#/$defs/msLimit"}, {"type": "null"}]},
940
1087
  "median": {"$ref": "common.schema.json#/$defs/msLimit"},
@@ -942,7 +1089,11 @@
942
1089
  "p99": {"$ref": "common.schema.json#/$defs/msLimit"},
943
1090
  "minApdex": {"oneOf": [{"$ref": "common.schema.json#/$defs/ratio"}, {"type": "null"}]},
944
1091
  "maxWilson": {"oneOf": [{"$ref": "common.schema.json#/$defs/ratio"}, {"type": "null"}]},
945
- "maxErrorRate": {"$ref": "common.schema.json#/$defs/ratio"}
1092
+ "maxErrorRate": {"$ref": "common.schema.json#/$defs/ratio"},
1093
+ "maxNonSuccessRate": {
1094
+ "description": "Limit of the nonSuccess rule (09-REQ-38): from the entry, or checks.nonSuccess.limit.api for endpoint keys without one; null when the rule does not apply.",
1095
+ "oneOf": [{"$ref": "common.schema.json#/$defs/ratio"}, {"type": "null"}]
1096
+ }
946
1097
  }
947
1098
  },
948
1099
  "checks": {
@@ -965,6 +1116,10 @@
965
1116
  },
966
1117
  {"type": "null"}
967
1118
  ]
1119
+ },
1120
+ "workload": {
1121
+ "description": "Workload of the key compared with the thresholds run (09-REQ-40); null without an entry with a source block.",
1122
+ "oneOf": [{"$ref": "#/$defs/workload"}, {"type": "null"}]
968
1123
  }
969
1124
  }
970
1125
  },
@@ -974,8 +1129,8 @@
974
1129
  "required": ["rule", "n", "actual", "observed", "limit", "passed", "hardLimitExceeded", "blocking", "usage"],
975
1130
  "properties": {
976
1131
  "rule": {
977
- "description": "Rule name (09, 5.2). apdex, wilson and errors compare a bound of a 95% interval (09-REQ-09).",
978
- "enum": ["median", "percentile", "p99", "apdex", "wilson", "errors"]
1132
+ "description": "Rule name (09, 5.2). apdex, wilson, errors and nonSuccess compare a bound of a 95% interval (09-REQ-09).",
1133
+ "enum": ["median", "percentile", "p99", "apdex", "wilson", "errors", "nonSuccess"]
979
1134
  },
980
1135
  "n": {
981
1136
  "description": "Samples the rule used: retained timing samples for time, apdex and wilson rules, all samples of the key for errors.",
@@ -7,7 +7,7 @@
7
7
  "additionalProperties": false,
8
8
  "required": ["schemaVersion", "collector", "requests", "apiRequests", "diagnostics"],
9
9
  "properties": {
10
- "schemaVersion": {"const": 3},
10
+ "schemaVersion": {"const": 4},
11
11
  "collector": {
12
12
  "description": "Collector that produced the batch.",
13
13
  "type": "object",
@@ -43,6 +43,13 @@
43
43
  }
44
44
  },
45
45
  "$defs": {
46
+ "operation": {
47
+ "description": "Operation names read by keys.operations (18-REQ-09), in request order; null when the request matched no entry or no name could be read. Written only when keys.operations is not empty; a missing field means null. Never the request body (P-07).",
48
+ "oneOf": [
49
+ {"type": "array", "minItems": 1, "items": {"type": "string", "pattern": "^[A-Za-z0-9_.-]{1,100}$"}},
50
+ {"type": "null"}
51
+ ]
52
+ },
46
53
  "apiRequestSample": {
47
54
  "description": "One call of an APIRequestContext method, timed with the worker's clock (15-REQ-05).",
48
55
  "type": "object",
@@ -72,7 +79,8 @@
72
79
  "source": {
73
80
  "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
81
  "enum": ["request", "context", "tracked"]
75
- }
82
+ },
83
+ "operation": {"$ref": "#/$defs/operation"}
76
84
  },
77
85
  "if": {"properties": {"status": {"const": "FAILED"}}},
78
86
  "then": {"required": ["failureText"]},
@@ -144,7 +152,8 @@
144
152
  "fromServiceWorker": {
145
153
  "description": "True when Response.fromServiceWorker() reported that a service worker produced the response; such samples are excluded from time statistics (05-REQ-05). False for FAILED and PENDING.",
146
154
  "type": "boolean"
147
- }
155
+ },
156
+ "operation": {"$ref": "#/$defs/operation"}
148
157
  },
149
158
  "if": {"properties": {"status": {"const": "FAILED"}}},
150
159
  "then": {"required": ["failureText"]},
@@ -7,7 +7,7 @@
7
7
  "additionalProperties": false,
8
8
  "required": ["schemaVersion", "kind", "generated", "entries"],
9
9
  "properties": {
10
- "schemaVersion": {"const": 2},
10
+ "schemaVersion": {"const": 3},
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).",
@@ -75,6 +75,17 @@
75
75
  "normalization": {
76
76
  "description": "Fingerprint of the normalization that produced the keys: built-in rules version, effective keys config and base origins (07-REQ-21). A different value means the keys may not match.",
77
77
  "$ref": "common.schema.json#/$defs/fingerprint"
78
+ },
79
+ "coldSamples": {
80
+ "description": "measure.coldSamples of the source run (08-REQ-41); compared with the evaluated run (09-REQ-04). Missing in files written by 1.0.x.",
81
+ "type": "integer",
82
+ "minimum": 0,
83
+ "maximum": 5
84
+ },
85
+ "sourcePasses": {
86
+ "description": "Completed passes of the source run (10-REQ-26). Missing in files written by 1.0.x.",
87
+ "type": "integer",
88
+ "minimum": 1
78
89
  }
79
90
  }
80
91
  },
@@ -102,6 +113,22 @@
102
113
  "description": "Maximum error rate (checks.errors.statuses), compared with the lower bound of its 95% Wilson interval (09-REQ-09).",
103
114
  "$ref": "common.schema.json#/$defs/ratio"
104
115
  },
116
+ "maxNonSuccessRate": {
117
+ "description": "Endpoint keys: maximum share of responses outside measure.successStatuses, compared with the lower bound of its 95% Wilson interval (09-REQ-38, 10-REQ-25). Optional; without it the nonSuccess rule does not run for the key unless checks.nonSuccess.limit.api is set.",
118
+ "$ref": "common.schema.json#/$defs/ratio"
119
+ },
120
+ "source": {
121
+ "description": "Samples of the run the limits of this entry come from (10-REQ-26); kept with the limits, ignored by hysteresis. Used for the workload comparison (09-REQ-40).",
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "required": ["count", "successCount", "passes", "share"],
125
+ "properties": {
126
+ "count": {"description": "All samples of the key.", "$ref": "common.schema.json#/$defs/count"},
127
+ "successCount": {"description": "Timed samples of the key.", "$ref": "common.schema.json#/$defs/count"},
128
+ "passes": {"description": "Completed passes of the run.", "type": "integer", "minimum": 1},
129
+ "share": {"description": "count / count of all keys of the kind, 4 decimal places.", "$ref": "common.schema.json#/$defs/ratio"}
130
+ }
131
+ },
105
132
  "locked": {
106
133
  "description": "Pinned by hand: the generator never changes or removes this entry (D-19). Omitted when not locked.",
107
134
  "const": true
@@ -130,6 +157,7 @@
130
157
  {"required": ["minApdex"]},
131
158
  {"required": ["maxWilson"]},
132
159
  {"required": ["maxErrorRate"]},
160
+ {"required": ["maxNonSuccessRate"]},
133
161
  {"required": ["gate"]}
134
162
  ],
135
163
  "dependentRequired": {"gate": ["note", "until"], "until": ["gate"]}