playwright-performance-regression 1.0.0 → 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/CHANGELOG.md +112 -0
- package/README.md +11 -4
- package/dist/chunk-JS7SBYOF.js +11226 -0
- package/dist/{chunk-4WX3Z5MJ.js → chunk-PTQWKPHU.js} +276 -11
- package/dist/{chunk-5Y34Q4DR.js → chunk-Q73KMM6D.js} +95 -30
- package/dist/{chunk-PWK5XSP2.cjs → chunk-VBNIFMNE.cjs} +298 -32
- package/dist/{chunk-VREOANPX.cjs → chunk-VXGTC6DB.cjs} +78 -6
- package/dist/{chunk-W7NEFS5V.cjs → chunk-VYODYUEL.cjs} +95 -29
- package/dist/{chunk-YKBX6SAT.js → chunk-ZEQ2IGDC.js} +160 -11
- package/dist/cli.js +380 -15
- package/dist/config.cjs +16 -16
- package/dist/config.js +3 -4
- package/dist/fixture.cjs +6 -6
- package/dist/fixture.js +3 -4
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +85 -1
- package/dist/index.d.ts +85 -1
- package/dist/index.js +1 -1
- package/dist/reporter.cjs +1864 -622
- package/dist/reporter.js +7 -8137
- package/dist/test.cjs +4 -4
- package/dist/test.js +3 -4
- package/package.json +3 -3
- package/schemas/config.schema.json +91 -0
- package/schemas/run-report.schema.json +162 -7
- package/schemas/samples.schema.json +12 -3
- package/schemas/thresholds.schema.json +29 -1
- package/dist/chunk-B4XTLSRN.js +0 -1788
- package/dist/chunk-S6UH6QPK.js +0 -68
package/dist/reporter.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkVXGTC6DB_cjs = require('./chunk-VXGTC6DB.cjs');
|
|
6
|
+
var chunkVYODYUEL_cjs = require('./chunk-VYODYUEL.cjs');
|
|
7
7
|
var fs = require('fs');
|
|
8
8
|
var promises = require('fs/promises');
|
|
9
9
|
var os = require('os');
|
|
@@ -197,7 +197,8 @@ var TIME_RULES = /* @__PURE__ */ new Set([
|
|
|
197
197
|
var SHARE_RULES = /* @__PURE__ */ new Set([
|
|
198
198
|
"apdex",
|
|
199
199
|
"wilson",
|
|
200
|
-
"errors"
|
|
200
|
+
"errors",
|
|
201
|
+
"nonSuccess"
|
|
201
202
|
]);
|
|
202
203
|
function exceedance(check2) {
|
|
203
204
|
if (check2.rule === "apdex") return check2.actual === 0 ? Infinity : check2.limit / check2.actual;
|
|
@@ -288,6 +289,21 @@ function runPass(command, env, cwd) {
|
|
|
288
289
|
}
|
|
289
290
|
});
|
|
290
291
|
}
|
|
292
|
+
function readProcessTable() {
|
|
293
|
+
if (process.platform === "win32") return null;
|
|
294
|
+
try {
|
|
295
|
+
const out = child_process.spawnSync("ps", ["-A", "-o", "pid=,ppid=,args="], {
|
|
296
|
+
encoding: "utf8",
|
|
297
|
+
timeout: 2e3,
|
|
298
|
+
shell: false,
|
|
299
|
+
windowsHide: true,
|
|
300
|
+
maxBuffer: 16 * 1024 * 1024
|
|
301
|
+
});
|
|
302
|
+
return out.status === 0 && typeof out.stdout === "string" ? out.stdout : null;
|
|
303
|
+
} catch {
|
|
304
|
+
return null;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
291
307
|
function readPackageInfo(dir) {
|
|
292
308
|
for (let current = dir; ; current = path.dirname(current)) {
|
|
293
309
|
const file = path.join(current, "package.json");
|
|
@@ -407,33 +423,43 @@ function readHostInfo(env) {
|
|
|
407
423
|
}
|
|
408
424
|
|
|
409
425
|
// src/core/schema/formats.ts
|
|
410
|
-
var nonEmpty =
|
|
411
|
-
var nonEmptyOrNull =
|
|
426
|
+
var nonEmpty = chunkVYODYUEL_cjs.str({ minLength: 1 });
|
|
427
|
+
var nonEmptyOrNull = chunkVYODYUEL_cjs.nullable(nonEmpty);
|
|
412
428
|
function present(value, pointer, sink, properties) {
|
|
413
429
|
for (const [name, schema] of Object.entries(properties)) {
|
|
414
430
|
if (Object.hasOwn(value, name)) schema.check(value[name], `${pointer}/${name}`, sink);
|
|
415
431
|
}
|
|
416
432
|
}
|
|
417
433
|
var noTiming = {
|
|
418
|
-
duration:
|
|
419
|
-
requestStart:
|
|
420
|
-
ttfb:
|
|
421
|
-
timeSource:
|
|
422
|
-
fromServiceWorker:
|
|
434
|
+
duration: chunkVYODYUEL_cjs.nul,
|
|
435
|
+
requestStart: chunkVYODYUEL_cjs.nul,
|
|
436
|
+
ttfb: chunkVYODYUEL_cjs.nul,
|
|
437
|
+
timeSource: chunkVYODYUEL_cjs.constant("browser"),
|
|
438
|
+
fromServiceWorker: chunkVYODYUEL_cjs.constant(false)
|
|
423
439
|
};
|
|
424
|
-
var
|
|
440
|
+
var operation = chunkVYODYUEL_cjs.nullable(
|
|
441
|
+
chunkVYODYUEL_cjs.arr(
|
|
442
|
+
chunkVYODYUEL_cjs.str({
|
|
443
|
+
pattern: /^[A-Za-z0-9_.-]{1,100}$/u,
|
|
444
|
+
format: 'an operation name of letters, digits, "_", "." and "-" (at most 100)'
|
|
445
|
+
}),
|
|
446
|
+
{ minItems: 1 }
|
|
447
|
+
)
|
|
448
|
+
);
|
|
449
|
+
var requestSample = chunkVYODYUEL_cjs.obj(
|
|
425
450
|
{
|
|
426
|
-
method:
|
|
451
|
+
method: chunkVYODYUEL_cjs.str({ pattern: /^[A-Z]+$/u }),
|
|
427
452
|
url: nonEmpty,
|
|
428
453
|
resourceType: nonEmpty,
|
|
429
|
-
status:
|
|
454
|
+
status: chunkVYODYUEL_cjs.oneOf(chunkVYODYUEL_cjs.int({ minimum: 100, maximum: 599 }), chunkVYODYUEL_cjs.constant("FAILED"), chunkVYODYUEL_cjs.constant("PENDING")),
|
|
430
455
|
failureText: nonEmpty,
|
|
431
|
-
startTime:
|
|
432
|
-
duration:
|
|
433
|
-
requestStart:
|
|
434
|
-
ttfb:
|
|
435
|
-
timeSource:
|
|
436
|
-
fromServiceWorker:
|
|
456
|
+
startTime: chunkVYODYUEL_cjs.epochMs,
|
|
457
|
+
duration: chunkVYODYUEL_cjs.msOrNull,
|
|
458
|
+
requestStart: chunkVYODYUEL_cjs.msOrNull,
|
|
459
|
+
ttfb: chunkVYODYUEL_cjs.msOrNull,
|
|
460
|
+
timeSource: chunkVYODYUEL_cjs.enumOf(["browser", "node"]),
|
|
461
|
+
fromServiceWorker: chunkVYODYUEL_cjs.bool,
|
|
462
|
+
operation
|
|
437
463
|
},
|
|
438
464
|
{
|
|
439
465
|
required: [
|
|
@@ -462,15 +488,16 @@ var requestSample = chunkW7NEFS5V_cjs.obj(
|
|
|
462
488
|
}
|
|
463
489
|
}
|
|
464
490
|
);
|
|
465
|
-
var apiRequestSample =
|
|
491
|
+
var apiRequestSample = chunkVYODYUEL_cjs.obj(
|
|
466
492
|
{
|
|
467
|
-
method:
|
|
493
|
+
method: chunkVYODYUEL_cjs.str({ pattern: /^[A-Z]+$/u }),
|
|
468
494
|
url: nonEmpty,
|
|
469
|
-
status:
|
|
495
|
+
status: chunkVYODYUEL_cjs.oneOf(chunkVYODYUEL_cjs.int({ minimum: 100, maximum: 599 }), chunkVYODYUEL_cjs.constant("FAILED"), chunkVYODYUEL_cjs.constant("PENDING")),
|
|
470
496
|
failureText: nonEmpty,
|
|
471
|
-
startTime:
|
|
472
|
-
duration:
|
|
473
|
-
source:
|
|
497
|
+
startTime: chunkVYODYUEL_cjs.epochMs,
|
|
498
|
+
duration: chunkVYODYUEL_cjs.msOrNull,
|
|
499
|
+
source: chunkVYODYUEL_cjs.enumOf(["request", "context", "tracked"]),
|
|
500
|
+
operation
|
|
474
501
|
},
|
|
475
502
|
{
|
|
476
503
|
required: ["method", "url", "status", "startTime", "duration", "source"],
|
|
@@ -483,46 +510,52 @@ var apiRequestSample = chunkW7NEFS5V_cjs.obj(
|
|
|
483
510
|
sink.add(`${pointer}/failureText`, "must NOT be present unless status is FAILED");
|
|
484
511
|
}
|
|
485
512
|
if (status === "FAILED" || status === "PENDING" || !Object.hasOwn(value, "status")) {
|
|
486
|
-
present(value, pointer, sink, { duration:
|
|
513
|
+
present(value, pointer, sink, { duration: chunkVYODYUEL_cjs.nul });
|
|
487
514
|
}
|
|
488
515
|
}
|
|
489
516
|
}
|
|
490
517
|
);
|
|
491
|
-
var sampleBatch =
|
|
518
|
+
var sampleBatch = chunkVYODYUEL_cjs.obj(
|
|
492
519
|
{
|
|
493
|
-
schemaVersion:
|
|
494
|
-
collector:
|
|
520
|
+
schemaVersion: chunkVYODYUEL_cjs.constant(4),
|
|
521
|
+
collector: chunkVYODYUEL_cjs.obj(
|
|
495
522
|
{
|
|
496
|
-
name:
|
|
523
|
+
name: chunkVYODYUEL_cjs.str({ pattern: /^[a-z0-9-]+$/u }),
|
|
497
524
|
version: nonEmpty,
|
|
498
525
|
browserName: nonEmptyOrNull
|
|
499
526
|
},
|
|
500
527
|
{ required: ["name", "version", "browserName"] }
|
|
501
528
|
),
|
|
502
|
-
requests:
|
|
503
|
-
apiRequests:
|
|
504
|
-
diagnostics:
|
|
529
|
+
requests: chunkVYODYUEL_cjs.arr(requestSample),
|
|
530
|
+
apiRequests: chunkVYODYUEL_cjs.arr(apiRequestSample),
|
|
531
|
+
diagnostics: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.issue)
|
|
505
532
|
},
|
|
506
533
|
{ required: ["schemaVersion", "collector", "requests", "apiRequests", "diagnostics"] }
|
|
507
534
|
);
|
|
508
535
|
var LIMIT_FIELDS = ["t", "median", "percentile", "p99", "minApdex", "maxWilson", "maxErrorRate"];
|
|
509
|
-
var
|
|
536
|
+
var ENTRY_LIMIT_FIELDS = [...LIMIT_FIELDS, "maxNonSuccessRate"];
|
|
537
|
+
var thresholdsEntry = chunkVYODYUEL_cjs.obj(
|
|
510
538
|
{
|
|
511
|
-
t:
|
|
512
|
-
median:
|
|
513
|
-
percentile:
|
|
514
|
-
p99:
|
|
515
|
-
minApdex:
|
|
516
|
-
maxWilson:
|
|
517
|
-
maxErrorRate:
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
539
|
+
t: chunkVYODYUEL_cjs.nullable(chunkVYODYUEL_cjs.msLimit),
|
|
540
|
+
median: chunkVYODYUEL_cjs.msLimit,
|
|
541
|
+
percentile: chunkVYODYUEL_cjs.msLimit,
|
|
542
|
+
p99: chunkVYODYUEL_cjs.msLimit,
|
|
543
|
+
minApdex: chunkVYODYUEL_cjs.nullable(chunkVYODYUEL_cjs.ratio),
|
|
544
|
+
maxWilson: chunkVYODYUEL_cjs.nullable(chunkVYODYUEL_cjs.ratio),
|
|
545
|
+
maxErrorRate: chunkVYODYUEL_cjs.ratio,
|
|
546
|
+
maxNonSuccessRate: chunkVYODYUEL_cjs.ratio,
|
|
547
|
+
source: chunkVYODYUEL_cjs.obj(
|
|
548
|
+
{ count: chunkVYODYUEL_cjs.count, successCount: chunkVYODYUEL_cjs.count, passes: chunkVYODYUEL_cjs.int({ minimum: 1 }), share: chunkVYODYUEL_cjs.ratio },
|
|
549
|
+
{ required: ["count", "successCount", "passes", "share"] }
|
|
550
|
+
),
|
|
551
|
+
locked: chunkVYODYUEL_cjs.constant(true),
|
|
552
|
+
note: chunkVYODYUEL_cjs.str({ minLength: 1, maxLength: 500 }),
|
|
553
|
+
gate: chunkVYODYUEL_cjs.constant("warn"),
|
|
554
|
+
until: chunkVYODYUEL_cjs.isoDate
|
|
522
555
|
},
|
|
523
556
|
{
|
|
524
557
|
refine(value, pointer, sink) {
|
|
525
|
-
if (![...
|
|
558
|
+
if (![...ENTRY_LIMIT_FIELDS, "gate"].some((name) => Object.hasOwn(value, name))) {
|
|
526
559
|
sink.add(pointer, "must have at least one limit or gate");
|
|
527
560
|
}
|
|
528
561
|
if (Object.hasOwn(value, "gate")) {
|
|
@@ -538,19 +571,21 @@ var thresholdsEntry = chunkW7NEFS5V_cjs.obj(
|
|
|
538
571
|
}
|
|
539
572
|
}
|
|
540
573
|
);
|
|
541
|
-
var thresholdsGenerated =
|
|
574
|
+
var thresholdsGenerated = chunkVYODYUEL_cjs.obj(
|
|
542
575
|
{
|
|
543
|
-
tool:
|
|
544
|
-
env:
|
|
545
|
-
sourceRunId:
|
|
546
|
-
sourceRunStartedAt:
|
|
547
|
-
sourceSampleCount:
|
|
548
|
-
evaluatedPercentile:
|
|
549
|
-
derivation:
|
|
550
|
-
browsers:
|
|
576
|
+
tool: chunkVYODYUEL_cjs.tool,
|
|
577
|
+
env: chunkVYODYUEL_cjs.envLabelOrNull,
|
|
578
|
+
sourceRunId: chunkVYODYUEL_cjs.runId,
|
|
579
|
+
sourceRunStartedAt: chunkVYODYUEL_cjs.timestamp,
|
|
580
|
+
sourceSampleCount: chunkVYODYUEL_cjs.count,
|
|
581
|
+
evaluatedPercentile: chunkVYODYUEL_cjs.percentileName,
|
|
582
|
+
derivation: chunkVYODYUEL_cjs.derivationSettings,
|
|
583
|
+
browsers: chunkVYODYUEL_cjs.arr(nonEmpty, { uniqueItems: true }),
|
|
551
584
|
playwrightVersion: nonEmpty,
|
|
552
|
-
host:
|
|
553
|
-
normalization:
|
|
585
|
+
host: chunkVYODYUEL_cjs.hostFingerprint,
|
|
586
|
+
normalization: chunkVYODYUEL_cjs.fingerprint,
|
|
587
|
+
coldSamples: chunkVYODYUEL_cjs.int({ minimum: 0, maximum: 5 }),
|
|
588
|
+
sourcePasses: chunkVYODYUEL_cjs.int({ minimum: 1 })
|
|
554
589
|
},
|
|
555
590
|
{
|
|
556
591
|
required: [
|
|
@@ -568,16 +603,16 @@ var thresholdsGenerated = chunkW7NEFS5V_cjs.obj(
|
|
|
568
603
|
]
|
|
569
604
|
}
|
|
570
605
|
);
|
|
571
|
-
var thresholdsFile =
|
|
606
|
+
var thresholdsFile = chunkVYODYUEL_cjs.obj(
|
|
572
607
|
{
|
|
573
|
-
schemaVersion:
|
|
574
|
-
kind:
|
|
575
|
-
generated:
|
|
576
|
-
entries:
|
|
608
|
+
schemaVersion: chunkVYODYUEL_cjs.constant(3),
|
|
609
|
+
kind: chunkVYODYUEL_cjs.kind,
|
|
610
|
+
generated: chunkVYODYUEL_cjs.oneOf(thresholdsGenerated, chunkVYODYUEL_cjs.nul),
|
|
611
|
+
entries: chunkVYODYUEL_cjs.record(chunkVYODYUEL_cjs.key, thresholdsEntry)
|
|
577
612
|
},
|
|
578
613
|
{ required: ["schemaVersion", "kind", "generated", "entries"] }
|
|
579
614
|
);
|
|
580
|
-
var evaluationCounts =
|
|
615
|
+
var evaluationCounts = chunkVYODYUEL_cjs.obj(
|
|
581
616
|
Object.fromEntries(
|
|
582
617
|
[
|
|
583
618
|
"keys",
|
|
@@ -591,7 +626,7 @@ var evaluationCounts = chunkW7NEFS5V_cjs.obj(
|
|
|
591
626
|
"violations",
|
|
592
627
|
"blockingViolations",
|
|
593
628
|
"muted"
|
|
594
|
-
].map((name) => [name,
|
|
629
|
+
].map((name) => [name, chunkVYODYUEL_cjs.count])
|
|
595
630
|
),
|
|
596
631
|
{
|
|
597
632
|
required: [
|
|
@@ -609,50 +644,50 @@ var evaluationCounts = chunkW7NEFS5V_cjs.obj(
|
|
|
609
644
|
]
|
|
610
645
|
}
|
|
611
646
|
);
|
|
612
|
-
var thresholdFileInfo =
|
|
647
|
+
var thresholdFileInfo = chunkVYODYUEL_cjs.obj(
|
|
613
648
|
{
|
|
614
|
-
kind:
|
|
649
|
+
kind: chunkVYODYUEL_cjs.kind,
|
|
615
650
|
path: nonEmpty,
|
|
616
|
-
status:
|
|
617
|
-
generated:
|
|
618
|
-
unseenKeys:
|
|
651
|
+
status: chunkVYODYUEL_cjs.enumOf(["loaded", "missing", "invalid"]),
|
|
652
|
+
generated: chunkVYODYUEL_cjs.oneOf(chunkVYODYUEL_cjs.anyObject, chunkVYODYUEL_cjs.nul),
|
|
653
|
+
unseenKeys: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.key)
|
|
619
654
|
},
|
|
620
655
|
{ required: ["kind", "path", "status", "generated", "unseenKeys"] }
|
|
621
656
|
);
|
|
622
|
-
var testRef =
|
|
657
|
+
var testRef = chunkVYODYUEL_cjs.obj(
|
|
623
658
|
{
|
|
624
|
-
title:
|
|
625
|
-
project:
|
|
626
|
-
file:
|
|
627
|
-
line:
|
|
628
|
-
repeatEachIndex:
|
|
659
|
+
title: chunkVYODYUEL_cjs.str(),
|
|
660
|
+
project: chunkVYODYUEL_cjs.str(),
|
|
661
|
+
file: chunkVYODYUEL_cjs.str(),
|
|
662
|
+
line: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
663
|
+
repeatEachIndex: chunkVYODYUEL_cjs.int({ minimum: 0 })
|
|
629
664
|
},
|
|
630
665
|
{ required: ["title", "project", "file", "line", "repeatEachIndex"] }
|
|
631
666
|
);
|
|
632
|
-
var slowSample =
|
|
633
|
-
{ duration:
|
|
667
|
+
var slowSample = chunkVYODYUEL_cjs.obj(
|
|
668
|
+
{ duration: chunkVYODYUEL_cjs.ms, startedAt: chunkVYODYUEL_cjs.timestamp, test: testRef, url: nonEmpty },
|
|
634
669
|
{ required: ["duration", "startedAt", "test"] }
|
|
635
670
|
);
|
|
636
|
-
var stats =
|
|
671
|
+
var stats = chunkVYODYUEL_cjs.obj(
|
|
637
672
|
{
|
|
638
|
-
min:
|
|
639
|
-
avg:
|
|
640
|
-
max:
|
|
641
|
-
percentiles:
|
|
673
|
+
min: chunkVYODYUEL_cjs.ms,
|
|
674
|
+
avg: chunkVYODYUEL_cjs.ms,
|
|
675
|
+
max: chunkVYODYUEL_cjs.ms,
|
|
676
|
+
percentiles: chunkVYODYUEL_cjs.record(chunkVYODYUEL_cjs.percentileName, chunkVYODYUEL_cjs.ms, { required: ["p50", "p90", "p95", "p99"] })
|
|
642
677
|
},
|
|
643
678
|
{ required: ["min", "avg", "max", "percentiles"] }
|
|
644
679
|
);
|
|
645
|
-
var check =
|
|
680
|
+
var check = chunkVYODYUEL_cjs.obj(
|
|
646
681
|
{
|
|
647
|
-
rule:
|
|
648
|
-
n:
|
|
649
|
-
actual:
|
|
650
|
-
observed:
|
|
651
|
-
limit:
|
|
652
|
-
passed:
|
|
653
|
-
hardLimitExceeded:
|
|
654
|
-
blocking:
|
|
655
|
-
usage:
|
|
682
|
+
rule: chunkVYODYUEL_cjs.enumOf(["median", "percentile", "p99", "apdex", "wilson", "errors", "nonSuccess"]),
|
|
683
|
+
n: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
684
|
+
actual: chunkVYODYUEL_cjs.num({ minimum: 0 }),
|
|
685
|
+
observed: chunkVYODYUEL_cjs.oneOf(chunkVYODYUEL_cjs.num({ minimum: 0, maximum: 1 }), chunkVYODYUEL_cjs.nul),
|
|
686
|
+
limit: chunkVYODYUEL_cjs.num({ minimum: 0 }),
|
|
687
|
+
passed: chunkVYODYUEL_cjs.bool,
|
|
688
|
+
hardLimitExceeded: chunkVYODYUEL_cjs.bool,
|
|
689
|
+
blocking: chunkVYODYUEL_cjs.bool,
|
|
690
|
+
usage: chunkVYODYUEL_cjs.nullable(chunkVYODYUEL_cjs.num({ minimum: 0 }))
|
|
656
691
|
},
|
|
657
692
|
{
|
|
658
693
|
required: [
|
|
@@ -668,33 +703,54 @@ var check = chunkW7NEFS5V_cjs.obj(
|
|
|
668
703
|
]
|
|
669
704
|
}
|
|
670
705
|
);
|
|
671
|
-
var
|
|
706
|
+
var workloadSide = chunkVYODYUEL_cjs.obj(
|
|
672
707
|
{
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
708
|
+
count: chunkVYODYUEL_cjs.count,
|
|
709
|
+
successCount: chunkVYODYUEL_cjs.count,
|
|
710
|
+
passes: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
711
|
+
workers: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
712
|
+
share: chunkVYODYUEL_cjs.ratio
|
|
713
|
+
},
|
|
714
|
+
{ required: ["count", "successCount", "passes", "workers", "share"] }
|
|
715
|
+
);
|
|
716
|
+
var workload = chunkVYODYUEL_cjs.obj(
|
|
717
|
+
{
|
|
718
|
+
base: workloadSide,
|
|
719
|
+
now: workloadSide,
|
|
720
|
+
perPassRatio: chunkVYODYUEL_cjs.nullable(chunkVYODYUEL_cjs.num({ minimum: 0 })),
|
|
721
|
+
shifted: chunkVYODYUEL_cjs.bool
|
|
722
|
+
},
|
|
723
|
+
{ required: ["base", "now", "perPassRatio", "shifted"] }
|
|
724
|
+
);
|
|
725
|
+
var keyEvaluation = chunkVYODYUEL_cjs.obj(
|
|
726
|
+
{
|
|
727
|
+
result: chunkVYODYUEL_cjs.enumOf(["pass", "fail", "not-evaluated"]),
|
|
728
|
+
reason: chunkVYODYUEL_cjs.oneOf(chunkVYODYUEL_cjs.enumOf(["too-few-samples", "no-rules", "thresholds-error"]), chunkVYODYUEL_cjs.nul),
|
|
729
|
+
thresholdSource: chunkVYODYUEL_cjs.enumOf(["file", "default"]),
|
|
730
|
+
limits: chunkVYODYUEL_cjs.obj(
|
|
677
731
|
{
|
|
678
|
-
t:
|
|
679
|
-
median:
|
|
680
|
-
percentile:
|
|
681
|
-
p99:
|
|
682
|
-
minApdex:
|
|
683
|
-
maxWilson:
|
|
684
|
-
maxErrorRate:
|
|
732
|
+
t: chunkVYODYUEL_cjs.nullable(chunkVYODYUEL_cjs.msLimit),
|
|
733
|
+
median: chunkVYODYUEL_cjs.msLimit,
|
|
734
|
+
percentile: chunkVYODYUEL_cjs.msLimit,
|
|
735
|
+
p99: chunkVYODYUEL_cjs.msLimit,
|
|
736
|
+
minApdex: chunkVYODYUEL_cjs.nullable(chunkVYODYUEL_cjs.ratio),
|
|
737
|
+
maxWilson: chunkVYODYUEL_cjs.nullable(chunkVYODYUEL_cjs.ratio),
|
|
738
|
+
maxErrorRate: chunkVYODYUEL_cjs.ratio,
|
|
739
|
+
maxNonSuccessRate: chunkVYODYUEL_cjs.nullable(chunkVYODYUEL_cjs.ratio)
|
|
685
740
|
},
|
|
686
|
-
{ required:
|
|
741
|
+
{ required: ENTRY_LIMIT_FIELDS }
|
|
687
742
|
),
|
|
688
|
-
checks:
|
|
689
|
-
muted:
|
|
690
|
-
|
|
691
|
-
{ until:
|
|
743
|
+
checks: chunkVYODYUEL_cjs.arr(check),
|
|
744
|
+
muted: chunkVYODYUEL_cjs.oneOf(
|
|
745
|
+
chunkVYODYUEL_cjs.obj(
|
|
746
|
+
{ until: chunkVYODYUEL_cjs.isoDate, note: nonEmpty, expired: chunkVYODYUEL_cjs.bool },
|
|
692
747
|
{ required: ["until", "note", "expired"] }
|
|
693
748
|
),
|
|
694
|
-
|
|
695
|
-
)
|
|
749
|
+
chunkVYODYUEL_cjs.nul
|
|
750
|
+
),
|
|
751
|
+
workload: chunkVYODYUEL_cjs.oneOf(workload, chunkVYODYUEL_cjs.nul)
|
|
696
752
|
},
|
|
697
|
-
{ required: ["result", "reason", "thresholdSource", "limits", "checks", "muted"] }
|
|
753
|
+
{ required: ["result", "reason", "thresholdSource", "limits", "checks", "muted", "workload"] }
|
|
698
754
|
);
|
|
699
755
|
var HINT_CODES = [
|
|
700
756
|
"HINT_HARD_LIMIT",
|
|
@@ -733,41 +789,41 @@ var HINT_PARAMS = [
|
|
|
733
789
|
"t",
|
|
734
790
|
"n"
|
|
735
791
|
];
|
|
736
|
-
var hint =
|
|
737
|
-
{ code:
|
|
792
|
+
var hint = chunkVYODYUEL_cjs.obj(
|
|
793
|
+
{ code: chunkVYODYUEL_cjs.enumOf(HINT_CODES), params: chunkVYODYUEL_cjs.record(chunkVYODYUEL_cjs.enumOf(HINT_PARAMS), chunkVYODYUEL_cjs.oneOf(chunkVYODYUEL_cjs.str(), chunkVYODYUEL_cjs.num())) },
|
|
738
794
|
{ required: ["code", "params"] }
|
|
739
795
|
);
|
|
740
|
-
var histogram =
|
|
741
|
-
|
|
796
|
+
var histogram = chunkVYODYUEL_cjs.oneOf(
|
|
797
|
+
chunkVYODYUEL_cjs.obj(
|
|
742
798
|
{
|
|
743
|
-
edges:
|
|
744
|
-
counts:
|
|
799
|
+
edges: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.num({ minimum: 0 }), { minItems: 2, maxItems: 31 }),
|
|
800
|
+
counts: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.count, { minItems: 1, maxItems: 30 })
|
|
745
801
|
},
|
|
746
802
|
{ required: ["edges", "counts"] }
|
|
747
803
|
),
|
|
748
|
-
|
|
804
|
+
chunkVYODYUEL_cjs.nul
|
|
749
805
|
);
|
|
750
|
-
var testCost =
|
|
806
|
+
var testCost = chunkVYODYUEL_cjs.obj(
|
|
751
807
|
{
|
|
752
|
-
title:
|
|
753
|
-
project:
|
|
754
|
-
file:
|
|
755
|
-
line:
|
|
756
|
-
executions:
|
|
757
|
-
requestCount:
|
|
758
|
-
errorCount:
|
|
759
|
-
totalMs:
|
|
760
|
-
maxRequestMs:
|
|
761
|
-
keyCount:
|
|
762
|
-
topKeys:
|
|
763
|
-
|
|
764
|
-
{ key:
|
|
808
|
+
title: chunkVYODYUEL_cjs.str(),
|
|
809
|
+
project: chunkVYODYUEL_cjs.str(),
|
|
810
|
+
file: chunkVYODYUEL_cjs.str(),
|
|
811
|
+
line: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
812
|
+
executions: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
813
|
+
requestCount: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
814
|
+
errorCount: chunkVYODYUEL_cjs.count,
|
|
815
|
+
totalMs: chunkVYODYUEL_cjs.ms,
|
|
816
|
+
maxRequestMs: chunkVYODYUEL_cjs.msOrNull,
|
|
817
|
+
keyCount: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
818
|
+
topKeys: chunkVYODYUEL_cjs.arr(
|
|
819
|
+
chunkVYODYUEL_cjs.obj(
|
|
820
|
+
{ key: chunkVYODYUEL_cjs.key, count: chunkVYODYUEL_cjs.int({ minimum: 1 }), totalMs: chunkVYODYUEL_cjs.ms },
|
|
765
821
|
{ required: ["key", "count", "totalMs"] }
|
|
766
822
|
),
|
|
767
823
|
{ maxItems: 3 }
|
|
768
824
|
),
|
|
769
|
-
violatedKeys:
|
|
770
|
-
violatedKeyCount:
|
|
825
|
+
violatedKeys: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.key, { maxItems: 10 }),
|
|
826
|
+
violatedKeyCount: chunkVYODYUEL_cjs.count
|
|
771
827
|
},
|
|
772
828
|
{
|
|
773
829
|
required: [
|
|
@@ -787,71 +843,91 @@ var testCost = chunkW7NEFS5V_cjs.obj(
|
|
|
787
843
|
]
|
|
788
844
|
}
|
|
789
845
|
);
|
|
790
|
-
var waterfallRequest =
|
|
846
|
+
var waterfallRequest = chunkVYODYUEL_cjs.obj(
|
|
791
847
|
{
|
|
792
|
-
offset:
|
|
793
|
-
duration:
|
|
794
|
-
key:
|
|
795
|
-
status:
|
|
848
|
+
offset: chunkVYODYUEL_cjs.int({ minimum: 0 }),
|
|
849
|
+
duration: chunkVYODYUEL_cjs.msOrNull,
|
|
850
|
+
key: chunkVYODYUEL_cjs.key,
|
|
851
|
+
status: chunkVYODYUEL_cjs.str({ pattern: /^(?:[1-5][0-9]{2}|FAILED|ABORTED|PENDING)$/u })
|
|
796
852
|
},
|
|
797
853
|
{ required: ["offset", "duration", "key", "status"] }
|
|
798
854
|
);
|
|
799
|
-
var waterfall =
|
|
855
|
+
var waterfall = chunkVYODYUEL_cjs.obj(
|
|
800
856
|
{
|
|
801
857
|
test: testRef,
|
|
802
|
-
totalMs:
|
|
803
|
-
requestCount:
|
|
804
|
-
spanMs:
|
|
805
|
-
requests:
|
|
806
|
-
omitted:
|
|
858
|
+
totalMs: chunkVYODYUEL_cjs.ms,
|
|
859
|
+
requestCount: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
860
|
+
spanMs: chunkVYODYUEL_cjs.ms,
|
|
861
|
+
requests: chunkVYODYUEL_cjs.arr(waterfallRequest, { maxItems: 200 }),
|
|
862
|
+
omitted: chunkVYODYUEL_cjs.count
|
|
807
863
|
},
|
|
808
864
|
{ required: ["test", "totalMs", "requestCount", "spanMs", "requests", "omitted"] }
|
|
809
865
|
);
|
|
810
|
-
var testBreakdown =
|
|
811
|
-
|
|
866
|
+
var testBreakdown = chunkVYODYUEL_cjs.oneOf(
|
|
867
|
+
chunkVYODYUEL_cjs.obj(
|
|
812
868
|
{
|
|
813
|
-
tests:
|
|
814
|
-
omitted:
|
|
815
|
-
waterfalls:
|
|
869
|
+
tests: chunkVYODYUEL_cjs.arr(testCost, { maxItems: 500 }),
|
|
870
|
+
omitted: chunkVYODYUEL_cjs.count,
|
|
871
|
+
waterfalls: chunkVYODYUEL_cjs.arr(waterfall, { maxItems: 5 })
|
|
816
872
|
},
|
|
817
873
|
{ required: ["tests", "omitted", "waterfalls"] }
|
|
818
874
|
),
|
|
819
|
-
|
|
875
|
+
chunkVYODYUEL_cjs.nul
|
|
876
|
+
);
|
|
877
|
+
var cold = chunkVYODYUEL_cjs.obj(
|
|
878
|
+
{
|
|
879
|
+
count: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
880
|
+
excluded: chunkVYODYUEL_cjs.bool,
|
|
881
|
+
reason: chunkVYODYUEL_cjs.oneOf(chunkVYODYUEL_cjs.constant("too-few-samples"), chunkVYODYUEL_cjs.nul),
|
|
882
|
+
durations: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.ms, { minItems: 1, maxItems: 5 }),
|
|
883
|
+
max: chunkVYODYUEL_cjs.ms,
|
|
884
|
+
warmP50: chunkVYODYUEL_cjs.msOrNull,
|
|
885
|
+
ratio: chunkVYODYUEL_cjs.nullable(chunkVYODYUEL_cjs.num({ minimum: 0 })),
|
|
886
|
+
test: testRef
|
|
887
|
+
},
|
|
888
|
+
{ required: ["count", "excluded", "reason", "durations", "max", "warmP50", "ratio", "test"] }
|
|
889
|
+
);
|
|
890
|
+
var failedTiming = chunkVYODYUEL_cjs.obj(
|
|
891
|
+
{ status: chunkVYODYUEL_cjs.int({ minimum: 100, maximum: 599 }), count: chunkVYODYUEL_cjs.int({ minimum: 1 }), p50: chunkVYODYUEL_cjs.ms, p95: chunkVYODYUEL_cjs.ms },
|
|
892
|
+
{ required: ["status", "count", "p50", "p95"] }
|
|
820
893
|
);
|
|
821
894
|
var aggregateProps = {
|
|
822
|
-
count:
|
|
823
|
-
successCount:
|
|
824
|
-
errorCount:
|
|
825
|
-
fromFailedTests:
|
|
826
|
-
testCount:
|
|
827
|
-
statuses:
|
|
828
|
-
|
|
829
|
-
|
|
895
|
+
count: chunkVYODYUEL_cjs.count,
|
|
896
|
+
successCount: chunkVYODYUEL_cjs.count,
|
|
897
|
+
errorCount: chunkVYODYUEL_cjs.count,
|
|
898
|
+
fromFailedTests: chunkVYODYUEL_cjs.count,
|
|
899
|
+
testCount: chunkVYODYUEL_cjs.count,
|
|
900
|
+
statuses: chunkVYODYUEL_cjs.record(
|
|
901
|
+
chunkVYODYUEL_cjs.str({ pattern: /^(?:[1-5][0-9]{2}|FAILED|ABORTED|PENDING|ok|error|unfinished)$/u }),
|
|
902
|
+
chunkVYODYUEL_cjs.int({ minimum: 1 })
|
|
830
903
|
),
|
|
831
|
-
timeSources:
|
|
832
|
-
stats:
|
|
833
|
-
ttfb:
|
|
834
|
-
|
|
835
|
-
|
|
904
|
+
timeSources: chunkVYODYUEL_cjs.obj({ browser: chunkVYODYUEL_cjs.count, node: chunkVYODYUEL_cjs.count }, { required: ["browser", "node"] }),
|
|
905
|
+
stats: chunkVYODYUEL_cjs.oneOf(stats, chunkVYODYUEL_cjs.nul),
|
|
906
|
+
ttfb: chunkVYODYUEL_cjs.oneOf(
|
|
907
|
+
chunkVYODYUEL_cjs.obj({ p50: chunkVYODYUEL_cjs.ms, p95: chunkVYODYUEL_cjs.ms, otherP50: chunkVYODYUEL_cjs.msOrNull }, { required: ["p50", "p95", "otherP50"] }),
|
|
908
|
+
chunkVYODYUEL_cjs.nul
|
|
836
909
|
),
|
|
837
|
-
slowest:
|
|
838
|
-
topTests:
|
|
839
|
-
|
|
910
|
+
slowest: chunkVYODYUEL_cjs.arr(slowSample, { maxItems: 3 }),
|
|
911
|
+
topTests: chunkVYODYUEL_cjs.arr(
|
|
912
|
+
chunkVYODYUEL_cjs.obj(
|
|
840
913
|
{
|
|
841
|
-
title:
|
|
842
|
-
project:
|
|
843
|
-
file:
|
|
844
|
-
line:
|
|
845
|
-
sampleCount:
|
|
914
|
+
title: chunkVYODYUEL_cjs.str(),
|
|
915
|
+
project: chunkVYODYUEL_cjs.str(),
|
|
916
|
+
file: chunkVYODYUEL_cjs.str(),
|
|
917
|
+
line: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
918
|
+
sampleCount: chunkVYODYUEL_cjs.int({ minimum: 1 })
|
|
846
919
|
},
|
|
847
920
|
{ required: ["title", "project", "file", "line", "sampleCount"] }
|
|
848
921
|
),
|
|
849
922
|
{ maxItems: 5 }
|
|
850
923
|
),
|
|
851
|
-
samples:
|
|
924
|
+
samples: chunkVYODYUEL_cjs.obj({ durations: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.ms), sampled: chunkVYODYUEL_cjs.bool }, { required: ["durations", "sampled"] }),
|
|
852
925
|
evaluation: keyEvaluation,
|
|
853
926
|
histogram,
|
|
854
|
-
hints:
|
|
927
|
+
hints: chunkVYODYUEL_cjs.arr(hint, { maxItems: 3 }),
|
|
928
|
+
cold: chunkVYODYUEL_cjs.oneOf(cold, chunkVYODYUEL_cjs.nul),
|
|
929
|
+
nonSuccessCount: chunkVYODYUEL_cjs.oneOf(chunkVYODYUEL_cjs.count, chunkVYODYUEL_cjs.nul),
|
|
930
|
+
failedTimings: chunkVYODYUEL_cjs.arr(failedTiming, { maxItems: 5 })
|
|
855
931
|
};
|
|
856
932
|
var aggregateRequired = [
|
|
857
933
|
"count",
|
|
@@ -868,122 +944,169 @@ var aggregateRequired = [
|
|
|
868
944
|
"samples",
|
|
869
945
|
"evaluation",
|
|
870
946
|
"histogram",
|
|
871
|
-
"hints"
|
|
947
|
+
"hints",
|
|
948
|
+
"cold",
|
|
949
|
+
"nonSuccessCount",
|
|
950
|
+
"failedTimings"
|
|
872
951
|
];
|
|
873
|
-
var aggregate =
|
|
874
|
-
var stepAggregate =
|
|
952
|
+
var aggregate = chunkVYODYUEL_cjs.obj(aggregateProps, { required: aggregateRequired });
|
|
953
|
+
var stepAggregate = chunkVYODYUEL_cjs.obj(
|
|
875
954
|
{
|
|
876
955
|
...aggregateProps,
|
|
877
|
-
location:
|
|
878
|
-
|
|
879
|
-
|
|
956
|
+
location: chunkVYODYUEL_cjs.oneOf(
|
|
957
|
+
chunkVYODYUEL_cjs.obj({ file: nonEmpty, line: chunkVYODYUEL_cjs.int({ minimum: 1 }) }, { required: ["file", "line"] }),
|
|
958
|
+
chunkVYODYUEL_cjs.nul
|
|
880
959
|
),
|
|
881
|
-
stepErrorsFromFailedTests:
|
|
960
|
+
stepErrorsFromFailedTests: chunkVYODYUEL_cjs.count
|
|
882
961
|
},
|
|
883
962
|
{ required: [...aggregateRequired, "location", "stepErrorsFromFailedTests"] }
|
|
884
963
|
);
|
|
885
|
-
var
|
|
964
|
+
var hostInfo = chunkVYODYUEL_cjs.obj(
|
|
965
|
+
{
|
|
966
|
+
platform: chunkVYODYUEL_cjs.str(),
|
|
967
|
+
arch: chunkVYODYUEL_cjs.str(),
|
|
968
|
+
nodeVersion: chunkVYODYUEL_cjs.str(),
|
|
969
|
+
ci: chunkVYODYUEL_cjs.bool,
|
|
970
|
+
cpuCount: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
971
|
+
cpuModel: chunkVYODYUEL_cjs.str()
|
|
972
|
+
},
|
|
973
|
+
{ required: ["platform", "arch", "nodeVersion", "ci", "cpuCount", "cpuModel"] }
|
|
974
|
+
);
|
|
975
|
+
var passesInfo = chunkVYODYUEL_cjs.obj(
|
|
976
|
+
{
|
|
977
|
+
planned: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
978
|
+
completed: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
979
|
+
failed: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.int({ minimum: 2 }))
|
|
980
|
+
},
|
|
981
|
+
{ required: ["planned", "completed", "failed"] }
|
|
982
|
+
);
|
|
983
|
+
var testsInfo = chunkVYODYUEL_cjs.obj(
|
|
886
984
|
{
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
985
|
+
status: chunkVYODYUEL_cjs.testsStatus,
|
|
986
|
+
expected: chunkVYODYUEL_cjs.count,
|
|
987
|
+
unexpected: chunkVYODYUEL_cjs.count,
|
|
988
|
+
flaky: chunkVYODYUEL_cjs.count,
|
|
989
|
+
skipped: chunkVYODYUEL_cjs.count
|
|
990
|
+
},
|
|
991
|
+
{ required: ["status", "expected", "unexpected", "flaky", "skipped"] }
|
|
992
|
+
);
|
|
993
|
+
var runReport = chunkVYODYUEL_cjs.obj(
|
|
994
|
+
{
|
|
995
|
+
schemaVersion: chunkVYODYUEL_cjs.constant(5),
|
|
996
|
+
tool: chunkVYODYUEL_cjs.tool,
|
|
997
|
+
runId: chunkVYODYUEL_cjs.runId,
|
|
998
|
+
mode: chunkVYODYUEL_cjs.mode,
|
|
999
|
+
startedAt: chunkVYODYUEL_cjs.timestamp,
|
|
1000
|
+
finishedAt: chunkVYODYUEL_cjs.timestamp,
|
|
1001
|
+
env: chunkVYODYUEL_cjs.envLabelOrNull,
|
|
894
1002
|
configDir: nonEmpty,
|
|
895
1003
|
// Optional (02-REQ-42): left out when neither a package name nor a repository root is known.
|
|
896
|
-
suite:
|
|
897
|
-
{ name: nonEmpty, source:
|
|
1004
|
+
suite: chunkVYODYUEL_cjs.obj(
|
|
1005
|
+
{ name: nonEmpty, source: chunkVYODYUEL_cjs.enumOf(["package", "config"]) },
|
|
898
1006
|
{ required: ["name", "source"] }
|
|
899
1007
|
),
|
|
900
|
-
config:
|
|
901
|
-
normalization:
|
|
902
|
-
stepNormalization:
|
|
903
|
-
ci:
|
|
904
|
-
|
|
1008
|
+
config: chunkVYODYUEL_cjs.packageConfig,
|
|
1009
|
+
normalization: chunkVYODYUEL_cjs.fingerprint,
|
|
1010
|
+
stepNormalization: chunkVYODYUEL_cjs.oneOf(chunkVYODYUEL_cjs.fingerprint, chunkVYODYUEL_cjs.nul),
|
|
1011
|
+
ci: chunkVYODYUEL_cjs.oneOf(
|
|
1012
|
+
chunkVYODYUEL_cjs.obj(
|
|
905
1013
|
{
|
|
906
|
-
provider:
|
|
1014
|
+
provider: chunkVYODYUEL_cjs.enumOf(["github", "gitlab", "jenkins", "azure", "other"]),
|
|
907
1015
|
commit: nonEmptyOrNull,
|
|
908
1016
|
branch: nonEmptyOrNull,
|
|
909
1017
|
buildUrl: nonEmptyOrNull
|
|
910
1018
|
},
|
|
911
1019
|
{ required: ["provider", "commit", "branch", "buildUrl"] }
|
|
912
1020
|
),
|
|
913
|
-
|
|
1021
|
+
chunkVYODYUEL_cjs.nul
|
|
914
1022
|
),
|
|
915
|
-
host:
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
1023
|
+
host: hostInfo,
|
|
1024
|
+
playwright: chunkVYODYUEL_cjs.obj({ version: chunkVYODYUEL_cjs.str() }, { required: ["version"] }),
|
|
1025
|
+
passes: passesInfo,
|
|
1026
|
+
// 17-REQ-17: null without shards, the merged shards after PW_PERF_MODE=merge.
|
|
1027
|
+
shards: chunkVYODYUEL_cjs.oneOf(
|
|
1028
|
+
chunkVYODYUEL_cjs.obj(
|
|
1029
|
+
{
|
|
1030
|
+
total: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
1031
|
+
missing: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.int({ minimum: 1 })),
|
|
1032
|
+
list: chunkVYODYUEL_cjs.arr(
|
|
1033
|
+
chunkVYODYUEL_cjs.obj(
|
|
1034
|
+
{
|
|
1035
|
+
index: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
1036
|
+
runId: chunkVYODYUEL_cjs.runId,
|
|
1037
|
+
startedAt: chunkVYODYUEL_cjs.timestamp,
|
|
1038
|
+
finishedAt: chunkVYODYUEL_cjs.timestamp,
|
|
1039
|
+
status: chunkVYODYUEL_cjs.testsStatus,
|
|
1040
|
+
passes: passesInfo,
|
|
1041
|
+
tests: testsInfo,
|
|
1042
|
+
samples: chunkVYODYUEL_cjs.count,
|
|
1043
|
+
host: hostInfo,
|
|
1044
|
+
buildUrl: nonEmptyOrNull
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
required: [
|
|
1048
|
+
"index",
|
|
1049
|
+
"runId",
|
|
1050
|
+
"startedAt",
|
|
1051
|
+
"finishedAt",
|
|
1052
|
+
"status",
|
|
1053
|
+
"passes",
|
|
1054
|
+
"tests",
|
|
1055
|
+
"samples",
|
|
1056
|
+
"host",
|
|
1057
|
+
"buildUrl"
|
|
1058
|
+
]
|
|
1059
|
+
}
|
|
1060
|
+
)
|
|
1061
|
+
)
|
|
1062
|
+
},
|
|
1063
|
+
{ required: ["total", "missing", "list"] }
|
|
1064
|
+
),
|
|
1065
|
+
chunkVYODYUEL_cjs.nul
|
|
934
1066
|
),
|
|
935
|
-
runConditions:
|
|
1067
|
+
runConditions: chunkVYODYUEL_cjs.obj(
|
|
936
1068
|
{
|
|
937
|
-
workers:
|
|
938
|
-
projects:
|
|
939
|
-
|
|
1069
|
+
workers: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
1070
|
+
projects: chunkVYODYUEL_cjs.arr(
|
|
1071
|
+
chunkVYODYUEL_cjs.obj(
|
|
940
1072
|
{
|
|
941
|
-
name:
|
|
942
|
-
role:
|
|
943
|
-
browserName:
|
|
944
|
-
repeatEach:
|
|
945
|
-
retries:
|
|
946
|
-
requestOnly:
|
|
1073
|
+
name: chunkVYODYUEL_cjs.str(),
|
|
1074
|
+
role: chunkVYODYUEL_cjs.enumOf(["measured", "dependency", "teardown"]),
|
|
1075
|
+
browserName: chunkVYODYUEL_cjs.oneOf(chunkVYODYUEL_cjs.str(), chunkVYODYUEL_cjs.nul),
|
|
1076
|
+
repeatEach: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
1077
|
+
retries: chunkVYODYUEL_cjs.int({ minimum: 0 }),
|
|
1078
|
+
requestOnly: chunkVYODYUEL_cjs.constant(true)
|
|
947
1079
|
},
|
|
948
1080
|
{ required: ["name", "role", "browserName", "repeatEach", "retries"] }
|
|
949
1081
|
)
|
|
950
1082
|
),
|
|
951
|
-
overriddenSettings:
|
|
1083
|
+
overriddenSettings: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.str())
|
|
952
1084
|
},
|
|
953
1085
|
{ required: ["workers", "projects", "overriddenSettings"] }
|
|
954
1086
|
),
|
|
955
|
-
tests:
|
|
1087
|
+
tests: testsInfo,
|
|
1088
|
+
evaluation: chunkVYODYUEL_cjs.obj(
|
|
956
1089
|
{
|
|
957
|
-
status:
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
flaky: chunkW7NEFS5V_cjs.count,
|
|
961
|
-
skipped: chunkW7NEFS5V_cjs.count
|
|
962
|
-
},
|
|
963
|
-
{ required: ["status", "expected", "unexpected", "flaky", "skipped"] }
|
|
964
|
-
),
|
|
965
|
-
evaluation: chunkW7NEFS5V_cjs.obj(
|
|
966
|
-
{
|
|
967
|
-
status: chunkW7NEFS5V_cjs.evaluationStatus,
|
|
968
|
-
gateEnabled: chunkW7NEFS5V_cjs.bool,
|
|
969
|
-
counts: chunkW7NEFS5V_cjs.obj(
|
|
1090
|
+
status: chunkVYODYUEL_cjs.evaluationStatus,
|
|
1091
|
+
gateEnabled: chunkVYODYUEL_cjs.bool,
|
|
1092
|
+
counts: chunkVYODYUEL_cjs.obj(
|
|
970
1093
|
{ api: evaluationCounts, step: evaluationCounts },
|
|
971
1094
|
{ required: ["api", "step"] }
|
|
972
1095
|
)
|
|
973
1096
|
},
|
|
974
1097
|
{ required: ["status", "gateEnabled", "counts"] }
|
|
975
1098
|
),
|
|
976
|
-
thresholdFiles:
|
|
977
|
-
warnings:
|
|
978
|
-
toolErrors:
|
|
979
|
-
origins:
|
|
980
|
-
|
|
981
|
-
{ origin: nonEmpty, label:
|
|
1099
|
+
thresholdFiles: chunkVYODYUEL_cjs.arr(thresholdFileInfo),
|
|
1100
|
+
warnings: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.issue),
|
|
1101
|
+
toolErrors: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.issue),
|
|
1102
|
+
origins: chunkVYODYUEL_cjs.arr(
|
|
1103
|
+
chunkVYODYUEL_cjs.obj(
|
|
1104
|
+
{ origin: nonEmpty, label: chunkVYODYUEL_cjs.str(), requestCount: chunkVYODYUEL_cjs.count },
|
|
982
1105
|
{ required: ["origin", "label", "requestCount"] }
|
|
983
1106
|
)
|
|
984
1107
|
),
|
|
985
|
-
endpoints:
|
|
986
|
-
steps:
|
|
1108
|
+
endpoints: chunkVYODYUEL_cjs.record(chunkVYODYUEL_cjs.key, aggregate),
|
|
1109
|
+
steps: chunkVYODYUEL_cjs.record(chunkVYODYUEL_cjs.key, stepAggregate),
|
|
987
1110
|
testBreakdown
|
|
988
1111
|
},
|
|
989
1112
|
{
|
|
@@ -1003,6 +1126,7 @@ var runReport = chunkW7NEFS5V_cjs.obj(
|
|
|
1003
1126
|
"host",
|
|
1004
1127
|
"playwright",
|
|
1005
1128
|
"passes",
|
|
1129
|
+
"shards",
|
|
1006
1130
|
"runConditions",
|
|
1007
1131
|
"tests",
|
|
1008
1132
|
"evaluation",
|
|
@@ -1016,24 +1140,24 @@ var runReport = chunkW7NEFS5V_cjs.obj(
|
|
|
1016
1140
|
]
|
|
1017
1141
|
}
|
|
1018
1142
|
);
|
|
1019
|
-
|
|
1143
|
+
chunkVYODYUEL_cjs.obj(
|
|
1020
1144
|
{
|
|
1021
|
-
schemaVersion:
|
|
1022
|
-
runId:
|
|
1145
|
+
schemaVersion: chunkVYODYUEL_cjs.constant(1),
|
|
1146
|
+
runId: chunkVYODYUEL_cjs.runId,
|
|
1023
1147
|
// The outcome has its own modes: a check writes neither a report nor thresholds (02-REQ-34).
|
|
1024
|
-
mode:
|
|
1025
|
-
exitCode:
|
|
1026
|
-
tests:
|
|
1027
|
-
evaluation:
|
|
1028
|
-
{ status:
|
|
1148
|
+
mode: chunkVYODYUEL_cjs.enumOf(["test", "thresholds", "check"]),
|
|
1149
|
+
exitCode: chunkVYODYUEL_cjs.enumOf([0, 2, 3]),
|
|
1150
|
+
tests: chunkVYODYUEL_cjs.obj({ status: chunkVYODYUEL_cjs.testsStatus }, { required: ["status"] }),
|
|
1151
|
+
evaluation: chunkVYODYUEL_cjs.obj(
|
|
1152
|
+
{ status: chunkVYODYUEL_cjs.evaluationStatus, gateEnabled: chunkVYODYUEL_cjs.bool },
|
|
1029
1153
|
{ required: ["status", "gateEnabled"] }
|
|
1030
1154
|
),
|
|
1031
|
-
toolErrors:
|
|
1032
|
-
paths:
|
|
1155
|
+
toolErrors: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.issue),
|
|
1156
|
+
paths: chunkVYODYUEL_cjs.obj(
|
|
1033
1157
|
{
|
|
1034
1158
|
reportJson: nonEmptyOrNull,
|
|
1035
1159
|
reportHtml: nonEmptyOrNull,
|
|
1036
|
-
thresholds:
|
|
1160
|
+
thresholds: chunkVYODYUEL_cjs.arr(nonEmpty),
|
|
1037
1161
|
thresholdsDiff: nonEmptyOrNull
|
|
1038
1162
|
},
|
|
1039
1163
|
{ required: ["reportJson", "reportHtml", "thresholds", "thresholdsDiff"] }
|
|
@@ -1053,12 +1177,35 @@ chunkW7NEFS5V_cjs.obj(
|
|
|
1053
1177
|
}
|
|
1054
1178
|
);
|
|
1055
1179
|
|
|
1180
|
+
// src/core/stats/classification.ts
|
|
1181
|
+
var ABORT_TEXTS = new Set(chunkVXGTC6DB_cjs.ABORT_FAILURE_TEXTS);
|
|
1182
|
+
function requestStatusLabel(sample) {
|
|
1183
|
+
const { status } = sample;
|
|
1184
|
+
if (typeof status === "number") return String(status);
|
|
1185
|
+
if (status === "FAILED" && sample.failureText !== void 0 && ABORT_TEXTS.has(sample.failureText)) {
|
|
1186
|
+
return "ABORTED";
|
|
1187
|
+
}
|
|
1188
|
+
return status;
|
|
1189
|
+
}
|
|
1190
|
+
var STATUS_CLASS = /^([1-9])xx$/u;
|
|
1191
|
+
var HTTP_CODE = /^[1-9]\d\d$/u;
|
|
1192
|
+
function compileStatusMatcher(patterns) {
|
|
1193
|
+
const classes = /* @__PURE__ */ new Set();
|
|
1194
|
+
const exact = /* @__PURE__ */ new Set();
|
|
1195
|
+
for (const pattern of patterns) {
|
|
1196
|
+
const match = STATUS_CLASS.exec(pattern);
|
|
1197
|
+
if (match?.[1] !== void 0) classes.add(match[1]);
|
|
1198
|
+
else exact.add(pattern);
|
|
1199
|
+
}
|
|
1200
|
+
return (label) => exact.has(label) || HTTP_CODE.test(label) && classes.has(label.charAt(0));
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1056
1203
|
// src/core/schema/parse.ts
|
|
1057
1204
|
var MAX_PROBLEMS = 5;
|
|
1058
1205
|
var SCHEMA_VERSIONS = {
|
|
1059
|
-
samples:
|
|
1060
|
-
runReport:
|
|
1061
|
-
thresholds:
|
|
1206
|
+
samples: 4,
|
|
1207
|
+
runReport: 5,
|
|
1208
|
+
thresholds: 3,
|
|
1062
1209
|
outcome: 1
|
|
1063
1210
|
};
|
|
1064
1211
|
var HINTS = {
|
|
@@ -1101,7 +1248,7 @@ function migrate(document, from, to, migrations) {
|
|
|
1101
1248
|
return current;
|
|
1102
1249
|
}
|
|
1103
1250
|
function validate(document, source, format) {
|
|
1104
|
-
const sink = new
|
|
1251
|
+
const sink = new chunkVYODYUEL_cjs.Sink(MAX_PROBLEMS + 1);
|
|
1105
1252
|
format.schema.check(document, "", sink);
|
|
1106
1253
|
if (sink.problems.length === 0) format.extraChecks?.(document, sink);
|
|
1107
1254
|
if (sink.problems.length === 0) return null;
|
|
@@ -1116,7 +1263,7 @@ function parseVersioned(text2, source, format, options = {}) {
|
|
|
1116
1263
|
const parsed = parseJson(text2, source, format);
|
|
1117
1264
|
if (!parsed.ok) return parsed;
|
|
1118
1265
|
const document = parsed.value;
|
|
1119
|
-
if (!
|
|
1266
|
+
if (!chunkVYODYUEL_cjs.isRecord(document)) {
|
|
1120
1267
|
return failure(
|
|
1121
1268
|
issueOf("SCHEMA_VALIDATION_FAILED", source, `${format.name} does not match the format`, [
|
|
1122
1269
|
{ pointer: "", message: "must be object" }
|
|
@@ -1179,21 +1326,21 @@ var SAMPLES_FORMAT = {
|
|
|
1179
1326
|
};
|
|
1180
1327
|
function migrateRunReportV1(document) {
|
|
1181
1328
|
const aggregates = (value) => {
|
|
1182
|
-
if (!
|
|
1329
|
+
if (!chunkVYODYUEL_cjs.isRecord(value)) return value;
|
|
1183
1330
|
return Object.fromEntries(
|
|
1184
1331
|
Object.entries(value).map(([name, aggregate2]) => {
|
|
1185
|
-
if (!
|
|
1332
|
+
if (!chunkVYODYUEL_cjs.isRecord(aggregate2)) return [name, aggregate2];
|
|
1186
1333
|
const evaluation = aggregate2.evaluation;
|
|
1187
1334
|
const ttfb = aggregate2.ttfb;
|
|
1188
1335
|
return [
|
|
1189
1336
|
name,
|
|
1190
1337
|
{
|
|
1191
1338
|
...aggregate2,
|
|
1192
|
-
ttfb:
|
|
1193
|
-
evaluation:
|
|
1339
|
+
ttfb: chunkVYODYUEL_cjs.isRecord(ttfb) ? { ...ttfb, otherP50: null } : ttfb,
|
|
1340
|
+
evaluation: chunkVYODYUEL_cjs.isRecord(evaluation) && Array.isArray(evaluation.checks) ? {
|
|
1194
1341
|
...evaluation,
|
|
1195
1342
|
checks: evaluation.checks.map(
|
|
1196
|
-
(check2) =>
|
|
1343
|
+
(check2) => chunkVYODYUEL_cjs.isRecord(check2) ? { ...check2, usage: null } : check2
|
|
1197
1344
|
)
|
|
1198
1345
|
} : evaluation,
|
|
1199
1346
|
histogram: null,
|
|
@@ -1211,22 +1358,22 @@ function migrateRunReportV1(document) {
|
|
|
1211
1358
|
};
|
|
1212
1359
|
}
|
|
1213
1360
|
function withoutCustomOptions(config) {
|
|
1214
|
-
if (!
|
|
1361
|
+
if (!chunkVYODYUEL_cjs.isRecord(config) || !chunkVYODYUEL_cjs.isRecord(config.checks)) return config;
|
|
1215
1362
|
const drop = (value) => {
|
|
1216
|
-
if (!
|
|
1363
|
+
if (!chunkVYODYUEL_cjs.isRecord(value)) return value;
|
|
1217
1364
|
const { custom: _removed, ...rest } = value;
|
|
1218
1365
|
return rest;
|
|
1219
1366
|
};
|
|
1220
1367
|
const checks = Object.fromEntries(
|
|
1221
1368
|
Object.entries(config.checks).map(([group, rules]) => {
|
|
1222
|
-
if (!
|
|
1369
|
+
if (!chunkVYODYUEL_cjs.isRecord(rules)) return [group, rules];
|
|
1223
1370
|
if (group === "errors") return [group, { ...rules, limit: drop(rules.limit) }];
|
|
1224
1371
|
return [
|
|
1225
1372
|
group,
|
|
1226
1373
|
Object.fromEntries(
|
|
1227
1374
|
Object.entries(rules).map(([name, rule]) => {
|
|
1228
1375
|
if (group === "slowShare" && name === "t") return [name, drop(rule)];
|
|
1229
|
-
if (!
|
|
1376
|
+
if (!chunkVYODYUEL_cjs.isRecord(rule) || !Object.hasOwn(rule, "limit")) return [name, rule];
|
|
1230
1377
|
return [name, { ...rule, limit: drop(rule.limit) }];
|
|
1231
1378
|
})
|
|
1232
1379
|
)
|
|
@@ -1236,18 +1383,18 @@ function withoutCustomOptions(config) {
|
|
|
1236
1383
|
return { ...config, checks };
|
|
1237
1384
|
}
|
|
1238
1385
|
function withStepOptions(config) {
|
|
1239
|
-
if (!
|
|
1386
|
+
if (!chunkVYODYUEL_cjs.isRecord(config)) return config;
|
|
1240
1387
|
const out = { ...config };
|
|
1241
|
-
if (
|
|
1242
|
-
out.measure = { ...config.measure, steps:
|
|
1388
|
+
if (chunkVYODYUEL_cjs.isRecord(config.measure) && !Object.hasOwn(config.measure, "steps")) {
|
|
1389
|
+
out.measure = { ...config.measure, steps: chunkVYODYUEL_cjs.expandSteps(false) };
|
|
1243
1390
|
}
|
|
1244
|
-
if (
|
|
1245
|
-
const defaults =
|
|
1246
|
-
const withStep = (value, fallback) =>
|
|
1391
|
+
if (chunkVYODYUEL_cjs.isRecord(config.checks)) {
|
|
1392
|
+
const defaults = chunkVYODYUEL_cjs.DEFAULT_CONFIG.checks;
|
|
1393
|
+
const withStep = (value, fallback) => chunkVYODYUEL_cjs.isRecord(value) && !Object.hasOwn(value, "step") && chunkVYODYUEL_cjs.isRecord(fallback) ? { ...value, step: structuredClone(fallback.step) } : value;
|
|
1247
1394
|
out.checks = Object.fromEntries(
|
|
1248
1395
|
Object.entries(config.checks).map(([group, rules]) => {
|
|
1249
1396
|
const groupDefaults = defaults[group];
|
|
1250
|
-
if (!
|
|
1397
|
+
if (!chunkVYODYUEL_cjs.isRecord(rules) || !chunkVYODYUEL_cjs.isRecord(groupDefaults)) return [group, rules];
|
|
1251
1398
|
if (group === "errors") {
|
|
1252
1399
|
return [group, { ...rules, limit: withStep(rules.limit, groupDefaults.limit) }];
|
|
1253
1400
|
}
|
|
@@ -1258,7 +1405,7 @@ function withStepOptions(config) {
|
|
|
1258
1405
|
const ruleDefaults = groupDefaults[name];
|
|
1259
1406
|
if (group === "slowShare" && name === "t")
|
|
1260
1407
|
return [name, withStep(rule, ruleDefaults)];
|
|
1261
|
-
if (!
|
|
1408
|
+
if (!chunkVYODYUEL_cjs.isRecord(rule) || !chunkVYODYUEL_cjs.isRecord(ruleDefaults)) return [name, rule];
|
|
1262
1409
|
if (!Object.hasOwn(rule, "limit")) return [name, rule];
|
|
1263
1410
|
return [name, { ...rule, limit: withStep(rule.limit, ruleDefaults.limit) }];
|
|
1264
1411
|
})
|
|
@@ -1270,21 +1417,21 @@ function withStepOptions(config) {
|
|
|
1270
1417
|
return out;
|
|
1271
1418
|
}
|
|
1272
1419
|
function withPassesOption(config) {
|
|
1273
|
-
if (!
|
|
1420
|
+
if (!chunkVYODYUEL_cjs.isRecord(config) || !chunkVYODYUEL_cjs.isRecord(config.run)) return config;
|
|
1274
1421
|
const { repeat, ...run } = config.run;
|
|
1275
1422
|
return repeat === void 0 ? config : { ...config, run: { ...run, passes: repeat } };
|
|
1276
1423
|
}
|
|
1277
1424
|
function withGateAndPresetOptions(config) {
|
|
1278
|
-
if (!
|
|
1425
|
+
if (!chunkVYODYUEL_cjs.isRecord(config)) return config;
|
|
1279
1426
|
const out = { ...config };
|
|
1280
|
-
if (
|
|
1427
|
+
if (chunkVYODYUEL_cjs.isRecord(config.gate)) {
|
|
1281
1428
|
const { warnOnly: _warnOnly, ...gate } = config.gate;
|
|
1282
1429
|
out.gate = gate;
|
|
1283
1430
|
}
|
|
1284
|
-
if (
|
|
1431
|
+
if (chunkVYODYUEL_cjs.isRecord(config.thresholds) && !Object.hasOwn(config.thresholds, "preset")) {
|
|
1285
1432
|
out.thresholds = { preset: "normal", ...config.thresholds };
|
|
1286
1433
|
}
|
|
1287
|
-
if (
|
|
1434
|
+
if (chunkVYODYUEL_cjs.isRecord(config.run) && !Object.hasOwn(config.run, "grep")) {
|
|
1288
1435
|
out.run = { ...config.run, grep: null };
|
|
1289
1436
|
}
|
|
1290
1437
|
return out;
|
|
@@ -1292,7 +1439,7 @@ function withGateAndPresetOptions(config) {
|
|
|
1292
1439
|
function migrateRunReportV2(document) {
|
|
1293
1440
|
const { custom: _custom, ...rest } = document;
|
|
1294
1441
|
const evaluation = document.evaluation;
|
|
1295
|
-
const counts =
|
|
1442
|
+
const counts = chunkVYODYUEL_cjs.isRecord(evaluation) ? evaluation.counts : void 0;
|
|
1296
1443
|
const files = document.thresholdFiles;
|
|
1297
1444
|
return {
|
|
1298
1445
|
...rest,
|
|
@@ -1303,14 +1450,14 @@ function migrateRunReportV2(document) {
|
|
|
1303
1450
|
config: withGateAndPresetOptions(
|
|
1304
1451
|
withPassesOption(withStepOptions(withoutCustomOptions(document.config)))
|
|
1305
1452
|
),
|
|
1306
|
-
evaluation:
|
|
1453
|
+
evaluation: chunkVYODYUEL_cjs.isRecord(evaluation) && chunkVYODYUEL_cjs.isRecord(counts) ? {
|
|
1307
1454
|
...evaluation,
|
|
1308
1455
|
counts: {
|
|
1309
1456
|
...Object.fromEntries(Object.entries(counts).filter(([k]) => k !== "custom")),
|
|
1310
1457
|
step: Object.fromEntries(Object.keys(counts.api ?? {}).map((name) => [name, 0]))
|
|
1311
1458
|
}
|
|
1312
1459
|
} : evaluation,
|
|
1313
|
-
thresholdFiles: Array.isArray(files) ? files.filter((file) => !(
|
|
1460
|
+
thresholdFiles: Array.isArray(files) ? files.filter((file) => !(chunkVYODYUEL_cjs.isRecord(file) && file.kind === "custom")) : files
|
|
1314
1461
|
};
|
|
1315
1462
|
}
|
|
1316
1463
|
function sum(values) {
|
|
@@ -1322,17 +1469,17 @@ function checkRunReport(document, sink) {
|
|
|
1322
1469
|
for (const [name, aggregate2] of Object.entries(map)) {
|
|
1323
1470
|
const histogram3 = aggregate2.histogram;
|
|
1324
1471
|
if (histogram3 === null) continue;
|
|
1325
|
-
const pointer =
|
|
1472
|
+
const pointer = chunkVYODYUEL_cjs.child(chunkVYODYUEL_cjs.child(`/${kind2}`, name), "histogram");
|
|
1326
1473
|
const { edges, counts } = histogram3;
|
|
1327
1474
|
if (edges.some((edge, i) => i > 0 && edge <= (edges[i - 1] ?? 0))) {
|
|
1328
|
-
sink.add(
|
|
1475
|
+
sink.add(chunkVYODYUEL_cjs.child(pointer, "edges"), "must be strictly ascending");
|
|
1329
1476
|
}
|
|
1330
1477
|
if (counts.length !== edges.length - 1) {
|
|
1331
|
-
sink.add(
|
|
1478
|
+
sink.add(chunkVYODYUEL_cjs.child(pointer, "counts"), "must have one item fewer than edges");
|
|
1332
1479
|
}
|
|
1333
1480
|
const retained = aggregate2.samples.durations.length;
|
|
1334
1481
|
if (sum(counts) !== retained) {
|
|
1335
|
-
sink.add(
|
|
1482
|
+
sink.add(chunkVYODYUEL_cjs.child(pointer, "counts"), "must sum to the number of samples.durations");
|
|
1336
1483
|
}
|
|
1337
1484
|
}
|
|
1338
1485
|
}
|
|
@@ -1354,20 +1501,94 @@ function checkRunReport(document, sink) {
|
|
|
1354
1501
|
}
|
|
1355
1502
|
function migrateRunReportV3(document) {
|
|
1356
1503
|
const config = document.config;
|
|
1357
|
-
if (!
|
|
1504
|
+
if (!chunkVYODYUEL_cjs.isRecord(config) || !chunkVYODYUEL_cjs.isRecord(config.run)) return document;
|
|
1358
1505
|
const { projects: _projects, ...run } = config.run;
|
|
1359
|
-
const measure =
|
|
1360
|
-
const report =
|
|
1506
|
+
const measure = chunkVYODYUEL_cjs.isRecord(config.measure) ? { api: true, ...config.measure } : config.measure;
|
|
1507
|
+
const report = chunkVYODYUEL_cjs.isRecord(config.report) ? { ...config.report, junit: false } : config.report;
|
|
1361
1508
|
return {
|
|
1362
1509
|
...document,
|
|
1363
1510
|
config: { ...config, run: { ...run, overrideSlowMo: false }, measure, report }
|
|
1364
1511
|
};
|
|
1365
1512
|
}
|
|
1513
|
+
function withV5AggregateFields(aggregate2, isSuccess) {
|
|
1514
|
+
if (!chunkVYODYUEL_cjs.isRecord(aggregate2)) return aggregate2;
|
|
1515
|
+
let nonSuccessCount = null;
|
|
1516
|
+
if (isSuccess !== null && chunkVYODYUEL_cjs.isRecord(aggregate2.statuses)) {
|
|
1517
|
+
nonSuccessCount = 0;
|
|
1518
|
+
for (const [label, n] of Object.entries(aggregate2.statuses)) {
|
|
1519
|
+
if (/^[1-5][0-9]{2}$/u.test(label) && !isSuccess(label) && typeof n === "number") {
|
|
1520
|
+
nonSuccessCount += n;
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
const evaluation = aggregate2.evaluation;
|
|
1525
|
+
return {
|
|
1526
|
+
...aggregate2,
|
|
1527
|
+
cold: null,
|
|
1528
|
+
nonSuccessCount,
|
|
1529
|
+
failedTimings: [],
|
|
1530
|
+
evaluation: chunkVYODYUEL_cjs.isRecord(evaluation) ? {
|
|
1531
|
+
...evaluation,
|
|
1532
|
+
limits: chunkVYODYUEL_cjs.isRecord(evaluation.limits) ? { ...evaluation.limits, maxNonSuccessRate: null } : evaluation.limits,
|
|
1533
|
+
workload: null
|
|
1534
|
+
} : evaluation
|
|
1535
|
+
};
|
|
1536
|
+
}
|
|
1537
|
+
function mapValues(map, f) {
|
|
1538
|
+
if (!chunkVYODYUEL_cjs.isRecord(map)) return map;
|
|
1539
|
+
return Object.fromEntries(Object.entries(map).map(([k, v]) => [k, f(v)]));
|
|
1540
|
+
}
|
|
1541
|
+
function migrateRunReportV4(document) {
|
|
1542
|
+
const config = document.config;
|
|
1543
|
+
const measure = chunkVYODYUEL_cjs.isRecord(config) ? config.measure : void 0;
|
|
1544
|
+
const statuses = chunkVYODYUEL_cjs.isRecord(measure) ? measure.successStatuses : void 0;
|
|
1545
|
+
const isSuccess = compileStatusMatcher(
|
|
1546
|
+
Array.isArray(statuses) ? statuses.filter((s) => typeof s === "string") : chunkVYODYUEL_cjs.DEFAULT_CONFIG.measure.successStatuses
|
|
1547
|
+
);
|
|
1548
|
+
let snapshot = config;
|
|
1549
|
+
if (chunkVYODYUEL_cjs.isRecord(config)) {
|
|
1550
|
+
const checks = chunkVYODYUEL_cjs.isRecord(config.checks) ? config.checks : {};
|
|
1551
|
+
const errors = chunkVYODYUEL_cjs.isRecord(checks.errors) ? checks.errors : {};
|
|
1552
|
+
const defaults = chunkVYODYUEL_cjs.DEFAULT_CONFIG.checks.nonSuccess;
|
|
1553
|
+
const thresholds = chunkVYODYUEL_cjs.isRecord(config.thresholds) ? config.thresholds : {};
|
|
1554
|
+
const keys = chunkVYODYUEL_cjs.isRecord(config.keys) ? config.keys : {};
|
|
1555
|
+
snapshot = {
|
|
1556
|
+
...config,
|
|
1557
|
+
// Also in a sparse snapshot: the default (1) would claim cold samples were set apart.
|
|
1558
|
+
measure: { ...chunkVYODYUEL_cjs.isRecord(measure) ? measure : {}, coldSamples: 0 },
|
|
1559
|
+
checks: {
|
|
1560
|
+
...checks,
|
|
1561
|
+
nonSuccess: {
|
|
1562
|
+
...defaults,
|
|
1563
|
+
limit: { ...defaults.limit },
|
|
1564
|
+
margin: chunkVYODYUEL_cjs.isRecord(errors.margin) ? { ...errors.margin } : { ...defaults.margin }
|
|
1565
|
+
}
|
|
1566
|
+
},
|
|
1567
|
+
thresholds: {
|
|
1568
|
+
...thresholds,
|
|
1569
|
+
workloadShift: { ...chunkVYODYUEL_cjs.DEFAULT_CONFIG.thresholds.workloadShift }
|
|
1570
|
+
},
|
|
1571
|
+
keys: { ...keys, operations: [] }
|
|
1572
|
+
};
|
|
1573
|
+
}
|
|
1574
|
+
return {
|
|
1575
|
+
...document,
|
|
1576
|
+
config: snapshot,
|
|
1577
|
+
shards: null,
|
|
1578
|
+
endpoints: mapValues(document.endpoints, (a) => withV5AggregateFields(a, isSuccess)),
|
|
1579
|
+
steps: mapValues(document.steps, (a) => withV5AggregateFields(a, null))
|
|
1580
|
+
};
|
|
1581
|
+
}
|
|
1366
1582
|
var RUN_REPORT_FORMAT = {
|
|
1367
1583
|
name: "run report",
|
|
1368
1584
|
schemaFile: "run-report.schema.json",
|
|
1369
1585
|
current: SCHEMA_VERSIONS.runReport,
|
|
1370
|
-
migrations: {
|
|
1586
|
+
migrations: {
|
|
1587
|
+
1: migrateRunReportV1,
|
|
1588
|
+
2: migrateRunReportV2,
|
|
1589
|
+
3: migrateRunReportV3,
|
|
1590
|
+
4: migrateRunReportV4
|
|
1591
|
+
},
|
|
1371
1592
|
schema: runReport,
|
|
1372
1593
|
extraChecks: checkRunReport
|
|
1373
1594
|
};
|
|
@@ -1376,13 +1597,14 @@ var THRESHOLDS_FORMAT = {
|
|
|
1376
1597
|
schemaFile: "thresholds.schema.json",
|
|
1377
1598
|
current: SCHEMA_VERSIONS.thresholds,
|
|
1378
1599
|
// v1 → v2 changes no content (02-REQ-33): a v1 file of kind custom fails validation after it.
|
|
1379
|
-
|
|
1600
|
+
// v2 → v3 changes no content either: the fields of 1.1.0 are optional (02-REQ-43).
|
|
1601
|
+
migrations: { 1: (document) => document, 2: (document) => document },
|
|
1380
1602
|
schema: thresholdsFile,
|
|
1381
1603
|
extraChecks(document, sink) {
|
|
1382
1604
|
const entries2 = document.entries;
|
|
1383
1605
|
for (const [name, entry] of Object.entries(entries2)) {
|
|
1384
1606
|
if (typeof entry.until === "string" && !isCalendarDate(entry.until)) {
|
|
1385
|
-
sink.add(
|
|
1607
|
+
sink.add(chunkVYODYUEL_cjs.child(chunkVYODYUEL_cjs.child("/entries", name), "until"), "must be an existing calendar date");
|
|
1386
1608
|
}
|
|
1387
1609
|
}
|
|
1388
1610
|
}
|
|
@@ -1424,7 +1646,7 @@ function thresholdsFileName(prefix, kind2, env) {
|
|
|
1424
1646
|
function thresholdsFilePaths(location) {
|
|
1425
1647
|
const dir = resolvePath(location.configDir, location.dir);
|
|
1426
1648
|
const path = (kind2) => resolvePath(dir, thresholdsFileName(location.filePrefix, kind2, location.env));
|
|
1427
|
-
return Object.fromEntries(
|
|
1649
|
+
return Object.fromEntries(chunkVXGTC6DB_cjs.KINDS.map((kind2) => [kind2, path(kind2)]));
|
|
1428
1650
|
}
|
|
1429
1651
|
async function loadFile(location, kind2) {
|
|
1430
1652
|
const absolute = thresholdsFilePaths(location)[kind2];
|
|
@@ -1472,8 +1694,49 @@ async function loadFile(location, kind2) {
|
|
|
1472
1694
|
};
|
|
1473
1695
|
}
|
|
1474
1696
|
async function loadThresholds(location) {
|
|
1475
|
-
const files = await Promise.all(
|
|
1476
|
-
return Object.fromEntries(
|
|
1697
|
+
const files = await Promise.all(chunkVXGTC6DB_cjs.KINDS.map((kind2) => loadFile(location, kind2)));
|
|
1698
|
+
return Object.fromEntries(chunkVXGTC6DB_cjs.KINDS.map((kind2, i) => [kind2, files[i]]));
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
// src/reporter/process-host.ts
|
|
1702
|
+
function processHost() {
|
|
1703
|
+
const env = process.env;
|
|
1704
|
+
return {
|
|
1705
|
+
env,
|
|
1706
|
+
io: {
|
|
1707
|
+
loadThresholds,
|
|
1708
|
+
thresholdsFilePaths,
|
|
1709
|
+
writeJsonStable,
|
|
1710
|
+
writeTextAtomic,
|
|
1711
|
+
resolvePath,
|
|
1712
|
+
directoryOf,
|
|
1713
|
+
relativeSlashPath,
|
|
1714
|
+
removeFileSync,
|
|
1715
|
+
readPackageInfo,
|
|
1716
|
+
readSuite,
|
|
1717
|
+
tempPath,
|
|
1718
|
+
readTextFile,
|
|
1719
|
+
readTextFileSync,
|
|
1720
|
+
listDirSync,
|
|
1721
|
+
isDirectorySync,
|
|
1722
|
+
realPathSync,
|
|
1723
|
+
homeDir,
|
|
1724
|
+
scanDirSync,
|
|
1725
|
+
emptyDirSync
|
|
1726
|
+
},
|
|
1727
|
+
stdout: process.stdout,
|
|
1728
|
+
stderr: process.stderr,
|
|
1729
|
+
cwd: process.cwd(),
|
|
1730
|
+
argv: process.argv,
|
|
1731
|
+
now: () => /* @__PURE__ */ new Date(),
|
|
1732
|
+
random: Math.random,
|
|
1733
|
+
ci: readCiInfo(env),
|
|
1734
|
+
host: readHostInfo(env),
|
|
1735
|
+
execPath: process.execPath,
|
|
1736
|
+
pid: process.pid,
|
|
1737
|
+
processTable: readProcessTable,
|
|
1738
|
+
runPass: (command, passEnv) => runPass(command, passEnv, process.cwd())
|
|
1739
|
+
};
|
|
1477
1740
|
}
|
|
1478
1741
|
|
|
1479
1742
|
// src/core/evaluate/files.ts
|
|
@@ -1489,7 +1752,7 @@ function envlessPath(path, env) {
|
|
|
1489
1752
|
return path.endsWith(suffix) ? `${path.slice(0, -suffix.length)}.json` : path;
|
|
1490
1753
|
}
|
|
1491
1754
|
function missingFileWarning(file, env) {
|
|
1492
|
-
const derive = `Derive thresholds with \`${
|
|
1755
|
+
const derive = `Derive thresholds with \`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\`${env === null ? "" : ` (environment "${env}")`}.`;
|
|
1493
1756
|
const envless = env !== null && file.envlessFileExists ? ` ${envlessPath(file.path, env)} exists but is not used for environment "${env}": thresholds of another environment would give false alarms or hide regressions.` : "";
|
|
1494
1757
|
return {
|
|
1495
1758
|
code: "THRESHOLDS_FILE_MISSING",
|
|
@@ -1501,11 +1764,11 @@ function emptyFileWarning(path, kind2, env) {
|
|
|
1501
1764
|
return {
|
|
1502
1765
|
code: "THRESHOLDS_FILE_EMPTY",
|
|
1503
1766
|
message: `Thresholds file ${path} has no entries; ${KIND_NOUN[kind2]} keys are evaluated with default thresholds.`,
|
|
1504
|
-
hint: `Derive thresholds with \`${
|
|
1767
|
+
hint: `Derive thresholds with \`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\`${env === null ? "" : ` (environment "${env}")`}.`
|
|
1505
1768
|
};
|
|
1506
1769
|
}
|
|
1507
1770
|
var MAX_KEYS_IN_MESSAGE = 3;
|
|
1508
|
-
function keysOnDefaultsWarning(path, kind2, keys, env) {
|
|
1771
|
+
function keysOnDefaultsWarning(path, kind2, keys, env, operationKeys = false) {
|
|
1509
1772
|
const one = keys.length === 1;
|
|
1510
1773
|
const named = keys.slice(0, MAX_KEYS_IN_MESSAGE).join(", ");
|
|
1511
1774
|
const rest = keys.length - MAX_KEYS_IN_MESSAGE;
|
|
@@ -1513,9 +1776,10 @@ function keysOnDefaultsWarning(path, kind2, keys, env) {
|
|
|
1513
1776
|
return {
|
|
1514
1777
|
code: "THRESHOLDS_KEYS_ON_DEFAULTS",
|
|
1515
1778
|
message: `${plural(keys.length, `${KIND_NOUN[kind2]} key`)} ${one ? "has" : "have"} no entry in ${path} and ${one ? "is" : "are"} evaluated with default thresholds: ${list2}.`,
|
|
1516
|
-
hint: `New endpoints or steps, or keys renamed by a code or normalization change, get the default thresholds. Add entries with \`${
|
|
1779
|
+
hint: operationKeys ? OPERATION_KEYS_HINT : `New endpoints or steps, or keys renamed by a code or normalization change, get the default thresholds. Add entries with \`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\`${env === null ? "" : ` (environment "${env}")`}; locked entries are kept.`
|
|
1517
1780
|
};
|
|
1518
1781
|
}
|
|
1782
|
+
var OPERATION_KEYS_HINT = `keys.operations changed the endpoint keys (keys with #): derive thresholds again with \`${chunkVXGTC6DB_cjs.PRUNE_COMMAND}\`, review the diff and commit the files; locked entries are kept.`;
|
|
1519
1783
|
function majorMinor(version2) {
|
|
1520
1784
|
return version2.split(".").slice(0, 2).join(".");
|
|
1521
1785
|
}
|
|
@@ -1532,6 +1796,7 @@ function sourceDifferences(generated, source) {
|
|
|
1532
1796
|
const diffs = [];
|
|
1533
1797
|
let timing = false;
|
|
1534
1798
|
let keys = false;
|
|
1799
|
+
let cold2 = false;
|
|
1535
1800
|
if (!sameList(generated.browsers, source.browsers)) {
|
|
1536
1801
|
diffs.push(`browsers ${listText(generated.browsers)} / ${listText(source.browsers)}`);
|
|
1537
1802
|
timing = true;
|
|
@@ -1553,8 +1818,13 @@ function sourceDifferences(generated, source) {
|
|
|
1553
1818
|
diffs.push(`normalization ${generated.normalization} / ${source.normalization}`);
|
|
1554
1819
|
keys = true;
|
|
1555
1820
|
}
|
|
1556
|
-
|
|
1821
|
+
if (generated.coldSamples !== void 0 && source.coldSamples !== void 0 && generated.coldSamples !== source.coldSamples) {
|
|
1822
|
+
diffs.push(`coldSamples ${generated.coldSamples} / ${source.coldSamples}`);
|
|
1823
|
+
cold2 = true;
|
|
1824
|
+
}
|
|
1825
|
+
return { diffs, timing, keys, cold: cold2 };
|
|
1557
1826
|
}
|
|
1827
|
+
var COLD_SAMPLES_HINT = `Another measure.coldSamples changes which samples are timed: derive thresholds again with \`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\`.`;
|
|
1558
1828
|
function generatedWarnings(path, generated, cfg, env, source) {
|
|
1559
1829
|
const issues = [];
|
|
1560
1830
|
const level = cfg.checks.time.percentile.level;
|
|
@@ -1562,7 +1832,7 @@ function generatedWarnings(path, generated, cfg, env, source) {
|
|
|
1562
1832
|
issues.push({
|
|
1563
1833
|
code: "EVAL_PERCENTILE_MISMATCH",
|
|
1564
1834
|
message: `Thresholds in ${path} were derived for ${generated.evaluatedPercentile}, but this run evaluates ${level}; the percentile limits are compared with ${level}.`,
|
|
1565
|
-
hint: `Derive thresholds again with \`${
|
|
1835
|
+
hint: `Derive thresholds again with \`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\` after changing checks.time.percentile.level.`
|
|
1566
1836
|
});
|
|
1567
1837
|
}
|
|
1568
1838
|
if (generated.env !== env) {
|
|
@@ -1573,7 +1843,7 @@ function generatedWarnings(path, generated, cfg, env, source) {
|
|
|
1573
1843
|
hint: "The file was probably copied or renamed by hand; derive thresholds for this environment."
|
|
1574
1844
|
});
|
|
1575
1845
|
}
|
|
1576
|
-
const { diffs, timing, keys } = sourceDifferences(generated, source);
|
|
1846
|
+
const { diffs, timing, keys, cold: cold2 } = sourceDifferences(generated, source);
|
|
1577
1847
|
if (diffs.length > 0) {
|
|
1578
1848
|
const hints = [];
|
|
1579
1849
|
if (timing) {
|
|
@@ -1583,9 +1853,10 @@ function generatedWarnings(path, generated, cfg, env, source) {
|
|
|
1583
1853
|
}
|
|
1584
1854
|
if (keys) {
|
|
1585
1855
|
hints.push(
|
|
1586
|
-
|
|
1856
|
+
"Another normalization (keys.* options or the baseURL origins) changes the keys: derive thresholds again with `PW_PERF_MODE=thresholds PW_PERF_PRUNE=1 <your test command>` to drop the entries of the old keys, then review the diff."
|
|
1587
1857
|
);
|
|
1588
1858
|
}
|
|
1859
|
+
if (cold2) hints.push(COLD_SAMPLES_HINT);
|
|
1589
1860
|
issues.push({
|
|
1590
1861
|
code: "THRESHOLDS_SOURCE_MISMATCH",
|
|
1591
1862
|
message: `Thresholds in ${path} come from a run with other conditions (thresholds / this run): ${diffs.join("; ")}.`,
|
|
@@ -1594,18 +1865,22 @@ function generatedWarnings(path, generated, cfg, env, source) {
|
|
|
1594
1865
|
}
|
|
1595
1866
|
return issues;
|
|
1596
1867
|
}
|
|
1597
|
-
function unseenWarning(path, unseen) {
|
|
1868
|
+
function unseenWarning(path, unseen, operationKeys = false) {
|
|
1598
1869
|
return {
|
|
1599
1870
|
code: "THRESHOLDS_UNSEEN_ENTRIES",
|
|
1600
1871
|
message: `${plural(unseen.length, "entry", "entries")} in ${path} ${unseen.length === 1 ? "was" : "were"} not seen in this run.`,
|
|
1601
|
-
hint: `Run the full suite, or remove stale entries with \`${
|
|
1872
|
+
hint: operationKeys ? OPERATION_KEYS_HINT : `Run the full suite, or remove stale entries with \`${chunkVXGTC6DB_cjs.PRUNE_COMMAND}\`.`
|
|
1602
1873
|
};
|
|
1603
1874
|
}
|
|
1875
|
+
function operationKeysChanged(kind2, generated, source, keys) {
|
|
1876
|
+
if (kind2 !== "api" || generated === null) return false;
|
|
1877
|
+
return generated.normalization !== source.normalization && keys.some((k) => k.includes("#"));
|
|
1878
|
+
}
|
|
1604
1879
|
function outdatedWarning(path, from, current) {
|
|
1605
1880
|
return {
|
|
1606
1881
|
code: "THRESHOLDS_FILE_OUTDATED",
|
|
1607
1882
|
message: `Thresholds file ${path} has format version ${from}; it was read after migration to version ${current}.`,
|
|
1608
|
-
hint: `The next thresholds run (\`${
|
|
1883
|
+
hint: `The next thresholds run (\`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\`) writes it in the current version and keeps locked entries.`
|
|
1609
1884
|
};
|
|
1610
1885
|
}
|
|
1611
1886
|
function fileInfo(file, unseenKeys) {
|
|
@@ -1619,6 +1894,9 @@ function fileInfo(file, unseenKeys) {
|
|
|
1619
1894
|
}
|
|
1620
1895
|
|
|
1621
1896
|
// src/core/evaluate/limits.ts
|
|
1897
|
+
function defaultNonSuccess(checks, kind2) {
|
|
1898
|
+
return kind2 === "api" ? checks.nonSuccess.limit.api : null;
|
|
1899
|
+
}
|
|
1622
1900
|
function defaultLimits(checks, kind2) {
|
|
1623
1901
|
return {
|
|
1624
1902
|
t: null,
|
|
@@ -1627,7 +1905,8 @@ function defaultLimits(checks, kind2) {
|
|
|
1627
1905
|
p99: checks.time.p99.limit[kind2],
|
|
1628
1906
|
minApdex: null,
|
|
1629
1907
|
maxWilson: null,
|
|
1630
|
-
maxErrorRate: checks.errors.limit[kind2]
|
|
1908
|
+
maxErrorRate: checks.errors.limit[kind2],
|
|
1909
|
+
maxNonSuccessRate: defaultNonSuccess(checks, kind2)
|
|
1631
1910
|
};
|
|
1632
1911
|
}
|
|
1633
1912
|
function entryLimits(entry, checks, kind2) {
|
|
@@ -1640,7 +1919,9 @@ function entryLimits(entry, checks, kind2) {
|
|
|
1640
1919
|
p99: entry.p99 ?? defaults.p99,
|
|
1641
1920
|
minApdex: t === null ? null : entry.minApdex === void 0 ? checks.slowShare.apdex.limit[kind2] : entry.minApdex,
|
|
1642
1921
|
maxWilson: t === null ? null : entry.maxWilson === void 0 ? checks.slowShare.wilson.limit[kind2] : entry.maxWilson,
|
|
1643
|
-
maxErrorRate: entry.maxErrorRate ?? defaults.maxErrorRate
|
|
1922
|
+
maxErrorRate: entry.maxErrorRate ?? defaults.maxErrorRate,
|
|
1923
|
+
// An entry of a migrated version 2 file has no maxNonSuccessRate (09-REQ-38).
|
|
1924
|
+
maxNonSuccessRate: kind2 === "api" ? entry.maxNonSuccessRate ?? defaults.maxNonSuccessRate : null
|
|
1644
1925
|
};
|
|
1645
1926
|
}
|
|
1646
1927
|
|
|
@@ -1720,29 +2001,6 @@ function hashHex(input) {
|
|
|
1720
2001
|
return hash53(input, FIXED_HASH_SEED).toString(16).padStart(14, "0");
|
|
1721
2002
|
}
|
|
1722
2003
|
|
|
1723
|
-
// src/core/stats/classification.ts
|
|
1724
|
-
var ABORT_TEXTS = new Set(chunkVREOANPX_cjs.ABORT_FAILURE_TEXTS);
|
|
1725
|
-
function requestStatusLabel(sample) {
|
|
1726
|
-
const { status } = sample;
|
|
1727
|
-
if (typeof status === "number") return String(status);
|
|
1728
|
-
if (status === "FAILED" && sample.failureText !== void 0 && ABORT_TEXTS.has(sample.failureText)) {
|
|
1729
|
-
return "ABORTED";
|
|
1730
|
-
}
|
|
1731
|
-
return status;
|
|
1732
|
-
}
|
|
1733
|
-
var STATUS_CLASS = /^([1-9])xx$/u;
|
|
1734
|
-
var HTTP_CODE = /^[1-9]\d\d$/u;
|
|
1735
|
-
function compileStatusMatcher(patterns) {
|
|
1736
|
-
const classes = /* @__PURE__ */ new Set();
|
|
1737
|
-
const exact = /* @__PURE__ */ new Set();
|
|
1738
|
-
for (const pattern of patterns) {
|
|
1739
|
-
const match = STATUS_CLASS.exec(pattern);
|
|
1740
|
-
if (match?.[1] !== void 0) classes.add(match[1]);
|
|
1741
|
-
else exact.add(pattern);
|
|
1742
|
-
}
|
|
1743
|
-
return (label) => exact.has(label) || HTTP_CODE.test(label) && classes.has(label.charAt(0));
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
2004
|
// src/core/stats/identity.ts
|
|
1747
2005
|
function testIdentity(project, file, title2) {
|
|
1748
2006
|
return `${project}\0${file}\0${title2}`;
|
|
@@ -2107,7 +2365,7 @@ function costOf(test) {
|
|
|
2107
2365
|
const topKeys = keys.map((key2) => {
|
|
2108
2366
|
const index = test.keys.get(key2) ?? -1;
|
|
2109
2367
|
return { key: key2, count: test.counts[index] ?? 0, tenths: test.sums[index] ?? 0 };
|
|
2110
|
-
}).sort((a, b) => b.tenths - a.tenths || b.count - a.count || compareText3(a.key, b.key)).slice(0, TOP_KEYS).map(({ key: key2, count:
|
|
2368
|
+
}).sort((a, b) => b.tenths - a.tenths || b.count - a.count || compareText3(a.key, b.key)).slice(0, TOP_KEYS).map(({ key: key2, count: count4, tenths }) => ({ key: key2, count: count4, totalMs: tenths / 10 }));
|
|
2111
2369
|
return {
|
|
2112
2370
|
title: test.title,
|
|
2113
2371
|
project: test.project,
|
|
@@ -2152,6 +2410,10 @@ function waterfallOf(meta, tenths, requests) {
|
|
|
2152
2410
|
// src/core/stats/aggregator.ts
|
|
2153
2411
|
var SLOWEST = 3;
|
|
2154
2412
|
var TOP_TESTS = 5;
|
|
2413
|
+
var COLD_KEPT = 5;
|
|
2414
|
+
var FAILED_STATUSES = 5;
|
|
2415
|
+
var COLD_WARN_GAP_MS = 100;
|
|
2416
|
+
var COLD_WARN_KEYS = 3;
|
|
2155
2417
|
function compareText4(a, b) {
|
|
2156
2418
|
return a < b ? -1 : a > b ? 1 : 0;
|
|
2157
2419
|
}
|
|
@@ -2168,6 +2430,17 @@ var KeyState = class {
|
|
|
2168
2430
|
kind;
|
|
2169
2431
|
count = 0;
|
|
2170
2432
|
successCount = 0;
|
|
2433
|
+
/** Timed samples seen, cold ones included (08-REQ-41). */
|
|
2434
|
+
timed = 0;
|
|
2435
|
+
/** The first measure.coldSamples timed samples, in input order (08-REQ-41), per segment. */
|
|
2436
|
+
cold = [];
|
|
2437
|
+
/** Segment of the last cold sample and the cold samples taken in it (17-REQ-15). */
|
|
2438
|
+
coldSegment = 0;
|
|
2439
|
+
coldInSegment = 0;
|
|
2440
|
+
/** Endpoints: samples with an HTTP status outside successStatuses (08-REQ-46). */
|
|
2441
|
+
nonSuccessCount = 0;
|
|
2442
|
+
/** Endpoints: timed non-success samples per HTTP status (08-REQ-47). */
|
|
2443
|
+
failed = /* @__PURE__ */ new Map();
|
|
2171
2444
|
errorCount = 0;
|
|
2172
2445
|
fromFailedTests = 0;
|
|
2173
2446
|
browser = 0;
|
|
@@ -2233,13 +2506,27 @@ var Aggregator = class {
|
|
|
2233
2506
|
withoutBrowserTiming = 0;
|
|
2234
2507
|
keysWithoutBrowserTiming = /* @__PURE__ */ new Set();
|
|
2235
2508
|
testBreakdown = new TestBreakdownBuilder();
|
|
2509
|
+
/** Keys for STATS_COLD_SLOW (08-REQ-44), filled by finalize(). */
|
|
2510
|
+
coldSlow = [];
|
|
2236
2511
|
finalized = false;
|
|
2512
|
+
/** Input segment: every shard of a merge starts one, so its first samples are cold (17-REQ-15). */
|
|
2513
|
+
segment = 0;
|
|
2237
2514
|
constructor(opts) {
|
|
2238
2515
|
this.opts = opts;
|
|
2239
2516
|
this.isSuccess = compileStatusMatcher(opts.successStatuses);
|
|
2240
2517
|
this.isError = compileStatusMatcher(opts.errors.statuses);
|
|
2241
2518
|
this.percentiles = percentileNames(opts.evaluatedPercentile);
|
|
2242
2519
|
}
|
|
2520
|
+
/**
|
|
2521
|
+
* Starts a new input segment (08-REQ-41, 17-REQ-15): the cold-sample counter of every key starts
|
|
2522
|
+
* again from zero, as each pass (a new Playwright process, with webServer a new start of the
|
|
2523
|
+
* application) and each shard machine starts the application again. The caller starts one
|
|
2524
|
+
* before every pass after the first and before every shard; without it the whole input is one
|
|
2525
|
+
* segment.
|
|
2526
|
+
*/
|
|
2527
|
+
startSegment() {
|
|
2528
|
+
this.segment += 1;
|
|
2529
|
+
}
|
|
2243
2530
|
/**
|
|
2244
2531
|
* Adds a request sample under `key`. `origin` and `label` come from the KeyResult (07); null
|
|
2245
2532
|
* when the URL could not be parsed (07-REQ-23), then the sample is not counted in origins.
|
|
@@ -2265,6 +2552,12 @@ var Aggregator = class {
|
|
|
2265
2552
|
else state.browser += 1;
|
|
2266
2553
|
const successful = typeof sample.status === "number" && this.isSuccess(statusLabel);
|
|
2267
2554
|
const apiCall = sample.apiCall === true;
|
|
2555
|
+
if (typeof sample.status === "number" && !successful) {
|
|
2556
|
+
state.nonSuccessCount += 1;
|
|
2557
|
+
if ((sample.timeSource === "browser" || apiCall) && sample.duration !== null) {
|
|
2558
|
+
this.addFailed(state, key2, sample.status, sample.test, sample.ordinal, sample.duration);
|
|
2559
|
+
}
|
|
2560
|
+
}
|
|
2268
2561
|
if (successful && sample.timeSource === "node" && !apiCall) {
|
|
2269
2562
|
this.withoutBrowserTiming += 1;
|
|
2270
2563
|
this.keysWithoutBrowserTiming.add(key2);
|
|
@@ -2360,17 +2653,26 @@ var Aggregator = class {
|
|
|
2360
2653
|
return state;
|
|
2361
2654
|
}
|
|
2362
2655
|
addTime(state, key2, test, ordinal, time) {
|
|
2656
|
+
state.timed += 1;
|
|
2657
|
+
if (state.coldSegment !== this.segment) {
|
|
2658
|
+
state.coldSegment = this.segment;
|
|
2659
|
+
state.coldInSegment = 0;
|
|
2660
|
+
}
|
|
2661
|
+
if (state.coldInSegment < (this.opts.coldSamples ?? 0)) {
|
|
2662
|
+
state.coldInSegment += 1;
|
|
2663
|
+
state.cold.push({ test, ordinal, time });
|
|
2664
|
+
return;
|
|
2665
|
+
}
|
|
2666
|
+
this.addWarm(state, key2, test, ordinal, time);
|
|
2667
|
+
}
|
|
2668
|
+
/** Adds a timed sample to the time statistics (08-REQ-02). */
|
|
2669
|
+
addWarm(state, key2, test, ordinal, time) {
|
|
2363
2670
|
const tenths = toTenths(time.duration);
|
|
2364
2671
|
state.successCount += 1;
|
|
2365
2672
|
state.sumTenths += tenths;
|
|
2366
2673
|
if (tenths < state.minTenths) state.minTenths = tenths;
|
|
2367
2674
|
if (tenths > state.maxTenths) state.maxTenths = tenths;
|
|
2368
|
-
|
|
2369
|
-
if (r2 === void 0) {
|
|
2370
|
-
r2 = this.resultIds.length;
|
|
2371
|
-
this.resultIds.push(test.resultId);
|
|
2372
|
-
this.resultIndex.set(test.resultId, r2);
|
|
2373
|
-
}
|
|
2675
|
+
const r2 = this.resultIndexOf(test.resultId);
|
|
2374
2676
|
const id = sampleId(test.resultId, state.kind, ordinal);
|
|
2375
2677
|
const priority = hash53(`${key2}\0${id}`, this.opts.advanced.seed);
|
|
2376
2678
|
state.sample.add(priority, tenths, time.ttfb === null ? -1 : toTenths(time.ttfb), r2, ordinal);
|
|
@@ -2383,11 +2685,77 @@ var Aggregator = class {
|
|
|
2383
2685
|
...time.url === void 0 ? {} : { url: time.url }
|
|
2384
2686
|
});
|
|
2385
2687
|
}
|
|
2688
|
+
/** A timed non-success sample (08-REQ-47), kept with bottom-k per status like 08-REQ-12. */
|
|
2689
|
+
addFailed(state, key2, status, test, ordinal, duration) {
|
|
2690
|
+
let entry = state.failed.get(status);
|
|
2691
|
+
if (entry === void 0) {
|
|
2692
|
+
const ids = this.resultIds;
|
|
2693
|
+
const kind2 = state.kind;
|
|
2694
|
+
entry = {
|
|
2695
|
+
count: 0,
|
|
2696
|
+
sample: new BottomK(
|
|
2697
|
+
this.opts.advanced.maxSamplesPerKey,
|
|
2698
|
+
(r3, o) => sampleId(ids[r3] ?? "", kind2, o)
|
|
2699
|
+
)
|
|
2700
|
+
};
|
|
2701
|
+
state.failed.set(status, entry);
|
|
2702
|
+
}
|
|
2703
|
+
entry.count += 1;
|
|
2704
|
+
const r2 = this.resultIndexOf(test.resultId);
|
|
2705
|
+
const id = sampleId(test.resultId, state.kind, ordinal);
|
|
2706
|
+
const priority = hash53(`${key2}\0${id}`, this.opts.advanced.seed);
|
|
2707
|
+
entry.sample.add(priority, toTenths(duration), -1, r2, ordinal);
|
|
2708
|
+
}
|
|
2709
|
+
resultIndexOf(resultId2) {
|
|
2710
|
+
let r2 = this.resultIndex.get(resultId2);
|
|
2711
|
+
if (r2 === void 0) {
|
|
2712
|
+
r2 = this.resultIds.length;
|
|
2713
|
+
this.resultIds.push(resultId2);
|
|
2714
|
+
this.resultIndex.set(resultId2, r2);
|
|
2715
|
+
}
|
|
2716
|
+
return r2;
|
|
2717
|
+
}
|
|
2718
|
+
/**
|
|
2719
|
+
* Decides on the cold samples of a key (08-REQ-42): when at least minSamples warm samples are
|
|
2720
|
+
* left they stay out of the statistics, otherwise they are added to them. Returns the
|
|
2721
|
+
* cold block (08-REQ-43); warmP50 is the p50 of the warm samples alone.
|
|
2722
|
+
*/
|
|
2723
|
+
settleCold(state, key2) {
|
|
2724
|
+
if (state.cold.length === 0) return null;
|
|
2725
|
+
const minSamples = this.opts.minSamples ?? 5;
|
|
2726
|
+
const excluded = state.timed >= state.cold.length + minSamples;
|
|
2727
|
+
const p50 = () => {
|
|
2728
|
+
const all = state.sample.durations().map((t) => t / 10);
|
|
2729
|
+
return all.length === 0 ? null : roundMs(percentile(all, 50) ?? 0);
|
|
2730
|
+
};
|
|
2731
|
+
let warmP50 = p50();
|
|
2732
|
+
if (!excluded) {
|
|
2733
|
+
for (const c of state.cold) this.addWarm(state, key2, c.test, c.ordinal, c.time);
|
|
2734
|
+
if (warmP50 === null) warmP50 = p50();
|
|
2735
|
+
}
|
|
2736
|
+
const durations = state.cold.slice(0, COLD_KEPT).map((c) => toTenths(c.time.duration) / 10);
|
|
2737
|
+
const max = Math.max(...state.cold.map((c) => toTenths(c.time.duration))) / 10;
|
|
2738
|
+
const first2 = state.cold[0];
|
|
2739
|
+
const ratio2 = warmP50 === null || warmP50 === 0 ? null : Math.round(max / warmP50 * 100) / 100;
|
|
2740
|
+
if (ratio2 !== null && warmP50 !== null && ratio2 >= chunkVXGTC6DB_cjs.COLD_WARN_RATIO) {
|
|
2741
|
+
if (max - warmP50 >= COLD_WARN_GAP_MS) this.coldSlow.push({ key: key2, max, warmP50, ratio: ratio2 });
|
|
2742
|
+
}
|
|
2743
|
+
return {
|
|
2744
|
+
count: state.cold.length,
|
|
2745
|
+
excluded,
|
|
2746
|
+
reason: excluded ? null : "too-few-samples",
|
|
2747
|
+
durations,
|
|
2748
|
+
max,
|
|
2749
|
+
warmP50,
|
|
2750
|
+
ratio: ratio2,
|
|
2751
|
+
test: testRefOf(first2.test)
|
|
2752
|
+
};
|
|
2753
|
+
}
|
|
2386
2754
|
build(states) {
|
|
2387
2755
|
const result2 = {};
|
|
2388
2756
|
for (const key2 of [...states.keys()].sort(compareText4)) {
|
|
2389
2757
|
const state = states.get(key2);
|
|
2390
|
-
if (state !== void 0) result2[key2] = this.aggregate(state);
|
|
2758
|
+
if (state !== void 0) result2[key2] = this.aggregate(state, key2);
|
|
2391
2759
|
}
|
|
2392
2760
|
return result2;
|
|
2393
2761
|
}
|
|
@@ -2397,14 +2765,15 @@ var Aggregator = class {
|
|
|
2397
2765
|
const state = this.steps.get(key2);
|
|
2398
2766
|
if (state === void 0) continue;
|
|
2399
2767
|
result2[key2] = {
|
|
2400
|
-
...this.aggregate(state),
|
|
2768
|
+
...this.aggregate(state, key2),
|
|
2401
2769
|
location: state.location,
|
|
2402
2770
|
stepErrorsFromFailedTests: state.stepErrorsFromFailedTests
|
|
2403
2771
|
};
|
|
2404
2772
|
}
|
|
2405
2773
|
return result2;
|
|
2406
2774
|
}
|
|
2407
|
-
aggregate(state) {
|
|
2775
|
+
aggregate(state, key2) {
|
|
2776
|
+
const cold2 = this.settleCold(state, key2);
|
|
2408
2777
|
const durations = state.sample.durations().map((t) => t / 10);
|
|
2409
2778
|
const ttfbs = state.sample.ttfbs().map((t) => t / 10);
|
|
2410
2779
|
const others = state.sample.othersThanTtfb().map((t) => t / 10);
|
|
@@ -2434,13 +2803,7 @@ var Aggregator = class {
|
|
|
2434
2803
|
slowest: state.slowest.map((s) => ({
|
|
2435
2804
|
duration: s.tenths / 10,
|
|
2436
2805
|
startedAt: new Date(s.startedAt).toISOString(),
|
|
2437
|
-
test:
|
|
2438
|
-
title: s.test.title,
|
|
2439
|
-
project: s.test.project,
|
|
2440
|
-
file: s.test.file,
|
|
2441
|
-
line: s.test.line,
|
|
2442
|
-
repeatEachIndex: s.test.repeatEachIndex
|
|
2443
|
-
},
|
|
2806
|
+
test: testRefOf(s.test),
|
|
2444
2807
|
...s.url === void 0 ? {} : { url: s.url }
|
|
2445
2808
|
})),
|
|
2446
2809
|
topTests: [...state.tests.values()].map(({ title: title2, project, file, line, sampleCount }) => ({
|
|
@@ -2455,9 +2818,24 @@ var Aggregator = class {
|
|
|
2455
2818
|
sampled: state.successCount > this.opts.advanced.maxSamplesPerKey
|
|
2456
2819
|
},
|
|
2457
2820
|
// Bins of the retained durations; null exactly when stats is null (08-REQ-34).
|
|
2458
|
-
histogram: usable ? histogram2(durations) : null
|
|
2821
|
+
histogram: usable ? histogram2(durations) : null,
|
|
2822
|
+
cold: cold2,
|
|
2823
|
+
nonSuccessCount: state.kind === "step" ? null : state.nonSuccessCount,
|
|
2824
|
+
failedTimings: this.failedTimings(state)
|
|
2459
2825
|
};
|
|
2460
2826
|
}
|
|
2827
|
+
/** Up to 5 statuses with the most timed samples, ties by code (08-REQ-47). */
|
|
2828
|
+
failedTimings(state) {
|
|
2829
|
+
return [...state.failed.entries()].sort(([a, x], [b, y]) => y.count - x.count || a - b).slice(0, FAILED_STATUSES).map(([status, { count: count4, sample }]) => {
|
|
2830
|
+
const sorted = sample.durations().map((t) => t / 10);
|
|
2831
|
+
return {
|
|
2832
|
+
status,
|
|
2833
|
+
count: count4,
|
|
2834
|
+
p50: roundMs(percentile(sorted, 50) ?? 0),
|
|
2835
|
+
p95: roundMs(percentile(sorted, 95) ?? 0)
|
|
2836
|
+
};
|
|
2837
|
+
});
|
|
2838
|
+
}
|
|
2461
2839
|
issues() {
|
|
2462
2840
|
const issues = [];
|
|
2463
2841
|
const plural5 = (n, word) => `${n} ${word}${n === 1 ? "" : "s"}`;
|
|
@@ -2485,9 +2863,32 @@ var Aggregator = class {
|
|
|
2485
2863
|
hint: "Measure one browser engine per run: select projects of one engine with --project in the measurement command."
|
|
2486
2864
|
});
|
|
2487
2865
|
}
|
|
2866
|
+
if (this.coldSlow.length > 0) {
|
|
2867
|
+
const n = this.coldSlow.length;
|
|
2868
|
+
const top = [...this.coldSlow].sort((a, b) => b.ratio - a.ratio || compareText4(a.key, b.key)).slice(0, COLD_WARN_KEYS).map(
|
|
2869
|
+
(c) => `${c.key} ${formatWholeMs(c.max)} ms vs warm p50 ${formatWholeMs(c.warmP50)} ms (\xD7${c.ratio.toFixed(1)})`
|
|
2870
|
+
);
|
|
2871
|
+
issues.push({
|
|
2872
|
+
code: "STATS_COLD_SLOW",
|
|
2873
|
+
message: `${plural5(n, "key")} ${n === 1 ? "is" : "are"} much slower on the first call (cold start): ${top.join(", ")}${n > COLD_WARN_KEYS ? ", \u2026" : ""}.`,
|
|
2874
|
+
hint: "The first calls in each pass stay out of the evaluated statistics when a key has enough warm samples (checks.time.median.minSamples). To measure the first calls too, warm the application up before the tests or set measure.coldSamples to 0."
|
|
2875
|
+
});
|
|
2876
|
+
}
|
|
2488
2877
|
return issues;
|
|
2489
2878
|
}
|
|
2490
2879
|
};
|
|
2880
|
+
function formatWholeMs(ms2) {
|
|
2881
|
+
return Math.round(ms2).toLocaleString("en-US");
|
|
2882
|
+
}
|
|
2883
|
+
function testRefOf(test) {
|
|
2884
|
+
return {
|
|
2885
|
+
title: test.title,
|
|
2886
|
+
project: test.project,
|
|
2887
|
+
file: test.file,
|
|
2888
|
+
line: test.line,
|
|
2889
|
+
repeatEachIndex: test.repeatEachIndex
|
|
2890
|
+
};
|
|
2891
|
+
}
|
|
2491
2892
|
function addKeyedRequest(aggregator, keyOf, sample, browserName) {
|
|
2492
2893
|
const result2 = keyOf(sample);
|
|
2493
2894
|
if (result2.ok) {
|
|
@@ -2496,9 +2897,14 @@ function addKeyedRequest(aggregator, keyOf, sample, browserName) {
|
|
|
2496
2897
|
return result2;
|
|
2497
2898
|
}
|
|
2498
2899
|
function addKeyedApiRequest(aggregator, keyOf, sample) {
|
|
2499
|
-
const result2 = keyOf({
|
|
2900
|
+
const result2 = keyOf({
|
|
2901
|
+
method: sample.method,
|
|
2902
|
+
url: sample.url,
|
|
2903
|
+
resourceType: "request",
|
|
2904
|
+
operation: sample.operation ?? null
|
|
2905
|
+
});
|
|
2500
2906
|
if (!result2.ok) return result2;
|
|
2501
|
-
const key2 = `${
|
|
2907
|
+
const key2 = `${chunkVXGTC6DB_cjs.REQUEST_KEY_PREFIX}${result2.key}`;
|
|
2502
2908
|
const request = {
|
|
2503
2909
|
method: sample.method,
|
|
2504
2910
|
url: sample.url,
|
|
@@ -2563,7 +2969,7 @@ function timeCheck(rule, actual, limit, m) {
|
|
|
2563
2969
|
return { rule, n: m, actual, observed: null, limit, passed: !(actual > limit) };
|
|
2564
2970
|
}
|
|
2565
2971
|
function runRules(stats2, limits, cfg) {
|
|
2566
|
-
const { time, slowShare, errors } = cfg.checks;
|
|
2972
|
+
const { time, slowShare, errors, nonSuccess } = cfg.checks;
|
|
2567
2973
|
const n = stats2.successCount;
|
|
2568
2974
|
const bigN = stats2.count;
|
|
2569
2975
|
const durations = [...stats2.samples.durations].sort((a, b) => a - b);
|
|
@@ -2648,6 +3054,25 @@ function runRules(stats2, limits, cfg) {
|
|
|
2648
3054
|
passed: !(actual > limits.maxErrorRate)
|
|
2649
3055
|
};
|
|
2650
3056
|
}
|
|
3057
|
+
},
|
|
3058
|
+
{
|
|
3059
|
+
...nonSuccess,
|
|
3060
|
+
// Endpoint keys with a limit only: from the entry or checks.nonSuccess.limit.api (09-REQ-38).
|
|
3061
|
+
hasLimits: limits.maxNonSuccessRate !== null && stats2.nonSuccessCount !== null,
|
|
3062
|
+
count: bigN,
|
|
3063
|
+
run: () => {
|
|
3064
|
+
const k = stats2.nonSuccessCount ?? 0;
|
|
3065
|
+
const limit = limits.maxNonSuccessRate ?? 0;
|
|
3066
|
+
const actual = wilsonBounds(k, bigN)?.lower ?? 0;
|
|
3067
|
+
return {
|
|
3068
|
+
rule: "nonSuccess",
|
|
3069
|
+
n: bigN,
|
|
3070
|
+
actual,
|
|
3071
|
+
observed: roundRatio(k / bigN),
|
|
3072
|
+
limit,
|
|
3073
|
+
passed: !(actual > limit)
|
|
3074
|
+
};
|
|
3075
|
+
}
|
|
2651
3076
|
}
|
|
2652
3077
|
];
|
|
2653
3078
|
const hardLimitFactor = cfg.gate.hardLimitFactor;
|
|
@@ -2669,6 +3094,81 @@ function sourceForKind(source, kind2) {
|
|
|
2669
3094
|
return kind2 === "step" ? { ...source, normalization: source.stepNormalization ?? "" } : source;
|
|
2670
3095
|
}
|
|
2671
3096
|
|
|
3097
|
+
// src/core/evaluate/workload.ts
|
|
3098
|
+
var KIND_NOUN2 = { api: "endpoint", step: "step" };
|
|
3099
|
+
var KEYS_IN_MESSAGE = 3;
|
|
3100
|
+
var STATUSES_PER_KEY = 3;
|
|
3101
|
+
var SHIFT_MIN_SAMPLES = 5;
|
|
3102
|
+
function round2(x) {
|
|
3103
|
+
return Math.round(x * 100) / 100 + 0;
|
|
3104
|
+
}
|
|
3105
|
+
function keyWorkload(entry, stats2, run, factor) {
|
|
3106
|
+
const source = entry?.source;
|
|
3107
|
+
if (source === void 0) return null;
|
|
3108
|
+
const base = {
|
|
3109
|
+
count: source.count,
|
|
3110
|
+
successCount: source.successCount,
|
|
3111
|
+
passes: source.passes,
|
|
3112
|
+
workers: 1,
|
|
3113
|
+
share: source.share
|
|
3114
|
+
};
|
|
3115
|
+
const now = {
|
|
3116
|
+
count: stats2.count,
|
|
3117
|
+
successCount: stats2.successCount,
|
|
3118
|
+
passes: run.passes,
|
|
3119
|
+
workers: run.workers,
|
|
3120
|
+
share: run.kindCount === 0 ? 0 : roundRatio(stats2.count / run.kindCount)
|
|
3121
|
+
};
|
|
3122
|
+
const perPassRatio = base.count === 0 ? null : round2(now.count / now.passes / (base.count / base.passes));
|
|
3123
|
+
const shifted = factor !== null && perPassRatio !== null && Math.max(base.count, now.count) >= SHIFT_MIN_SAMPLES && (perPassRatio >= factor || perPassRatio <= 1 / factor);
|
|
3124
|
+
return { base, now, perPassRatio, shifted };
|
|
3125
|
+
}
|
|
3126
|
+
function perPass(side) {
|
|
3127
|
+
return (side.count / side.passes).toFixed(1);
|
|
3128
|
+
}
|
|
3129
|
+
function changeSize(ratio2) {
|
|
3130
|
+
if (ratio2 === null) return 0;
|
|
3131
|
+
if (ratio2 === 0) return Infinity;
|
|
3132
|
+
return Math.max(ratio2, 1 / ratio2);
|
|
3133
|
+
}
|
|
3134
|
+
function workloadShiftWarning(kind2, perKey, aggregates = {}) {
|
|
3135
|
+
const shifted = Object.entries(perKey).flatMap(([key2, e]) => e.workload?.shifted === true ? [{ key: key2, workload: e.workload }] : []).sort(
|
|
3136
|
+
(a, b) => changeSize(b.workload.perPassRatio) - changeSize(a.workload.perPassRatio) || compareText(a.key, b.key)
|
|
3137
|
+
);
|
|
3138
|
+
if (shifted.length === 0) return null;
|
|
3139
|
+
const named = shifted.slice(0, KEYS_IN_MESSAGE).map(({ key: key2, workload: workload2 }) => {
|
|
3140
|
+
const ratio2 = workload2.perPassRatio === null ? "" : ` (\xD7${workload2.perPassRatio.toFixed(2)})`;
|
|
3141
|
+
return `${key2} ${perPass(workload2.base)} \u2192 ${perPass(workload2.now)} samples per pass${ratio2}`;
|
|
3142
|
+
});
|
|
3143
|
+
const rest = shifted.length - named.length;
|
|
3144
|
+
const one = shifted.length === 1;
|
|
3145
|
+
const retried = shifted.filter(({ key: key2 }) => (aggregates[key2]?.fromFailedTests ?? 0) > 0).length;
|
|
3146
|
+
const retries = retried === 0 ? "" : `Retries of failed tests add samples: ${String(retried)} of these keys ${retried === 1 ? "has" : "have"} samples from failed tests; fix the failures first. `;
|
|
3147
|
+
return {
|
|
3148
|
+
code: "THRESHOLDS_WORKLOAD_SHIFT",
|
|
3149
|
+
message: `${plural(shifted.length, `${KIND_NOUN2[kind2]} key`)} ${one ? "gets" : "get"} a different share of the traffic than in the thresholds run: ${named.join(", ")}${rest > 0 ? ` and ${plural(rest, "other key")}` : ""}.`,
|
|
3150
|
+
hint: `${retries}A change of the tests or fixtures changes the number of samples and the percentiles; after an intended change, derive thresholds again with \`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\`.`
|
|
3151
|
+
};
|
|
3152
|
+
}
|
|
3153
|
+
function statusesText(statuses) {
|
|
3154
|
+
return Object.entries(statuses).sort((a, b) => b[1] - a[1] || compareText(a[0], b[0])).slice(0, STATUSES_PER_KEY).map(([status, n]) => `${String(n)} \xD7 ${status}`).join(", ");
|
|
3155
|
+
}
|
|
3156
|
+
function entryNotTimedWarning(kind2, perKey, aggregates, minSamples) {
|
|
3157
|
+
const keys = Object.keys(perKey).filter((key2) => {
|
|
3158
|
+
const stats2 = aggregates[key2];
|
|
3159
|
+
return stats2 !== void 0 && perKey[key2]?.thresholdSource === "file" && stats2.count >= minSamples && stats2.successCount < minSamples && (stats2.nonSuccessCount ?? 0) > 0;
|
|
3160
|
+
}).sort(compareText);
|
|
3161
|
+
if (keys.length === 0) return null;
|
|
3162
|
+
const named = keys.slice(0, KEYS_IN_MESSAGE).map((key2) => `${key2} (${statusesText(aggregates[key2]?.statuses ?? {})})`);
|
|
3163
|
+
const rest = keys.length - named.length;
|
|
3164
|
+
const one = keys.length === 1;
|
|
3165
|
+
return {
|
|
3166
|
+
code: "THRESHOLDS_ENTRY_NOT_TIMED",
|
|
3167
|
+
message: `${plural(keys.length, `${KIND_NOUN2[kind2]} key`)} with thresholds ${one ? "was" : "were"} not timed because ${one ? "its" : "their"} responses were not successful: ${named.join(", ")}${rest > 0 ? ` and ${plural(rest, "other key")}` : ""}.`,
|
|
3168
|
+
hint: "Check the login and the test data of the tests that call these keys. The nonSuccess rule fails such a key when its entry has maxNonSuccessRate (written by a thresholds run of version 1.1.0 or later)."
|
|
3169
|
+
};
|
|
3170
|
+
}
|
|
3171
|
+
|
|
2672
3172
|
// src/core/evaluate/evaluate.ts
|
|
2673
3173
|
function allowedViolations(tolerance, evaluated) {
|
|
2674
3174
|
if (typeof tolerance === "number") return tolerance;
|
|
@@ -2679,7 +3179,7 @@ function allowedViolations(tolerance, evaluated) {
|
|
|
2679
3179
|
const scaledPercent = Number(match[1]) * scale + (decimals === "" ? 0 : Number(decimals));
|
|
2680
3180
|
return Math.floor(scaledPercent * evaluated / (100 * scale));
|
|
2681
3181
|
}
|
|
2682
|
-
function evaluateKey(key2, stats2, kind2, thresholds, cfg, runDay) {
|
|
3182
|
+
function evaluateKey(key2, stats2, kind2, thresholds, cfg, runDay, run) {
|
|
2683
3183
|
const file = thresholds[kind2];
|
|
2684
3184
|
if (file.status === "invalid") {
|
|
2685
3185
|
return {
|
|
@@ -2688,7 +3188,8 @@ function evaluateKey(key2, stats2, kind2, thresholds, cfg, runDay) {
|
|
|
2688
3188
|
thresholdSource: "default",
|
|
2689
3189
|
limits: defaultLimits(cfg.checks, kind2),
|
|
2690
3190
|
checks: [],
|
|
2691
|
-
muted: null
|
|
3191
|
+
muted: null,
|
|
3192
|
+
workload: null
|
|
2692
3193
|
};
|
|
2693
3194
|
}
|
|
2694
3195
|
const entries2 = file.status === "loaded" ? file.file.entries : {};
|
|
@@ -2701,7 +3202,8 @@ function evaluateKey(key2, stats2, kind2, thresholds, cfg, runDay) {
|
|
|
2701
3202
|
thresholdSource: entry === void 0 ? "default" : "file",
|
|
2702
3203
|
limits,
|
|
2703
3204
|
checks,
|
|
2704
|
-
muted: entry === void 0 ? null : keyMuting(entry, runDay)
|
|
3205
|
+
muted: entry === void 0 ? null : keyMuting(entry, runDay),
|
|
3206
|
+
workload: keyWorkload(entry, stats2, run, cfg.thresholds.workloadShift.factor)
|
|
2705
3207
|
};
|
|
2706
3208
|
}
|
|
2707
3209
|
function qualifies(evaluation, gate) {
|
|
@@ -2709,7 +3211,7 @@ function qualifies(evaluation, gate) {
|
|
|
2709
3211
|
return !isMuteActive(evaluation.muted);
|
|
2710
3212
|
}
|
|
2711
3213
|
function applyGate(perKey, gate) {
|
|
2712
|
-
const all =
|
|
3214
|
+
const all = chunkVXGTC6DB_cjs.KINDS.flatMap((kind2) => Object.values(perKey[kind2]));
|
|
2713
3215
|
const qualified = all.filter(
|
|
2714
3216
|
(e) => qualifies(e, gate) && e.checks.some((check2) => !check2.passed)
|
|
2715
3217
|
);
|
|
@@ -2759,7 +3261,7 @@ function evaluationStatus2(perKey, thresholds, fatalToolError, kinds) {
|
|
|
2759
3261
|
if (fatalToolError || kinds.some((kind2) => thresholds[kind2].status === "invalid")) {
|
|
2760
3262
|
return "error";
|
|
2761
3263
|
}
|
|
2762
|
-
const checks =
|
|
3264
|
+
const checks = chunkVXGTC6DB_cjs.KINDS.flatMap((kind2) => Object.values(perKey[kind2])).flatMap((e) => e.checks);
|
|
2763
3265
|
if (checks.some((c) => c.blocking)) return "failed";
|
|
2764
3266
|
if (checks.some((c) => !c.passed)) return "warned";
|
|
2765
3267
|
return "passed";
|
|
@@ -2771,11 +3273,16 @@ function evaluate(aggregates, thresholds, cfg, opts) {
|
|
|
2771
3273
|
step: aggregates.steps ?? {}
|
|
2772
3274
|
};
|
|
2773
3275
|
const perKey = { api: {}, step: {} };
|
|
2774
|
-
for (const kind2 of
|
|
3276
|
+
for (const kind2 of chunkVXGTC6DB_cjs.KINDS) {
|
|
3277
|
+
const run = {
|
|
3278
|
+
passes: opts.passes ?? 1,
|
|
3279
|
+
workers: opts.workers ?? 1,
|
|
3280
|
+
kindCount: Object.values(byKind[kind2]).reduce((sum3, stats2) => sum3 + stats2.count, 0)
|
|
3281
|
+
};
|
|
2775
3282
|
for (const key2 of Object.keys(byKind[kind2]).sort(compareText)) {
|
|
2776
3283
|
const stats2 = byKind[kind2][key2];
|
|
2777
3284
|
if (stats2 !== void 0) {
|
|
2778
|
-
perKey[kind2][key2] = evaluateKey(key2, stats2, kind2, thresholds, cfg, runDay);
|
|
3285
|
+
perKey[kind2][key2] = evaluateKey(key2, stats2, kind2, thresholds, cfg, runDay, run);
|
|
2779
3286
|
}
|
|
2780
3287
|
}
|
|
2781
3288
|
}
|
|
@@ -2784,7 +3291,7 @@ function evaluate(aggregates, thresholds, cfg, opts) {
|
|
|
2784
3291
|
const toolErrors = [];
|
|
2785
3292
|
const thresholdFiles = [];
|
|
2786
3293
|
const unseenCount = { api: 0, step: 0 };
|
|
2787
|
-
const activeKinds =
|
|
3294
|
+
const activeKinds = chunkVXGTC6DB_cjs.KINDS.filter(
|
|
2788
3295
|
(kind2) => kind2 === "step" ? cfg.measure.steps.enabled : cfg.measure.api
|
|
2789
3296
|
);
|
|
2790
3297
|
for (const kind2 of activeKinds) {
|
|
@@ -2817,14 +3324,35 @@ function evaluate(aggregates, thresholds, cfg, opts) {
|
|
|
2817
3324
|
)
|
|
2818
3325
|
);
|
|
2819
3326
|
}
|
|
3327
|
+
const operationKeys = operationKeysChanged(
|
|
3328
|
+
kind2,
|
|
3329
|
+
file.file.generated,
|
|
3330
|
+
sourceForKind(opts.source, kind2),
|
|
3331
|
+
Object.keys(byKind[kind2])
|
|
3332
|
+
);
|
|
2820
3333
|
unseen = Object.keys(file.file.entries).filter((key2) => !Object.hasOwn(byKind[kind2], key2)).sort(compareText);
|
|
2821
|
-
if (unseen.length > 0) warnings.push(unseenWarning(file.path, unseen));
|
|
3334
|
+
if (unseen.length > 0) warnings.push(unseenWarning(file.path, unseen, operationKeys));
|
|
2822
3335
|
if (opts.mode === "test" && Object.keys(file.file.entries).length > 0) {
|
|
2823
|
-
const onDefaults = Object.entries(perKey[kind2]).filter(
|
|
3336
|
+
const onDefaults = Object.entries(perKey[kind2]).filter(
|
|
3337
|
+
([key2, e]) => e.thresholdSource === "default" && e.result !== "not-evaluated" && (byKind[kind2][key2]?.successCount ?? 0) > 0
|
|
3338
|
+
).map(([key2]) => key2).sort(compareText);
|
|
2824
3339
|
if (onDefaults.length > 0) {
|
|
2825
|
-
warnings.push(
|
|
3340
|
+
warnings.push(
|
|
3341
|
+
keysOnDefaultsWarning(file.path, kind2, onDefaults, opts.env, operationKeys)
|
|
3342
|
+
);
|
|
2826
3343
|
}
|
|
2827
3344
|
}
|
|
3345
|
+
if (opts.mode === "test") {
|
|
3346
|
+
const notTimed = entryNotTimedWarning(
|
|
3347
|
+
kind2,
|
|
3348
|
+
perKey[kind2],
|
|
3349
|
+
byKind[kind2],
|
|
3350
|
+
cfg.checks.time.median.minSamples
|
|
3351
|
+
);
|
|
3352
|
+
if (notTimed !== null) warnings.push(notTimed);
|
|
3353
|
+
const shift = workloadShiftWarning(kind2, perKey[kind2], byKind[kind2]);
|
|
3354
|
+
if (shift !== null) warnings.push(shift);
|
|
3355
|
+
}
|
|
2828
3356
|
}
|
|
2829
3357
|
unseenCount[kind2] = unseen.length;
|
|
2830
3358
|
thresholdFiles.push(fileInfo(file, unseen));
|
|
@@ -2833,14 +3361,14 @@ function evaluate(aggregates, thresholds, cfg, opts) {
|
|
|
2833
3361
|
api: countKind(perKey.api, unseenCount.api),
|
|
2834
3362
|
step: countKind(perKey.step, unseenCount.step)
|
|
2835
3363
|
};
|
|
2836
|
-
if (
|
|
3364
|
+
if (chunkVXGTC6DB_cjs.KINDS.every((kind2) => Object.keys(byKind[kind2]).length === 0)) {
|
|
2837
3365
|
warnings.push({
|
|
2838
3366
|
code: "EVAL_NO_SAMPLES",
|
|
2839
3367
|
message: "The run recorded no samples, so nothing was evaluated.",
|
|
2840
3368
|
hint: "Check the integration: tests must use the fixtures from withPerfFixtures, and the measure options (include, exclude, resourceTypes) must not filter out every request."
|
|
2841
3369
|
});
|
|
2842
3370
|
}
|
|
2843
|
-
const notEvaluated =
|
|
3371
|
+
const notEvaluated = chunkVXGTC6DB_cjs.KINDS.reduce((sum3, kind2) => sum3 + counts[kind2].fileEntriesNotEvaluated, 0);
|
|
2844
3372
|
if (notEvaluated > 0) {
|
|
2845
3373
|
warnings.push({
|
|
2846
3374
|
code: "THRESHOLDS_ENTRIES_NOT_EVALUATED",
|
|
@@ -2848,7 +3376,7 @@ function evaluate(aggregates, thresholds, cfg, opts) {
|
|
|
2848
3376
|
hint: `Run more passes (run.passes or PW_PERF_PASSES), or accept that the endpoint is called rarely.`
|
|
2849
3377
|
});
|
|
2850
3378
|
}
|
|
2851
|
-
const mutedKeys =
|
|
3379
|
+
const mutedKeys = chunkVXGTC6DB_cjs.KINDS.flatMap(
|
|
2852
3380
|
(kind2) => Object.entries(perKey[kind2]).flatMap(
|
|
2853
3381
|
([key2, e]) => e.muted === null ? [] : [{ kind: kind2, key: key2, muted: e.muted }]
|
|
2854
3382
|
)
|
|
@@ -2870,7 +3398,7 @@ function percent(share2) {
|
|
|
2870
3398
|
return `${Math.round(share2 * 1e3) / 10}%`;
|
|
2871
3399
|
}
|
|
2872
3400
|
function assessRun(input, gate) {
|
|
2873
|
-
const { tests, maxFailures
|
|
3401
|
+
const { tests, maxFailures } = input;
|
|
2874
3402
|
const warnings = [];
|
|
2875
3403
|
const toolErrors = [];
|
|
2876
3404
|
const executions = tests.expected + tests.unexpected + tests.flaky;
|
|
@@ -2898,13 +3426,6 @@ function assessRun(input, gate) {
|
|
|
2898
3426
|
hint: "Raise the global timeout or maxFailures for perf runs, or measure a smaller subset of tests."
|
|
2899
3427
|
});
|
|
2900
3428
|
}
|
|
2901
|
-
if (sharded) {
|
|
2902
|
-
toolErrors.push({
|
|
2903
|
-
code: "RUN_SHARDED",
|
|
2904
|
-
message: "The perf-mode run is sharded (--shard): each machine would evaluate only part of the keys.",
|
|
2905
|
-
hint: "Run perf mode on one machine without --shard."
|
|
2906
|
-
});
|
|
2907
|
-
}
|
|
2908
3429
|
return { warnings, toolErrors };
|
|
2909
3430
|
}
|
|
2910
3431
|
function buildOutcome(report, paths) {
|
|
@@ -2937,7 +3458,9 @@ function parseKey(key2) {
|
|
|
2937
3458
|
const head = key2.slice(0, slash);
|
|
2938
3459
|
if (head.slice(space + 1).includes("?")) return null;
|
|
2939
3460
|
const rest = key2.slice(slash + 1);
|
|
2940
|
-
const
|
|
3461
|
+
const hash = rest.indexOf("#");
|
|
3462
|
+
const question = rest.indexOf("?");
|
|
3463
|
+
const mark = hash >= 0 && (question < 0 || hash < question) ? hash : question;
|
|
2941
3464
|
const path = mark < 0 ? rest : rest.slice(0, mark);
|
|
2942
3465
|
return {
|
|
2943
3466
|
head,
|
|
@@ -2980,6 +3503,14 @@ function detectKeyExplosion(endpointKeys) {
|
|
|
2980
3503
|
return issues;
|
|
2981
3504
|
}
|
|
2982
3505
|
|
|
3506
|
+
// src/core/normalize/operations.ts
|
|
3507
|
+
var MAX_OPERATIONS_IN_KEY = 10;
|
|
3508
|
+
function operationKeyPart(names2) {
|
|
3509
|
+
const unique = [...new Set(names2)].sort();
|
|
3510
|
+
if (unique.length <= MAX_OPERATIONS_IN_KEY) return unique.join("+");
|
|
3511
|
+
return `${unique.slice(0, MAX_OPERATIONS_IN_KEY).join("+")}+\u2026(${String(unique.length)})`;
|
|
3512
|
+
}
|
|
3513
|
+
|
|
2983
3514
|
// src/core/normalize/patterns.ts
|
|
2984
3515
|
var ID_PATTERNS = {
|
|
2985
3516
|
number: /^[0-9]+$/,
|
|
@@ -3084,17 +3615,17 @@ function truncateKey(key2) {
|
|
|
3084
3615
|
function originLabels(origins, baseOrigins) {
|
|
3085
3616
|
const exact = /* @__PURE__ */ new Map();
|
|
3086
3617
|
for (const [origin, label] of Object.entries(origins)) {
|
|
3087
|
-
if (
|
|
3618
|
+
if (chunkVYODYUEL_cjs.isHostPattern(origin)) continue;
|
|
3088
3619
|
const canonical = canonicalOrigin(origin);
|
|
3089
3620
|
if (canonical !== null) exact.set(canonical, label);
|
|
3090
3621
|
}
|
|
3091
|
-
const patterns =
|
|
3622
|
+
const patterns = chunkVYODYUEL_cjs.compileHostPatterns(origins);
|
|
3092
3623
|
const base = new Set(canonicalOrigins(baseOrigins));
|
|
3093
3624
|
const memo = /* @__PURE__ */ new Map();
|
|
3094
3625
|
return (url) => {
|
|
3095
3626
|
const known = memo.get(url.origin);
|
|
3096
3627
|
if (known !== void 0) return known;
|
|
3097
|
-
const label = exact.get(url.origin) ??
|
|
3628
|
+
const label = exact.get(url.origin) ?? chunkVYODYUEL_cjs.matchingPattern(patterns, url)?.label ?? (base.has(url.origin) ? "" : null);
|
|
3098
3629
|
memo.set(url.origin, label);
|
|
3099
3630
|
return label;
|
|
3100
3631
|
};
|
|
@@ -3113,10 +3644,16 @@ function createKeyBuilder(cfg, ctx) {
|
|
|
3113
3644
|
const url = parseHttpUrl(sample.url);
|
|
3114
3645
|
const issues = [];
|
|
3115
3646
|
let key2;
|
|
3647
|
+
const operation2 = sample.operation === void 0 || sample.operation === null || sample.operation.length === 0 ? void 0 : sample.operation;
|
|
3116
3648
|
if (keyBuilder !== void 0) {
|
|
3117
3649
|
let built;
|
|
3118
3650
|
try {
|
|
3119
|
-
built = keyBuilder({
|
|
3651
|
+
built = keyBuilder({
|
|
3652
|
+
method,
|
|
3653
|
+
url: sample.url,
|
|
3654
|
+
resourceType: sample.resourceType,
|
|
3655
|
+
operation: operation2 ?? null
|
|
3656
|
+
});
|
|
3120
3657
|
} catch (error) {
|
|
3121
3658
|
issues.push({
|
|
3122
3659
|
code: "NORMALIZE_KEY_BUILDER_THREW",
|
|
@@ -3144,8 +3681,14 @@ function createKeyBuilder(cfg, ctx) {
|
|
|
3144
3681
|
return { ok: false, issues };
|
|
3145
3682
|
}
|
|
3146
3683
|
const label = labelOf(url) ?? url.host;
|
|
3147
|
-
|
|
3148
|
-
|
|
3684
|
+
if (operation2 === void 0) {
|
|
3685
|
+
const query = cfg.query === "names" ? normalizeQuery(url.searchParams, cfg, matchId) : "";
|
|
3686
|
+
key2 = `${method} ${label}${normalizePath(url.pathname, matchId)}${query === "" ? "" : `?${query}`}`;
|
|
3687
|
+
} else {
|
|
3688
|
+
const found = chunkVYODYUEL_cjs.matchOperationEntry(cfg.operations, url.pathname);
|
|
3689
|
+
const path = found?.entry.type === "trpc" ? url.pathname.slice(0, found.end) : url.pathname;
|
|
3690
|
+
key2 = `${method} ${label}${normalizePath(path, matchId)}#${operationKeyPart(operation2)}`;
|
|
3691
|
+
}
|
|
3149
3692
|
}
|
|
3150
3693
|
const truncated = truncateKey(key2);
|
|
3151
3694
|
if (truncated !== key2) {
|
|
@@ -3176,13 +3719,14 @@ function measuredBaseOrigins(projects) {
|
|
|
3176
3719
|
return canonicalOrigins(origins);
|
|
3177
3720
|
}
|
|
3178
3721
|
function normalizationFingerprint(cfg, ctx) {
|
|
3179
|
-
const { keyBuilder, extraIdPatterns, ...rest } = cfg;
|
|
3722
|
+
const { keyBuilder, extraIdPatterns, operations, ...rest } = cfg;
|
|
3723
|
+
const json = (p) => typeof p === "string" ? p : { regex: p.source, flags: p.flags };
|
|
3180
3724
|
const keys = {
|
|
3181
3725
|
...rest,
|
|
3182
|
-
extraIdPatterns: extraIdPatterns.map(
|
|
3183
|
-
|
|
3184
|
-
)
|
|
3185
|
-
|
|
3726
|
+
extraIdPatterns: extraIdPatterns.map(json),
|
|
3727
|
+
keyBuilder: keyBuilder === void 0 ? void 0 : "[function]",
|
|
3728
|
+
// Left out when empty, so the fingerprint without operation keys stays that of 1.0.x (18-REQ-11).
|
|
3729
|
+
operations: operations.length === 0 ? void 0 : operations.map((entry) => ({ type: entry.type, match: json(entry.match) }))
|
|
3186
3730
|
};
|
|
3187
3731
|
return hashHex(
|
|
3188
3732
|
stringifyStable({
|
|
@@ -3224,7 +3768,8 @@ var RULE_ORDER = [
|
|
|
3224
3768
|
"p99",
|
|
3225
3769
|
"apdex",
|
|
3226
3770
|
"wilson",
|
|
3227
|
-
"errors"
|
|
3771
|
+
"errors",
|
|
3772
|
+
"nonSuccess"
|
|
3228
3773
|
];
|
|
3229
3774
|
function compareText5(a, b) {
|
|
3230
3775
|
return a < b ? -1 : a > b ? 1 : 0;
|
|
@@ -3345,7 +3890,7 @@ var RULES = [
|
|
|
3345
3890
|
return { code: "HINT_MEDIAN_ONLY", params: { n: median.n } };
|
|
3346
3891
|
},
|
|
3347
3892
|
({ evaluation: { result: result2, muted } }) => result2 === "fail" && muted !== null && !muted.expired ? { code: "HINT_MUTED", params: {} } : null,
|
|
3348
|
-
({ count:
|
|
3893
|
+
({ count: count4, fromFailedTests }) => count4 > 0 && fromFailedTests * 2 >= count4 ? { code: "HINT_FAILED_TESTS", params: { share: roundRatio(fromFailedTests / count4) } } : null,
|
|
3349
3894
|
({ evaluation: { result: result2, checks } }) => {
|
|
3350
3895
|
if (result2 !== "pass") return null;
|
|
3351
3896
|
const headroom = keyHeadroom(checks);
|
|
@@ -3433,6 +3978,11 @@ function buildAggregate(stats2, evaluated, rawUrls, hintOptions) {
|
|
|
3433
3978
|
durations: stats2.samples.durations.map(roundMs).sort((a, b) => a - b),
|
|
3434
3979
|
sampled: stats2.samples.sampled
|
|
3435
3980
|
},
|
|
3981
|
+
// Fields of 1.1.0 (08-REQ-43, 08-REQ-47), copied so the report owns its data.
|
|
3982
|
+
cold: stats2.cold === null ? null : structuredClone(stats2.cold),
|
|
3983
|
+
failedTimings: stats2.failedTimings.map((f) => ({
|
|
3984
|
+
...f
|
|
3985
|
+
})),
|
|
3436
3986
|
evaluation,
|
|
3437
3987
|
// Edges are constants of the scale, not rounded (08-REQ-34).
|
|
3438
3988
|
histogram: stats2.histogram === null ? null : {
|
|
@@ -3494,8 +4044,8 @@ function buildRunReport(input) {
|
|
|
3494
4044
|
const rawUrls = input.config.report?.rawUrls === true;
|
|
3495
4045
|
const kindOrder = { api: 0, step: 1 };
|
|
3496
4046
|
const hintOptions = {
|
|
3497
|
-
errorStatuses: input.config.checks?.errors?.statuses ??
|
|
3498
|
-
hardLimitFactor: input.config.gate?.hardLimitFactor === void 0 ?
|
|
4047
|
+
errorStatuses: input.config.checks?.errors?.statuses ?? chunkVYODYUEL_cjs.perfDefaults.checks.errors.statuses,
|
|
4048
|
+
hardLimitFactor: input.config.gate?.hardLimitFactor === void 0 ? chunkVYODYUEL_cjs.perfDefaults.gate.hardLimitFactor : input.config.gate.hardLimitFactor
|
|
3499
4049
|
};
|
|
3500
4050
|
const endpoints = buildAggregates(
|
|
3501
4051
|
"api",
|
|
@@ -3521,6 +4071,7 @@ function buildRunReport(input) {
|
|
|
3521
4071
|
host: { ...meta.host },
|
|
3522
4072
|
playwright: { ...meta.playwright },
|
|
3523
4073
|
passes: input.passes === void 0 ? { planned: 1, completed: 1, failed: [] } : { ...input.passes, failed: [...input.passes.failed].sort((a, b) => a - b) },
|
|
4074
|
+
shards: input.shards === void 0 || input.shards === null ? null : structuredClone(input.shards),
|
|
3524
4075
|
runConditions: structuredClone(input.runConditions),
|
|
3525
4076
|
tests: { ...input.tests },
|
|
3526
4077
|
evaluation: {
|
|
@@ -3553,7 +4104,8 @@ var RULE_ORDER2 = [
|
|
|
3553
4104
|
"p99",
|
|
3554
4105
|
"apdex",
|
|
3555
4106
|
"wilson",
|
|
3556
|
-
"errors"
|
|
4107
|
+
"errors",
|
|
4108
|
+
"nonSuccess"
|
|
3557
4109
|
];
|
|
3558
4110
|
var SUITES = [
|
|
3559
4111
|
{ kind: "api", name: "pw-perf endpoints", classname: "pw-perf.endpoints" },
|
|
@@ -3614,11 +4166,13 @@ function failedChecks(evaluation) {
|
|
|
3614
4166
|
(a, b) => Number(b.blocking) - Number(a.blocking) || (r2(a) === r2(b) ? 0 : r2(b) > r2(a) ? 1 : -1) || RULE_ORDER2.indexOf(a.rule) - RULE_ORDER2.indexOf(b.rule)
|
|
3615
4167
|
);
|
|
3616
4168
|
}
|
|
3617
|
-
|
|
4169
|
+
var NON_SUCCESS_STATUSES = 3;
|
|
4170
|
+
function checkLine(check2, evaluation, ctx, aggregate2) {
|
|
3618
4171
|
const rule = check2.rule === "percentile" ? ctx.level : check2.rule;
|
|
3619
4172
|
const sign = check2.rule === "apdex" ? "<" : ">";
|
|
3620
4173
|
const source = evaluation.thresholdSource === "file" ? "thresholds file" : "default thresholds";
|
|
3621
|
-
|
|
4174
|
+
const statuses = check2.rule === "nonSuccess" && aggregate2 !== void 0 ? nonSuccessStatuses(aggregate2, ctx) : "";
|
|
4175
|
+
let line = `${rule} ${formatActual(check2)} ${sign} limit ${formatLimit(check2)} (${overText(check2)}), ${String(check2.n)} samples${statuses}, ${source}`;
|
|
3622
4176
|
if (check2.hardLimitExceeded) line += ", HARD limit";
|
|
3623
4177
|
if (evaluation.muted?.expired === true) line += `, muting expired on ${evaluation.muted.until}`;
|
|
3624
4178
|
return line;
|
|
@@ -3626,10 +4180,14 @@ function checkLine(check2, evaluation, ctx) {
|
|
|
3626
4180
|
function share(value) {
|
|
3627
4181
|
return value.toFixed(3);
|
|
3628
4182
|
}
|
|
4183
|
+
function nonSuccessStatuses(aggregate2, ctx) {
|
|
4184
|
+
const labels = Object.entries(aggregate2.statuses).filter(([label]) => /^[1-5][0-9]{2}$/u.test(label) && !ctx.isSuccess(label)).sort((a, b) => b[1] - a[1] || (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0)).slice(0, NON_SUCCESS_STATUSES).map(([label, n]) => `${String(n)} \xD7 ${label}`);
|
|
4185
|
+
return labels.length === 0 ? "" : `: ${labels.join(", ")}`;
|
|
4186
|
+
}
|
|
3629
4187
|
function violationBody(key2, aggregate2, checks, ctx) {
|
|
3630
4188
|
const evaluation = aggregate2.evaluation;
|
|
3631
4189
|
const lines = checks.map(
|
|
3632
|
-
(c) => `${checkLine(c, evaluation, ctx)} (${c.blocking ? "blocking" : "not blocking"})`
|
|
4190
|
+
(c) => `${checkLine(c, evaluation, ctx, aggregate2)} (${c.blocking ? "blocking" : "not blocking"})`
|
|
3633
4191
|
);
|
|
3634
4192
|
const l = evaluation.limits;
|
|
3635
4193
|
let limits = `Limits: median ${formatMs(l.median)}, ${ctx.level} ${formatMs(l.percentile)}, p99 ${formatMs(l.p99)}, errors <= ${share(l.maxErrorRate)}`;
|
|
@@ -3638,6 +4196,7 @@ function violationBody(key2, aggregate2, checks, ctx) {
|
|
|
3638
4196
|
if (l.minApdex !== null) limits += `, apdex >= ${share(l.minApdex)}`;
|
|
3639
4197
|
if (l.maxWilson !== null) limits += `, wilson <= ${share(l.maxWilson)}`;
|
|
3640
4198
|
}
|
|
4199
|
+
if (l.maxNonSuccessRate !== null) limits += `, nonSuccess <= ${share(l.maxNonSuccessRate)}`;
|
|
3641
4200
|
lines.push(limits);
|
|
3642
4201
|
lines.push(`Samples: ${String(aggregate2.count)}, errors ${String(aggregate2.errorCount)}`);
|
|
3643
4202
|
const slowest = aggregate2.slowest[0];
|
|
@@ -3652,16 +4211,16 @@ function violationBody(key2, aggregate2, checks, ctx) {
|
|
|
3652
4211
|
}
|
|
3653
4212
|
function notBlockingReason(evaluation, report) {
|
|
3654
4213
|
const gate = report.config.gate;
|
|
3655
|
-
const defaultThresholds = gate?.defaultThresholds ??
|
|
4214
|
+
const defaultThresholds = gate?.defaultThresholds ?? chunkVYODYUEL_cjs.DEFAULT_CONFIG.gate.defaultThresholds;
|
|
3656
4215
|
if (evaluation.thresholdSource === "default" && defaultThresholds === "warn") {
|
|
3657
4216
|
return "default thresholds only warn (gate.defaultThresholds: warn)";
|
|
3658
4217
|
}
|
|
3659
4218
|
if (!report.evaluation.gateEnabled) return "the gate is off";
|
|
3660
|
-
return `within gate.tolerance (${String(gate?.tolerance ??
|
|
4219
|
+
return `within gate.tolerance (${String(gate?.tolerance ?? chunkVYODYUEL_cjs.DEFAULT_CONFIG.gate.tolerance)})`;
|
|
3661
4220
|
}
|
|
3662
4221
|
function mildestRule(report) {
|
|
3663
4222
|
const checks = report.config.checks;
|
|
3664
|
-
const d =
|
|
4223
|
+
const d = chunkVYODYUEL_cjs.DEFAULT_CONFIG.checks;
|
|
3665
4224
|
const rules = [
|
|
3666
4225
|
{
|
|
3667
4226
|
rule: "median",
|
|
@@ -3720,7 +4279,23 @@ function notEvaluatedMessage(kind2, aggregate2, report) {
|
|
|
3720
4279
|
}
|
|
3721
4280
|
}
|
|
3722
4281
|
function levelOf(report) {
|
|
3723
|
-
return report.config.checks?.time?.percentile?.level ??
|
|
4282
|
+
return report.config.checks?.time?.percentile?.level ?? chunkVYODYUEL_cjs.DEFAULT_CONFIG.checks.time.percentile.level;
|
|
4283
|
+
}
|
|
4284
|
+
function contextLines(aggregate2) {
|
|
4285
|
+
const lines = [];
|
|
4286
|
+
const workload2 = aggregate2.evaluation.workload;
|
|
4287
|
+
if (workload2 !== null) {
|
|
4288
|
+
const perPass2 = (side) => (side.count / side.passes).toFixed(1);
|
|
4289
|
+
lines.push(
|
|
4290
|
+
`workload: ${String(workload2.base.count)} \u2192 ${String(workload2.now.count)} samples (per pass ${perPass2(workload2.base)} \u2192 ${perPass2(workload2.now)})`
|
|
4291
|
+
);
|
|
4292
|
+
}
|
|
4293
|
+
const cold2 = aggregate2.cold;
|
|
4294
|
+
if (cold2?.excluded === true && cold2.warmP50 !== null) {
|
|
4295
|
+
const calls = cold2.count === 1 ? "first call" : `slowest of ${String(cold2.count)} first calls`;
|
|
4296
|
+
lines.push(`cold start: ${calls} ${formatMs(cold2.max)}, warm p50 ${formatMs(cold2.warmP50)}`);
|
|
4297
|
+
}
|
|
4298
|
+
return lines;
|
|
3724
4299
|
}
|
|
3725
4300
|
function keyCase(kind2, classname, key2, aggregate2, ctx) {
|
|
3726
4301
|
const evaluation = aggregate2.evaluation;
|
|
@@ -3740,11 +4315,11 @@ function keyCase(kind2, classname, key2, aggregate2, ctx) {
|
|
|
3740
4315
|
if (blocking !== void 0) {
|
|
3741
4316
|
children.push({
|
|
3742
4317
|
tag: "failure",
|
|
3743
|
-
attrs: { type: blocking.rule, message: checkLine(blocking, evaluation, ctx) },
|
|
4318
|
+
attrs: { type: blocking.rule, message: checkLine(blocking, evaluation, ctx, aggregate2) },
|
|
3744
4319
|
text: body.join("\n")
|
|
3745
4320
|
});
|
|
3746
4321
|
} else if (muted !== null && isMuteActive2(evaluation)) {
|
|
3747
|
-
const exceeded = first2 === void 0 ? "" : `; ${checkLine(first2, evaluation, ctx)}`;
|
|
4322
|
+
const exceeded = first2 === void 0 ? "" : `; ${checkLine(first2, evaluation, ctx, aggregate2)}`;
|
|
3748
4323
|
children.push({
|
|
3749
4324
|
tag: "skipped",
|
|
3750
4325
|
attrs: { message: `muted until ${muted.until}: ${muted.note}${exceeded}` },
|
|
@@ -3757,6 +4332,12 @@ function keyCase(kind2, classname, key2, aggregate2, ctx) {
|
|
|
3757
4332
|
} else if (muted !== null && isMuteActive2(evaluation)) {
|
|
3758
4333
|
children.push({ tag: "system-out", text: `muted until ${muted.until}: ${muted.note}` });
|
|
3759
4334
|
}
|
|
4335
|
+
const context2 = contextLines(aggregate2);
|
|
4336
|
+
if (context2.length > 0) {
|
|
4337
|
+
const out = children.find((c) => c.tag === "system-out");
|
|
4338
|
+
if (out === void 0) children.push({ tag: "system-out", text: context2.join("\n") });
|
|
4339
|
+
else out.text = [out.text ?? "", ...context2].join("\n");
|
|
4340
|
+
}
|
|
3760
4341
|
return {
|
|
3761
4342
|
classname,
|
|
3762
4343
|
name: key2,
|
|
@@ -3849,7 +4430,10 @@ function buildJunitXml(report) {
|
|
|
3849
4430
|
const ctx = {
|
|
3850
4431
|
report,
|
|
3851
4432
|
level: levelOf(report),
|
|
3852
|
-
details: report.config.report?.html === false ? "report.json" : "report.html"
|
|
4433
|
+
details: report.config.report?.html === false ? "report.json" : "report.html",
|
|
4434
|
+
isSuccess: compileStatusMatcher(
|
|
4435
|
+
report.config.measure?.successStatuses ?? chunkVYODYUEL_cjs.DEFAULT_CONFIG.measure.successStatuses
|
|
4436
|
+
)
|
|
3853
4437
|
};
|
|
3854
4438
|
const ci = report.ci;
|
|
3855
4439
|
const suites = [
|
|
@@ -3865,8 +4449,8 @@ function buildJunitXml(report) {
|
|
|
3865
4449
|
["pw-perf.evaluation", report.evaluation.status],
|
|
3866
4450
|
["pw-perf.exitCode", String(exitCode)],
|
|
3867
4451
|
["pw-perf.passes", `${String(report.passes.completed)}/${String(report.passes.planned)}`],
|
|
3868
|
-
// Number of merged shards (17-REQ-17); 0
|
|
3869
|
-
["pw-perf.shards",
|
|
4452
|
+
// Number of merged shards (16-REQ-13, 17-REQ-17); 0 without a merge.
|
|
4453
|
+
["pw-perf.shards", String(report.shards?.list.length ?? 0)],
|
|
3870
4454
|
["pw-perf.commit", ci?.commit ?? ""],
|
|
3871
4455
|
["pw-perf.branch", ci?.branch ?? ""],
|
|
3872
4456
|
["pw-perf.buildUrl", ci?.buildUrl ?? ""]
|
|
@@ -3969,6 +4553,19 @@ function modeCommand(mode2, ctx) {
|
|
|
3969
4553
|
}
|
|
3970
4554
|
return perfCommand(mode2, ctx.env, plainCommand(pm) + tail(mode2, ctx, false), ctx.platform);
|
|
3971
4555
|
}
|
|
4556
|
+
function onlyStatusRulesBlock(report) {
|
|
4557
|
+
let blocking = 0;
|
|
4558
|
+
for (const aggregates of [report.endpoints, report.steps]) {
|
|
4559
|
+
for (const aggregate2 of Object.values(aggregates)) {
|
|
4560
|
+
for (const check2 of aggregate2.evaluation.checks) {
|
|
4561
|
+
if (!check2.blocking) continue;
|
|
4562
|
+
if (check2.rule !== "nonSuccess" && check2.rule !== "errors") return false;
|
|
4563
|
+
blocking += 1;
|
|
4564
|
+
}
|
|
4565
|
+
}
|
|
4566
|
+
}
|
|
4567
|
+
return blocking > 0;
|
|
4568
|
+
}
|
|
3972
4569
|
function nextHint(input) {
|
|
3973
4570
|
const { report, commands, written } = input;
|
|
3974
4571
|
if (report.toolErrors.length > 0) return null;
|
|
@@ -3988,7 +4585,8 @@ function nextHint(input) {
|
|
|
3988
4585
|
return `derive thresholds: ${commands.thresholds}`;
|
|
3989
4586
|
}
|
|
3990
4587
|
if (report.evaluation.status === "failed") {
|
|
3991
|
-
|
|
4588
|
+
const what = onlyStatusRulesBlock(report) ? "the new response statuses are" : "the slowdown is";
|
|
4589
|
+
return `open the report; if ${what} intended, derive thresholds again: ${commands.thresholds}`;
|
|
3992
4590
|
}
|
|
3993
4591
|
return null;
|
|
3994
4592
|
}
|
|
@@ -4676,7 +5274,7 @@ function clamp(x, min, max) {
|
|
|
4676
5274
|
return Math.min(max, Math.max(min, x));
|
|
4677
5275
|
}
|
|
4678
5276
|
function derivationSettings2(cfg, kind2) {
|
|
4679
|
-
const { time, slowShare, errors } = cfg.checks;
|
|
5277
|
+
const { time, slowShare, errors, nonSuccess } = cfg.checks;
|
|
4680
5278
|
return structuredClone({
|
|
4681
5279
|
t: slowShare.t[kind2],
|
|
4682
5280
|
smallSampleN: cfg.thresholds.smallSampleN,
|
|
@@ -4686,10 +5284,20 @@ function derivationSettings2(cfg, kind2) {
|
|
|
4686
5284
|
p99: time.p99.margin,
|
|
4687
5285
|
apdex: slowShare.apdex.margin,
|
|
4688
5286
|
wilson: slowShare.wilson.margin,
|
|
4689
|
-
errors: errors.margin
|
|
5287
|
+
errors: errors.margin,
|
|
5288
|
+
// Endpoint files only: steps have no nonSuccess limit (10-REQ-25).
|
|
5289
|
+
...kind2 === "api" ? { nonSuccess: nonSuccess.margin } : {}
|
|
4690
5290
|
}
|
|
4691
5291
|
});
|
|
4692
5292
|
}
|
|
5293
|
+
function rateLimit(k, bigN, margin) {
|
|
5294
|
+
const r2 = bigN === 0 ? 0 : k / bigN;
|
|
5295
|
+
const low = wilsonBounds(k, bigN)?.lower ?? 0;
|
|
5296
|
+
return ceilTo(
|
|
5297
|
+
Math.min(1, Math.max(r2 * margin.factor + margin.add, margin.min, low + ERR_SELF_GAP)),
|
|
5298
|
+
3
|
|
5299
|
+
);
|
|
5300
|
+
}
|
|
4693
5301
|
function deriveEntry(stats2, kind2, cfg) {
|
|
4694
5302
|
const level = cfg.checks.time.percentile.level;
|
|
4695
5303
|
const source = withPercentile(stats2, level).stats;
|
|
@@ -4699,7 +5307,7 @@ function deriveEntry(stats2, kind2, cfg) {
|
|
|
4699
5307
|
if (value === void 0) throw new Error(`deriveEntry: aggregate has no percentile "${name}"`);
|
|
4700
5308
|
return value;
|
|
4701
5309
|
};
|
|
4702
|
-
const { time, slowShare, errors } = cfg.checks;
|
|
5310
|
+
const { time, slowShare, errors, nonSuccess } = cfg.checks;
|
|
4703
5311
|
const T = slowShare.t[kind2];
|
|
4704
5312
|
const n = stats2.successCount;
|
|
4705
5313
|
const small = n < cfg.thresholds.smallSampleN;
|
|
@@ -4748,14 +5356,8 @@ function deriveEntry(stats2, kind2, cfg) {
|
|
|
4748
5356
|
);
|
|
4749
5357
|
}
|
|
4750
5358
|
const bigN = stats2.count;
|
|
4751
|
-
const
|
|
4752
|
-
const
|
|
4753
|
-
const em = errors.margin;
|
|
4754
|
-
const maxErrorRate = ceilTo(
|
|
4755
|
-
Math.min(1, Math.max(e * em.factor + em.add, em.min, eLow + ERR_SELF_GAP)),
|
|
4756
|
-
3
|
|
4757
|
-
);
|
|
4758
|
-
return {
|
|
5359
|
+
const maxErrorRate = rateLimit(stats2.errorCount, bigN, errors.margin);
|
|
5360
|
+
const entry = {
|
|
4759
5361
|
t,
|
|
4760
5362
|
median,
|
|
4761
5363
|
percentile: percentileLimit,
|
|
@@ -4764,6 +5366,10 @@ function deriveEntry(stats2, kind2, cfg) {
|
|
|
4764
5366
|
maxWilson,
|
|
4765
5367
|
maxErrorRate
|
|
4766
5368
|
};
|
|
5369
|
+
if (kind2 === "api" && stats2.nonSuccessCount !== null) {
|
|
5370
|
+
entry.maxNonSuccessRate = rateLimit(stats2.nonSuccessCount, bigN, nonSuccess.margin);
|
|
5371
|
+
}
|
|
5372
|
+
return entry;
|
|
4767
5373
|
}
|
|
4768
5374
|
|
|
4769
5375
|
// src/core/thresholds/consistency.ts
|
|
@@ -4784,7 +5390,8 @@ function allRulesOn(checks) {
|
|
|
4784
5390
|
apdex: on(checks.slowShare.apdex),
|
|
4785
5391
|
wilson: on(checks.slowShare.wilson)
|
|
4786
5392
|
},
|
|
4787
|
-
errors: on(checks.errors)
|
|
5393
|
+
errors: on(checks.errors),
|
|
5394
|
+
nonSuccess: on(checks.nonSuccess)
|
|
4788
5395
|
};
|
|
4789
5396
|
}
|
|
4790
5397
|
function entrySelfConsistent(entry, aggregate2, kind2, cfg) {
|
|
@@ -4801,7 +5408,7 @@ function entrySelfConsistent(entry, aggregate2, kind2, cfg) {
|
|
|
4801
5408
|
var MS_LIMITS = /* @__PURE__ */ new Set(["t", "median", "percentile", "p99"]);
|
|
4802
5409
|
var TIME_LIMITS = ["median", "percentile", "p99"];
|
|
4803
5410
|
function isComplete(entry) {
|
|
4804
|
-
return
|
|
5411
|
+
return chunkVXGTC6DB_cjs.LIMIT_NAMES.every((name) => entry[name] !== void 0);
|
|
4805
5412
|
}
|
|
4806
5413
|
function limitsOf(entry) {
|
|
4807
5414
|
return {
|
|
@@ -4811,16 +5418,18 @@ function limitsOf(entry) {
|
|
|
4811
5418
|
p99: entry.p99 ?? null,
|
|
4812
5419
|
minApdex: entry.minApdex ?? null,
|
|
4813
5420
|
maxWilson: entry.maxWilson ?? null,
|
|
4814
|
-
maxErrorRate: entry.maxErrorRate ?? null
|
|
5421
|
+
maxErrorRate: entry.maxErrorRate ?? null,
|
|
5422
|
+
maxNonSuccessRate: entry.maxNonSuccessRate ?? null
|
|
4815
5423
|
};
|
|
4816
5424
|
}
|
|
4817
5425
|
function atMost(a, b) {
|
|
4818
5426
|
return Math.round(a * 1e6) <= Math.round(b * 1e6);
|
|
4819
5427
|
}
|
|
4820
5428
|
function withinHysteresis(before, after, hysteresis) {
|
|
4821
|
-
return
|
|
5429
|
+
return chunkVXGTC6DB_cjs.DIFF_LIMIT_NAMES.every((name) => {
|
|
4822
5430
|
const a = before[name];
|
|
4823
5431
|
const b = after[name];
|
|
5432
|
+
if (a === void 0 || b === void 0) return name === "maxNonSuccessRate";
|
|
4824
5433
|
if (a === null || b === null) return a === b;
|
|
4825
5434
|
const allowed = MS_LIMITS.has(name) ? hysteresis.relative * a : hysteresis.ratio;
|
|
4826
5435
|
return atMost(Math.abs(b - a), allowed);
|
|
@@ -4844,7 +5453,7 @@ function loosenedMuch(before, after, loosenWarnRelative) {
|
|
|
4844
5453
|
}
|
|
4845
5454
|
|
|
4846
5455
|
// src/core/thresholds/derive.ts
|
|
4847
|
-
var
|
|
5456
|
+
var KIND_NOUN3 = { api: "endpoint", step: "step" };
|
|
4848
5457
|
function aggregatesOf(report, kind2) {
|
|
4849
5458
|
const byKind = {
|
|
4850
5459
|
api: report.endpoints,
|
|
@@ -4852,6 +5461,9 @@ function aggregatesOf(report, kind2) {
|
|
|
4852
5461
|
};
|
|
4853
5462
|
return byKind[kind2];
|
|
4854
5463
|
}
|
|
5464
|
+
function coldSamplesOf(report) {
|
|
5465
|
+
return report.config.measure?.coldSamples ?? chunkVYODYUEL_cjs.DEFAULT_CONFIG.measure.coldSamples;
|
|
5466
|
+
}
|
|
4855
5467
|
function reportSource(report) {
|
|
4856
5468
|
const browsers = report.runConditions.projects.filter((p) => p.role === "measured" && p.browserName !== null).map((p) => p.browserName ?? "");
|
|
4857
5469
|
const { platform, arch, ci, cpuCount, cpuModel } = report.host;
|
|
@@ -4860,7 +5472,8 @@ function reportSource(report) {
|
|
|
4860
5472
|
playwrightVersion: report.playwright.version,
|
|
4861
5473
|
host: { platform, arch, ci, cpuCount, cpuModel },
|
|
4862
5474
|
normalization: report.normalization,
|
|
4863
|
-
stepNormalization: report.stepNormalization
|
|
5475
|
+
stepNormalization: report.stepNormalization,
|
|
5476
|
+
coldSamples: coldSamplesOf(report)
|
|
4864
5477
|
};
|
|
4865
5478
|
}
|
|
4866
5479
|
function refusal(report, cfg, existing) {
|
|
@@ -4877,11 +5490,11 @@ function refusal(report, cfg, existing) {
|
|
|
4877
5490
|
{
|
|
4878
5491
|
code: "THRESHOLDS_SOURCE_INCOMPLETE",
|
|
4879
5492
|
message: `The source report is incomplete or untrustworthy (${incomplete.join("; ")}); no thresholds file was written.`,
|
|
4880
|
-
hint: `Fix the cause and derive again with \`${
|
|
5493
|
+
hint: `Fix the cause and derive again with \`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\`: thresholds are derived from complete runs only.`
|
|
4881
5494
|
}
|
|
4882
5495
|
];
|
|
4883
5496
|
}
|
|
4884
|
-
if (
|
|
5497
|
+
if (chunkVXGTC6DB_cjs.KINDS.every((kind2) => Object.keys(aggregatesOf(report, kind2)).length === 0)) {
|
|
4885
5498
|
return [
|
|
4886
5499
|
{
|
|
4887
5500
|
code: "THRESHOLDS_EMPTY_REPORT",
|
|
@@ -4890,7 +5503,7 @@ function refusal(report, cfg, existing) {
|
|
|
4890
5503
|
}
|
|
4891
5504
|
];
|
|
4892
5505
|
}
|
|
4893
|
-
const derivable =
|
|
5506
|
+
const derivable = chunkVXGTC6DB_cjs.KINDS.some(
|
|
4894
5507
|
(kind2) => Object.values(aggregatesOf(report, kind2)).some((stats2) => isDerivable(stats2, cfg.checks))
|
|
4895
5508
|
);
|
|
4896
5509
|
if (!derivable) {
|
|
@@ -4902,7 +5515,7 @@ function refusal(report, cfg, existing) {
|
|
|
4902
5515
|
}
|
|
4903
5516
|
];
|
|
4904
5517
|
}
|
|
4905
|
-
const invalid =
|
|
5518
|
+
const invalid = chunkVXGTC6DB_cjs.KINDS.flatMap((kind2) => {
|
|
4906
5519
|
const file = existing[kind2];
|
|
4907
5520
|
return file.status === "invalid" ? file.issues.map(schemaIssueToIssue) : [];
|
|
4908
5521
|
});
|
|
@@ -4915,7 +5528,7 @@ function generatedBlock(report, cfg, kind2, opts) {
|
|
|
4915
5528
|
0
|
|
4916
5529
|
);
|
|
4917
5530
|
return {
|
|
4918
|
-
tool: { name:
|
|
5531
|
+
tool: { name: chunkVXGTC6DB_cjs.PACKAGE_NAME, version: opts.toolVersion },
|
|
4919
5532
|
env: opts.env,
|
|
4920
5533
|
sourceRunId: report.runId,
|
|
4921
5534
|
sourceRunStartedAt: report.startedAt,
|
|
@@ -4926,11 +5539,21 @@ function generatedBlock(report, cfg, kind2, opts) {
|
|
|
4926
5539
|
playwrightVersion: source.playwrightVersion,
|
|
4927
5540
|
host: source.host,
|
|
4928
5541
|
// The step file carries the step fingerprint (10-REQ-22, 06-REQ-25).
|
|
4929
|
-
normalization: kind2 === "step" ? report.stepNormalization ?? "" : source.normalization
|
|
5542
|
+
normalization: kind2 === "step" ? report.stepNormalization ?? "" : source.normalization,
|
|
5543
|
+
coldSamples: coldSamplesOf(report),
|
|
5544
|
+
sourcePasses: report.passes.completed
|
|
4930
5545
|
};
|
|
4931
5546
|
}
|
|
4932
5547
|
function generatedChanged(before, after) {
|
|
4933
|
-
return before.env !== after.env || before.evaluatedPercentile !== after.evaluatedPercentile || stringifyStable(before.derivation) !== stringifyStable(after.derivation) || !sameList(before.browsers, after.browsers) || majorMinor(before.playwrightVersion) !== majorMinor(after.playwrightVersion) || stringifyStable(before.host) !== stringifyStable(after.host) || before.normalization !== after.normalization;
|
|
5548
|
+
return before.env !== after.env || before.evaluatedPercentile !== after.evaluatedPercentile || stringifyStable(before.derivation) !== stringifyStable(after.derivation) || !sameList(before.browsers, after.browsers) || majorMinor(before.playwrightVersion) !== majorMinor(after.playwrightVersion) || stringifyStable(before.host) !== stringifyStable(after.host) || before.normalization !== after.normalization || before.coldSamples !== after.coldSamples;
|
|
5549
|
+
}
|
|
5550
|
+
function sourceBlock(stats2, kindCount, passes) {
|
|
5551
|
+
return {
|
|
5552
|
+
count: stats2.count,
|
|
5553
|
+
successCount: stats2.successCount,
|
|
5554
|
+
passes,
|
|
5555
|
+
share: kindCount === 0 ? 0 : floorTo(stats2.count / kindCount, 4)
|
|
5556
|
+
};
|
|
4934
5557
|
}
|
|
4935
5558
|
function humanFields(entry) {
|
|
4936
5559
|
const fields = {};
|
|
@@ -4954,7 +5577,7 @@ function deriveKind(report, cfg, file, opts) {
|
|
|
4954
5577
|
if (keys.length > 0) {
|
|
4955
5578
|
warnings.push({
|
|
4956
5579
|
code: "THRESHOLDS_KIND_SKIPPED",
|
|
4957
|
-
message: `No ${
|
|
5580
|
+
message: `No ${KIND_NOUN3[kind2]} key has at least ${minDeriveSamples(cfg.checks)} successful samples; ${file.path} was not written.`,
|
|
4958
5581
|
hint: `Run more passes (run.passes.thresholds or PW_PERF_PASSES).`
|
|
4959
5582
|
});
|
|
4960
5583
|
}
|
|
@@ -4972,7 +5595,8 @@ function deriveKind(report, cfg, file, opts) {
|
|
|
4972
5595
|
const {
|
|
4973
5596
|
diffs,
|
|
4974
5597
|
timing,
|
|
4975
|
-
keys: keysDiffer
|
|
5598
|
+
keys: keysDiffer,
|
|
5599
|
+
cold: cold2
|
|
4976
5600
|
} = sourceDifferences(loaded.file.generated, sourceForKind(reportSource(report), kind2));
|
|
4977
5601
|
if (diffs.length > 0) {
|
|
4978
5602
|
const hints = [];
|
|
@@ -4983,9 +5607,10 @@ function deriveKind(report, cfg, file, opts) {
|
|
|
4983
5607
|
}
|
|
4984
5608
|
if (keysDiffer) {
|
|
4985
5609
|
hints.push(
|
|
4986
|
-
`Another normalization changes the keys: entries of old keys are kept as unseen until removed with \`${
|
|
5610
|
+
`Another normalization changes the keys: entries of old keys are kept as unseen until removed with \`${chunkVXGTC6DB_cjs.PRUNE_COMMAND}\`.`
|
|
4987
5611
|
);
|
|
4988
5612
|
}
|
|
5613
|
+
if (cold2) hints.push(COLD_SAMPLES_HINT);
|
|
4989
5614
|
warnings.push({
|
|
4990
5615
|
code: "THRESHOLDS_SOURCE_MISMATCH",
|
|
4991
5616
|
message: `Thresholds in ${loaded.path} were derived under other conditions than the source report (file / source report): ${diffs.join("; ")}.`,
|
|
@@ -4994,6 +5619,12 @@ function deriveKind(report, cfg, file, opts) {
|
|
|
4994
5619
|
}
|
|
4995
5620
|
}
|
|
4996
5621
|
const before = loaded?.file.entries ?? {};
|
|
5622
|
+
const kindCount = keys.reduce((sum3, key2) => sum3 + (aggregates[key2]?.count ?? 0), 0);
|
|
5623
|
+
const passes = report.passes.completed;
|
|
5624
|
+
const derived = (stats2) => ({
|
|
5625
|
+
...deriveEntry(stats2, kind2, cfg),
|
|
5626
|
+
source: sourceBlock(stats2, kindCount, passes)
|
|
5627
|
+
});
|
|
4997
5628
|
const entries2 = {};
|
|
4998
5629
|
let much = 0;
|
|
4999
5630
|
for (const key2 of Object.keys(before).sort(compareText)) {
|
|
@@ -5014,16 +5645,21 @@ function deriveKind(report, cfg, file, opts) {
|
|
|
5014
5645
|
}
|
|
5015
5646
|
const fresh = deriveEntry(stats2, kind2, cfg);
|
|
5016
5647
|
if (withinHysteresis(old, fresh, cfg.thresholds.hysteresis) && entrySelfConsistent(old, stats2, kind2, cfg)) {
|
|
5017
|
-
|
|
5648
|
+
const kept = structuredClone(old);
|
|
5649
|
+
if (kept.maxNonSuccessRate === void 0 && fresh.maxNonSuccessRate !== void 0) {
|
|
5650
|
+
kept.maxNonSuccessRate = fresh.maxNonSuccessRate;
|
|
5651
|
+
}
|
|
5652
|
+
kept.source ??= sourceBlock(stats2, kindCount, passes);
|
|
5653
|
+
entries2[key2] = kept;
|
|
5018
5654
|
continue;
|
|
5019
5655
|
}
|
|
5020
|
-
entries2[key2] = { ...fresh, ...humanFields(old) };
|
|
5656
|
+
entries2[key2] = { ...fresh, source: sourceBlock(stats2, kindCount, passes), ...humanFields(old) };
|
|
5021
5657
|
if (loosenedMuch(old, fresh, cfg.thresholds.loosenWarnRelative)) much += 1;
|
|
5022
5658
|
}
|
|
5023
5659
|
for (const key2 of derivable) {
|
|
5024
5660
|
const stats2 = aggregates[key2];
|
|
5025
5661
|
if (Object.hasOwn(before, key2) || stats2 === void 0) continue;
|
|
5026
|
-
entries2[key2] =
|
|
5662
|
+
entries2[key2] = derived(stats2);
|
|
5027
5663
|
}
|
|
5028
5664
|
const generated = generatedBlock(report, cfg, kind2, opts);
|
|
5029
5665
|
const content = {
|
|
@@ -5042,7 +5678,7 @@ function deriveKind(report, cfg, file, opts) {
|
|
|
5042
5678
|
};
|
|
5043
5679
|
}
|
|
5044
5680
|
function deriveThresholds(report, cfg, existing, opts) {
|
|
5045
|
-
for (const kind2 of
|
|
5681
|
+
for (const kind2 of chunkVXGTC6DB_cjs.KINDS) {
|
|
5046
5682
|
const found = existing[kind2].kind;
|
|
5047
5683
|
if (found !== kind2) {
|
|
5048
5684
|
throw new Error(`deriveThresholds: existing.${kind2} has kind "${found}"`);
|
|
@@ -5070,12 +5706,12 @@ function deriveThresholds(report, cfg, existing, opts) {
|
|
|
5070
5706
|
warnings.push({
|
|
5071
5707
|
code: "THRESHOLDS_SOURCE_TEST_MODE",
|
|
5072
5708
|
message: "The source report comes from test mode, which runs fewer repetitions than a thresholds run.",
|
|
5073
|
-
hint: `Prefer a report of a thresholds run (\`${
|
|
5709
|
+
hint: `Prefer a report of a thresholds run (\`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\`) as the source.`
|
|
5074
5710
|
});
|
|
5075
5711
|
}
|
|
5076
5712
|
const files = [];
|
|
5077
5713
|
let much = 0;
|
|
5078
|
-
for (const kind2 of
|
|
5714
|
+
for (const kind2 of chunkVXGTC6DB_cjs.KINDS) {
|
|
5079
5715
|
const file = existing[kind2];
|
|
5080
5716
|
if (file.status === "invalid") throw new Error("deriveThresholds: unreachable invalid file");
|
|
5081
5717
|
if ((kind2 !== "api" || !cfg.measure.api) && file.status === "missing") {
|
|
@@ -5102,7 +5738,8 @@ function limitChanges(before, after, loosenWarnRelative) {
|
|
|
5102
5738
|
const a = limitsOf(before);
|
|
5103
5739
|
const b = limitsOf(after);
|
|
5104
5740
|
const changes = [];
|
|
5105
|
-
for (const limit of
|
|
5741
|
+
for (const limit of chunkVXGTC6DB_cjs.DIFF_LIMIT_NAMES) {
|
|
5742
|
+
if (limit === "maxNonSuccessRate" && (a[limit] === null || b[limit] === null)) continue;
|
|
5106
5743
|
const direction = changeDirection(limit, a[limit], b[limit]);
|
|
5107
5744
|
if (direction === null) continue;
|
|
5108
5745
|
const change = { limit, before: a[limit], after: b[limit], direction };
|
|
@@ -5137,6 +5774,7 @@ function keptKey(key2, before, after, stats2, kind2, cfg) {
|
|
|
5137
5774
|
}
|
|
5138
5775
|
if (!isDerivable(stats2, cfg.checks)) return skipped(key2, stats2, cfg);
|
|
5139
5776
|
const changes = limitChanges(before, after, cfg.thresholds.loosenWarnRelative);
|
|
5777
|
+
const newFields = before.maxNonSuccessRate === void 0 && after.maxNonSuccessRate !== void 0 || before.source === void 0 && after.source !== void 0;
|
|
5140
5778
|
if (changes.length > 0) {
|
|
5141
5779
|
const looser = changes.some((c) => c.direction === "looser");
|
|
5142
5780
|
const stricter = changes.some((c) => c.direction === "stricter");
|
|
@@ -5144,9 +5782,15 @@ function keptKey(key2, before, after, stats2, kind2, cfg) {
|
|
|
5144
5782
|
return { key: key2, category, changes };
|
|
5145
5783
|
}
|
|
5146
5784
|
const fresh = cfg.thresholds.update === "all" ? deriveEntry(stats2, kind2, cfg) : null;
|
|
5147
|
-
const old = limitsOf(
|
|
5148
|
-
const kept = fresh !== null &&
|
|
5149
|
-
return {
|
|
5785
|
+
const old = limitsOf(after);
|
|
5786
|
+
const kept = fresh !== null && chunkVXGTC6DB_cjs.DIFF_LIMIT_NAMES.some((name) => (fresh[name] ?? null) !== old[name]);
|
|
5787
|
+
return {
|
|
5788
|
+
key: key2,
|
|
5789
|
+
category: "unchanged",
|
|
5790
|
+
changes: [],
|
|
5791
|
+
...kept ? { withinHysteresis: true } : {},
|
|
5792
|
+
...newFields ? { newFields: true } : {}
|
|
5793
|
+
};
|
|
5150
5794
|
}
|
|
5151
5795
|
function diffThresholds(before, after, report, cfg) {
|
|
5152
5796
|
const kind2 = after.kind;
|
|
@@ -5178,7 +5822,7 @@ function diffThresholds(before, after, report, cfg) {
|
|
|
5178
5822
|
if (muting !== null) diff.muted = { until: muting.until, expired: muting.expired };
|
|
5179
5823
|
diffs.push(diff);
|
|
5180
5824
|
}
|
|
5181
|
-
const counts = Object.fromEntries(
|
|
5825
|
+
const counts = Object.fromEntries(chunkVXGTC6DB_cjs.DIFF_CATEGORIES.map((c) => [c, 0]));
|
|
5182
5826
|
for (const diff of diffs) counts[diff.category] += 1;
|
|
5183
5827
|
return {
|
|
5184
5828
|
kind: kind2,
|
|
@@ -5204,15 +5848,15 @@ function formatThresholdsDiffMarkdown(diffs, paths) {
|
|
|
5204
5848
|
"",
|
|
5205
5849
|
`## ${cell(path)} (${diff.fileStatus === "not-written" ? "not written" : diff.fileStatus})`,
|
|
5206
5850
|
"",
|
|
5207
|
-
|
|
5851
|
+
chunkVXGTC6DB_cjs.diffCountsText(diff)
|
|
5208
5852
|
);
|
|
5209
|
-
const listed = diff.keys.filter((k) =>
|
|
5853
|
+
const listed = diff.keys.filter((k) => chunkVXGTC6DB_cjs.LISTED_CATEGORIES.has(k.category));
|
|
5210
5854
|
if (listed.length > 0) {
|
|
5211
5855
|
lines.push("", "| | Key | Before | After |", "|---|---|---|---|");
|
|
5212
5856
|
for (const k of listed) {
|
|
5213
|
-
const before =
|
|
5214
|
-
const after =
|
|
5215
|
-
lines.push(`| ${
|
|
5857
|
+
const before = chunkVXGTC6DB_cjs.diffValuesText(k, "before", diff.level, " \xB7 ");
|
|
5858
|
+
const after = chunkVXGTC6DB_cjs.diffValuesText(k, "after", diff.level, " \xB7 ");
|
|
5859
|
+
lines.push(`| ${chunkVXGTC6DB_cjs.diffMarker(k)} | ${code(k.key)} | ${cell(before)} | ${cell(after)} |`);
|
|
5216
5860
|
}
|
|
5217
5861
|
}
|
|
5218
5862
|
const skipped2 = diff.keys.filter((k) => k.category === "skipped" && k.samples !== void 0);
|
|
@@ -5220,7 +5864,7 @@ function formatThresholdsDiffMarkdown(diffs, paths) {
|
|
|
5220
5864
|
lines.push("", "Skipped (no entry derived):", "");
|
|
5221
5865
|
for (const k of skipped2) {
|
|
5222
5866
|
if (k.samples !== void 0)
|
|
5223
|
-
lines.push(`- ${code(k.key)}: ${
|
|
5867
|
+
lines.push(`- ${code(k.key)}: ${chunkVXGTC6DB_cjs.skippedReasonText(k.samples)}`);
|
|
5224
5868
|
}
|
|
5225
5869
|
}
|
|
5226
5870
|
const expired = diff.keys.filter((k) => k.muted?.expired === true);
|
|
@@ -5596,11 +6240,12 @@ var RULE_ORDER3 = [
|
|
|
5596
6240
|
"p99",
|
|
5597
6241
|
"apdex",
|
|
5598
6242
|
"wilson",
|
|
5599
|
-
"errors"
|
|
6243
|
+
"errors",
|
|
6244
|
+
"nonSuccess"
|
|
5600
6245
|
];
|
|
5601
6246
|
function violations(report) {
|
|
5602
6247
|
const list2 = [];
|
|
5603
|
-
for (const kind2 of
|
|
6248
|
+
for (const kind2 of chunkVXGTC6DB_cjs.KINDS) {
|
|
5604
6249
|
const aggregates = aggregatesOf2(report, kind2);
|
|
5605
6250
|
for (const [key2, aggregate2] of Object.entries(aggregates)) {
|
|
5606
6251
|
for (const check2 of aggregate2.evaluation.checks) {
|
|
@@ -5611,7 +6256,7 @@ function violations(report) {
|
|
|
5611
6256
|
}
|
|
5612
6257
|
}
|
|
5613
6258
|
return list2.sort(
|
|
5614
|
-
(a, b) => Number(b.check.blocking) - Number(a.check.blocking) || (a.r === b.r ? 0 : b.r > a.r ? 1 : -1) ||
|
|
6259
|
+
(a, b) => Number(b.check.blocking) - Number(a.check.blocking) || (a.r === b.r ? 0 : b.r > a.r ? 1 : -1) || chunkVXGTC6DB_cjs.KINDS.indexOf(a.kind) - chunkVXGTC6DB_cjs.KINDS.indexOf(b.kind) || compareText7(a.key, b.key) || RULE_ORDER3.indexOf(a.check.rule) - RULE_ORDER3.indexOf(b.check.rule)
|
|
5615
6260
|
);
|
|
5616
6261
|
}
|
|
5617
6262
|
function isMuted(evaluation) {
|
|
@@ -5624,6 +6269,12 @@ function header(report, paint2) {
|
|
|
5624
6269
|
if (t.flaky > 0) details.push(`${t.flaky} flaky`);
|
|
5625
6270
|
if (t.skipped > 0) details.push(`${t.skipped} skipped`);
|
|
5626
6271
|
const parts = [report.tool.name, `mode: ${report.mode}`];
|
|
6272
|
+
const shards = report.shards;
|
|
6273
|
+
if (shards !== null) {
|
|
6274
|
+
parts.push(
|
|
6275
|
+
shards.missing.length === 0 ? `merged from ${plural2(shards.total, "shard")}` : `merged from ${String(shards.list.length)} of ${plural2(shards.total, "shard")}`
|
|
6276
|
+
);
|
|
6277
|
+
}
|
|
5627
6278
|
if (report.env !== null) parts.push(`env: ${report.env}`);
|
|
5628
6279
|
parts.push(`${plural2(executions, "test")} (${details.join(", ")})`);
|
|
5629
6280
|
const ci = report.ci;
|
|
@@ -5671,7 +6322,7 @@ function issueBox(level, issues, limit, opts) {
|
|
|
5671
6322
|
}
|
|
5672
6323
|
function counterLines(report, opts) {
|
|
5673
6324
|
const counts = report.evaluation.counts;
|
|
5674
|
-
const shown =
|
|
6325
|
+
const shown = chunkVXGTC6DB_cjs.KINDS.filter(
|
|
5675
6326
|
(kind2) => ALWAYS_SHOWN.has(kind2) || counts[kind2].keys > 0 || counts[kind2].unseenThresholdEntries > 0
|
|
5676
6327
|
);
|
|
5677
6328
|
const percentileOff = report.config.checks?.time?.percentile?.enabled === false;
|
|
@@ -5695,7 +6346,7 @@ function counterLines(report, opts) {
|
|
|
5695
6346
|
function mutedLines(report, paint2) {
|
|
5696
6347
|
const lines = [];
|
|
5697
6348
|
const indent = " ".repeat("Muted: ".length);
|
|
5698
|
-
for (const kind2 of
|
|
6349
|
+
for (const kind2 of chunkVXGTC6DB_cjs.KINDS) {
|
|
5699
6350
|
const aggregates = aggregatesOf2(report, kind2);
|
|
5700
6351
|
for (const key2 of Object.keys(aggregates).sort(compareText7)) {
|
|
5701
6352
|
const muted = aggregates[key2]?.evaluation.muted;
|
|
@@ -5709,7 +6360,7 @@ function mutedLines(report, paint2) {
|
|
|
5709
6360
|
function keysOnDefaults(report) {
|
|
5710
6361
|
if (report.mode !== "test") return [];
|
|
5711
6362
|
const list2 = [];
|
|
5712
|
-
for (const kind2 of
|
|
6363
|
+
for (const kind2 of chunkVXGTC6DB_cjs.KINDS) {
|
|
5713
6364
|
const file = report.thresholdFiles.find((f) => f.kind === kind2);
|
|
5714
6365
|
if (file?.status !== "loaded") continue;
|
|
5715
6366
|
const aggregates = Object.entries(aggregatesOf2(report, kind2));
|
|
@@ -5718,13 +6369,14 @@ function keysOnDefaults(report) {
|
|
|
5718
6369
|
for (const [key2, aggregate2] of aggregates) {
|
|
5719
6370
|
const e = aggregate2.evaluation;
|
|
5720
6371
|
if (e.thresholdSource !== "default" || e.result === "not-evaluated") continue;
|
|
6372
|
+
if (aggregate2.successCount === 0) continue;
|
|
5721
6373
|
const failed = e.checks.filter((c) => !c.passed);
|
|
5722
6374
|
const rank = failed.some((c) => c.blocking) ? 2 : failed.length > 0 ? 1 : 0;
|
|
5723
6375
|
list2.push({ kind: kind2, key: key2, aggregate: aggregate2, rank });
|
|
5724
6376
|
}
|
|
5725
6377
|
}
|
|
5726
6378
|
return list2.sort(
|
|
5727
|
-
(a, b) => b.rank - a.rank ||
|
|
6379
|
+
(a, b) => b.rank - a.rank || chunkVXGTC6DB_cjs.KINDS.indexOf(a.kind) - chunkVXGTC6DB_cjs.KINDS.indexOf(b.kind) || compareText7(a.key, b.key)
|
|
5728
6380
|
);
|
|
5729
6381
|
}
|
|
5730
6382
|
function defaultKeyLines(report, opts, m, paint2) {
|
|
@@ -5798,11 +6450,24 @@ function tableLines(report, list2, opts, m, paint2) {
|
|
|
5798
6450
|
formatActual(v.check),
|
|
5799
6451
|
formatLimit(v.check),
|
|
5800
6452
|
overText(v.check),
|
|
5801
|
-
|
|
6453
|
+
samplesCell(v.check, v.evaluation),
|
|
5802
6454
|
v.evaluation.thresholdSource,
|
|
5803
6455
|
[v.check.hardLimitExceeded ? "HARD" : "", isMuted(v.evaluation) ? "MUTED" : ""].filter((f) => f !== "").join(" ")
|
|
5804
6456
|
],
|
|
5805
|
-
style: v.check.blocking ? "red" : "yellow"
|
|
6457
|
+
style: v.check.blocking ? "red" : "yellow",
|
|
6458
|
+
// Samples per pass changed much since the thresholds run (09-REQ-42).
|
|
6459
|
+
...v.evaluation.workload?.shifted === true ? {
|
|
6460
|
+
cellStyles: [
|
|
6461
|
+
void 0,
|
|
6462
|
+
void 0,
|
|
6463
|
+
void 0,
|
|
6464
|
+
void 0,
|
|
6465
|
+
void 0,
|
|
6466
|
+
void 0,
|
|
6467
|
+
void 0,
|
|
6468
|
+
"yellow"
|
|
6469
|
+
]
|
|
6470
|
+
} : {}
|
|
5806
6471
|
}));
|
|
5807
6472
|
const lines = table(columns, rows, opts);
|
|
5808
6473
|
if (list2.length > shown.length) {
|
|
@@ -5811,6 +6476,38 @@ function tableLines(report, list2, opts, m, paint2) {
|
|
|
5811
6476
|
}
|
|
5812
6477
|
return lines;
|
|
5813
6478
|
}
|
|
6479
|
+
var ALL_SAMPLE_RULES = /* @__PURE__ */ new Set([
|
|
6480
|
+
"errors",
|
|
6481
|
+
"nonSuccess"
|
|
6482
|
+
]);
|
|
6483
|
+
function samplesCell(check2, evaluation) {
|
|
6484
|
+
const base = evaluation.workload?.base;
|
|
6485
|
+
if (base === void 0) return String(check2.n);
|
|
6486
|
+
const n = ALL_SAMPLE_RULES.has(check2.rule) ? base.count : base.successCount;
|
|
6487
|
+
return `${String(check2.n)}/${String(n)}`;
|
|
6488
|
+
}
|
|
6489
|
+
function workloadText(passes, workers, samples) {
|
|
6490
|
+
return `${plural2(passes, "pass", "passes")} \xB7 ${plural2(workers, "worker")} \xB7 ${plural2(samples, "sample")}`.replace(
|
|
6491
|
+
/(\d{4,}) sample/u,
|
|
6492
|
+
(_, n) => `${Number(n).toLocaleString("en-US")} sample`
|
|
6493
|
+
);
|
|
6494
|
+
}
|
|
6495
|
+
function workloadLines(report, paint2) {
|
|
6496
|
+
for (const kind2 of chunkVXGTC6DB_cjs.KINDS) {
|
|
6497
|
+
const generated = report.thresholdFiles.find((f) => f.kind === kind2)?.generated;
|
|
6498
|
+
if (generated?.sourcePasses === void 0 || generated.sourceSampleCount === void 0) {
|
|
6499
|
+
continue;
|
|
6500
|
+
}
|
|
6501
|
+
const samples = Object.values(aggregatesOf2(report, kind2)).reduce(
|
|
6502
|
+
(sum3, a) => sum3 + a.successCount,
|
|
6503
|
+
0
|
|
6504
|
+
);
|
|
6505
|
+
const now = workloadText(report.passes.completed, report.runConditions.workers, samples);
|
|
6506
|
+
const base = workloadText(generated.sourcePasses, 1, generated.sourceSampleCount);
|
|
6507
|
+
return [paint2(` Workload: ${now} (thresholds run: ${base})`, "dim")];
|
|
6508
|
+
}
|
|
6509
|
+
return [];
|
|
6510
|
+
}
|
|
5814
6511
|
function slowestLines(report, list2) {
|
|
5815
6512
|
const seen = /* @__PURE__ */ new Set();
|
|
5816
6513
|
const lines = [];
|
|
@@ -5833,8 +6530,7 @@ function errorCauses(report) {
|
|
|
5833
6530
|
const t = report.tests;
|
|
5834
6531
|
const named = {
|
|
5835
6532
|
TESTS_FAILED_TOO_MANY: `too many failed tests (${t.unexpected} of ${t.expected + t.unexpected + t.flaky} executions)`,
|
|
5836
|
-
RUN_INCOMPLETE: "the run did not complete"
|
|
5837
|
-
RUN_SHARDED: "the run is sharded"
|
|
6533
|
+
RUN_INCOMPLETE: "the run did not complete"
|
|
5838
6534
|
};
|
|
5839
6535
|
const causes = [];
|
|
5840
6536
|
let other = 0;
|
|
@@ -5848,8 +6544,8 @@ function errorCauses(report) {
|
|
|
5848
6544
|
}
|
|
5849
6545
|
function resultLines(report, opts, m) {
|
|
5850
6546
|
const counts = report.evaluation.counts;
|
|
5851
|
-
const sum3 = (field3) =>
|
|
5852
|
-
const failed = (blocking) =>
|
|
6547
|
+
const sum3 = (field3) => chunkVXGTC6DB_cjs.KINDS.reduce((total, kind2) => total + counts[kind2][field3], 0);
|
|
6548
|
+
const failed = (blocking) => chunkVXGTC6DB_cjs.KINDS.reduce(
|
|
5853
6549
|
(total, kind2) => total + Object.values(aggregatesOf2(report, kind2)).reduce(
|
|
5854
6550
|
(n, a) => n + a.evaluation.checks.filter((c) => !c.passed && (!blocking || c.blocking)).length,
|
|
5855
6551
|
0
|
|
@@ -5914,13 +6610,61 @@ function resolvePath2(base, path) {
|
|
|
5914
6610
|
const b = toSlash(base);
|
|
5915
6611
|
return rootOf(b) + segments(`${b}/${p}`).join("/");
|
|
5916
6612
|
}
|
|
5917
|
-
function reportLine(report, html2, paint2) {
|
|
6613
|
+
function reportLine(report, html2, paint2, reportDir) {
|
|
5918
6614
|
const options = report.config.report;
|
|
5919
|
-
if (options?.dir === void 0) return [];
|
|
5920
|
-
const dir = resolvePath2(report.configDir, options.
|
|
5921
|
-
const file = html2 ?? options
|
|
6615
|
+
if (options?.dir === void 0 && reportDir === void 0) return [];
|
|
6616
|
+
const dir = toSlash(reportDir ?? resolvePath2(report.configDir, options?.dir ?? "."));
|
|
6617
|
+
const file = html2 ?? options?.html !== false ? "report.html" : "report.json";
|
|
5922
6618
|
return [`${paint2("Report:", "bold")} ${dir}/${file}`];
|
|
5923
6619
|
}
|
|
6620
|
+
function durationText(from, to) {
|
|
6621
|
+
const s = Math.max(0, Math.round((Date.parse(to) - Date.parse(from)) / 1e3));
|
|
6622
|
+
const h = Math.floor(s / 3600);
|
|
6623
|
+
const m = Math.floor(s % 3600 / 60);
|
|
6624
|
+
const sec = s % 60;
|
|
6625
|
+
if (h > 0) return `${String(h)}h ${String(m).padStart(2, "0")}m`;
|
|
6626
|
+
if (m > 0) return `${String(m)}m ${String(sec).padStart(2, "0")}s`;
|
|
6627
|
+
return `${String(sec)}s`;
|
|
6628
|
+
}
|
|
6629
|
+
var CPU_WIDTH = 28;
|
|
6630
|
+
function shardLines(report, frame) {
|
|
6631
|
+
const shards = report.shards;
|
|
6632
|
+
if (shards === null) return [];
|
|
6633
|
+
const hosts = report.warnings.some((w) => w.code === "MERGE_SHARDS_DIFFERENT_HOSTS");
|
|
6634
|
+
if (!hosts && shards.missing.length === 0) return [];
|
|
6635
|
+
const rows = [
|
|
6636
|
+
...shards.list.map((s) => ({
|
|
6637
|
+
index: s.index,
|
|
6638
|
+
cells: [
|
|
6639
|
+
`${String(s.index)}/${String(shards.total)}`,
|
|
6640
|
+
String(s.tests.expected + s.tests.unexpected + s.tests.flaky),
|
|
6641
|
+
s.samples.toLocaleString("en-US"),
|
|
6642
|
+
durationText(s.startedAt, s.finishedAt),
|
|
6643
|
+
`${String(s.passes.completed)}/${String(s.passes.planned)}`,
|
|
6644
|
+
truncateMiddle(s.host.cpuModel === "" ? "unknown" : s.host.cpuModel, CPU_WIDTH)
|
|
6645
|
+
]
|
|
6646
|
+
})),
|
|
6647
|
+
...shards.missing.map((index) => ({
|
|
6648
|
+
index,
|
|
6649
|
+
cells: [`${String(index)}/${String(shards.total)}`, "\u2014", "\u2014", "\u2014", "\u2014", "missing"]
|
|
6650
|
+
}))
|
|
6651
|
+
].sort((a, b) => a.index - b.index);
|
|
6652
|
+
return [
|
|
6653
|
+
...table(
|
|
6654
|
+
[
|
|
6655
|
+
{ header: "shard" },
|
|
6656
|
+
{ header: "tests", align: "right" },
|
|
6657
|
+
{ header: "samples", align: "right" },
|
|
6658
|
+
{ header: "time", align: "right" },
|
|
6659
|
+
{ header: "passes", align: "right" },
|
|
6660
|
+
{ header: "cpu", flex: true, minWidth: 8 }
|
|
6661
|
+
],
|
|
6662
|
+
rows.map((r2) => ({ cells: r2.cells })),
|
|
6663
|
+
{ ...frame, border: "dim" }
|
|
6664
|
+
),
|
|
6665
|
+
""
|
|
6666
|
+
];
|
|
6667
|
+
}
|
|
5924
6668
|
function formatSummary(report, opts) {
|
|
5925
6669
|
const paint2 = painter(opts.color);
|
|
5926
6670
|
const frame = { width: opts.width, color: opts.color, ascii: opts.ascii ?? false };
|
|
@@ -5937,11 +6681,16 @@ function formatSummary(report, opts) {
|
|
|
5937
6681
|
lines.push(...defaultKeyLines(report, frame, m, paint2));
|
|
5938
6682
|
if (list2.length > 0) {
|
|
5939
6683
|
lines.push(...tableLines(report, list2, frame, m, paint2));
|
|
6684
|
+
lines.push(...workloadLines(report, paint2));
|
|
5940
6685
|
const slowest = slowestLines(report, list2);
|
|
5941
6686
|
if (slowest.length > 0) lines.push(...slowest);
|
|
5942
6687
|
lines.push("");
|
|
5943
6688
|
}
|
|
5944
|
-
lines.push(...
|
|
6689
|
+
lines.push(...shardLines(report, frame));
|
|
6690
|
+
lines.push(
|
|
6691
|
+
...resultLines(report, frame, m),
|
|
6692
|
+
...reportLine(report, opts.html, paint2, opts.reportDir)
|
|
6693
|
+
);
|
|
5945
6694
|
return `${lines.join("\n")}
|
|
5946
6695
|
`;
|
|
5947
6696
|
}
|
|
@@ -5954,9 +6703,11 @@ function formatCheckSummary(s, opts) {
|
|
|
5954
6703
|
const lines = [];
|
|
5955
6704
|
lines.push("\u2500".repeat(Math.max(20, opts.width)));
|
|
5956
6705
|
const failed = s.failed > 0 ? `, ${String(s.failed)} failed` : "";
|
|
6706
|
+
const shardText = s.shard === void 0 || s.shard === null ? "" : ` \xB7 shard ${String(s.shard.current)}/${String(s.shard.total)}`;
|
|
6707
|
+
const reason = shardText === "" ? CHECK_REASON : `${CHECK_REASON}; only the tests of this shard were checked`;
|
|
5957
6708
|
lines.push(
|
|
5958
6709
|
paint2(
|
|
5959
|
-
`${s.packageName} \xB7 check \xB7 ${String(s.ran)} of ${plural2(s.selected, "test")} run (${String(s.passed)} passed${failed}) \xB7 ${String(s.skippedByCheck)} skipped by check`,
|
|
6710
|
+
`${s.packageName} \xB7 check${shardText} \xB7 ${String(s.ran)} of ${plural2(s.selected, "test")} run (${String(s.passed)} passed${failed}) \xB7 ${String(s.skippedByCheck)} skipped by check`,
|
|
5960
6711
|
"bold"
|
|
5961
6712
|
),
|
|
5962
6713
|
""
|
|
@@ -5966,7 +6717,7 @@ function formatCheckSummary(s, opts) {
|
|
|
5966
6717
|
if (p.role === "measured") {
|
|
5967
6718
|
const browser = p.requestOnly === true ? " (no browser)" : p.browserName === null ? "" : ` (${p.browserName})`;
|
|
5968
6719
|
lines.push(
|
|
5969
|
-
` measured ${p.name}${browser} \xB7 baseURL ${p.baseURL
|
|
6720
|
+
` measured ${p.name}${browser} \xB7 baseURL ${p.baseURL === null ? "(not set)" : p.baseURL.trim() === "" ? "(empty)" : p.baseURL} \xB7 ${plural2(p.requests, "request")} in ${plural2(p.tests, "test")}`
|
|
5970
6721
|
);
|
|
5971
6722
|
} else {
|
|
5972
6723
|
lines.push(` dependency ${p.name} \xB7 runs once, not measured`);
|
|
@@ -6007,7 +6758,7 @@ function formatCheckSummary(s, opts) {
|
|
|
6007
6758
|
lines.push("", `${paint2("Estimate:", "bold")} ${s.estimate}`, "");
|
|
6008
6759
|
const m = marks(frame.ascii);
|
|
6009
6760
|
lines.push(
|
|
6010
|
-
...s.toolErrors.length === 0 ? verdictBox(m.ok, "CHECKED",
|
|
6761
|
+
...s.toolErrors.length === 0 ? verdictBox(m.ok, "CHECKED", reason, "green", "badge-green", frame) : verdictBox(m.error, "ERROR", reason, "magenta", "badge-magenta", frame)
|
|
6011
6762
|
);
|
|
6012
6763
|
return `${lines.join("\n")}
|
|
6013
6764
|
`;
|
|
@@ -6039,7 +6790,15 @@ function formatStartBanner(input, opts) {
|
|
|
6039
6790
|
}
|
|
6040
6791
|
if (input.estimate !== null) rows.push(["Estimate", input.estimate]);
|
|
6041
6792
|
rows.push(["Report", input.report ?? "no files are written"]);
|
|
6042
|
-
|
|
6793
|
+
const split = "split it across machines with --shard (docs/ci.md)";
|
|
6794
|
+
if (input.tip) {
|
|
6795
|
+
rows.push([
|
|
6796
|
+
"Tip",
|
|
6797
|
+
`measure a subset, e.g. --grep @perf${input.long === true ? `, or ${split}` : ""}`
|
|
6798
|
+
]);
|
|
6799
|
+
} else if (input.long === true) {
|
|
6800
|
+
rows.push(["Tip", split]);
|
|
6801
|
+
}
|
|
6043
6802
|
const icon2 = opts.ascii ? "" : "\u23F3 ";
|
|
6044
6803
|
const lines = table(
|
|
6045
6804
|
[
|
|
@@ -6051,7 +6810,7 @@ function formatStartBanner(input, opts) {
|
|
|
6051
6810
|
...opts,
|
|
6052
6811
|
border: "cyan",
|
|
6053
6812
|
header: false,
|
|
6054
|
-
title: `${icon2}${input.packageName} \xB7 ${TITLES[input.mode]}`
|
|
6813
|
+
title: `${icon2}${input.packageName} \xB7 ${TITLES[input.mode]}${input.shard === void 0 || input.shard === null ? "" : ` \xB7 shard ${String(input.shard.current)}/${String(input.shard.total)}`}`
|
|
6055
6814
|
}
|
|
6056
6815
|
);
|
|
6057
6816
|
return `${lines.join("\n")}
|
|
@@ -6075,9 +6834,9 @@ function markerStyle(marker) {
|
|
|
6075
6834
|
}
|
|
6076
6835
|
function fileLines(diff, path, opts, paint2) {
|
|
6077
6836
|
const lines = [`Thresholds: ${path} (${fileStatusText(diff)})`];
|
|
6078
|
-
const listed = diff.keys.filter((k) =>
|
|
6837
|
+
const listed = diff.keys.filter((k) => chunkVXGTC6DB_cjs.LISTED_CATEGORIES.has(k.category));
|
|
6079
6838
|
const expired = diff.keys.filter((k) => k.muted?.expired === true);
|
|
6080
|
-
if (diff.fileStatus !== "unchanged") lines.push(` ${
|
|
6839
|
+
if (diff.fileStatus !== "unchanged") lines.push(` ${chunkVXGTC6DB_cjs.diffCountsText(diff)}`);
|
|
6081
6840
|
const tableOpts = { width: opts.width, color: opts.color, ascii: opts.ascii === true };
|
|
6082
6841
|
const shown = listed.slice(0, MAX_DIFF_ROWS);
|
|
6083
6842
|
if (shown.length > 0) {
|
|
@@ -6090,9 +6849,9 @@ function fileLines(diff, path, opts, paint2) {
|
|
|
6090
6849
|
{ header: "change" }
|
|
6091
6850
|
],
|
|
6092
6851
|
shown.map((k) => {
|
|
6093
|
-
const marker =
|
|
6852
|
+
const marker = chunkVXGTC6DB_cjs.diffMarker(k);
|
|
6094
6853
|
return {
|
|
6095
|
-
cells: [marker, k.key,
|
|
6854
|
+
cells: [marker, k.key, chunkVXGTC6DB_cjs.diffChangeText(k, diff.level, " ") + mutedSuffix(k)],
|
|
6096
6855
|
cellStyles: [markerStyle(marker)]
|
|
6097
6856
|
};
|
|
6098
6857
|
}),
|
|
@@ -6111,7 +6870,7 @@ function fileLines(diff, path, opts, paint2) {
|
|
|
6111
6870
|
...table(
|
|
6112
6871
|
[{ header: "skipped", flex: true, minWidth: MIN_KEY_WIDTH2 }, { header: "reason" }],
|
|
6113
6872
|
skippedShown.map((k) => ({
|
|
6114
|
-
cells: [k.key, k.samples === void 0 ? "" :
|
|
6873
|
+
cells: [k.key, k.samples === void 0 ? "" : chunkVXGTC6DB_cjs.skippedReasonText(k.samples)]
|
|
6115
6874
|
})),
|
|
6116
6875
|
tableOpts
|
|
6117
6876
|
)
|
|
@@ -6312,11 +7071,11 @@ function usageText(usage, failed, long = false, over) {
|
|
|
6312
7071
|
var METHODS = /* @__PURE__ */ new Set(["GET", "POST", "PUT", "PATCH", "DELETE"]);
|
|
6313
7072
|
var STEP_SEPARATOR2 = " \u203A ";
|
|
6314
7073
|
function endpointSource(key2) {
|
|
6315
|
-
return
|
|
7074
|
+
return chunkVXGTC6DB_cjs.isRequestKey(key2) ? "request" : "browser";
|
|
6316
7075
|
}
|
|
6317
7076
|
function splitEndpoint(key2) {
|
|
6318
|
-
const request =
|
|
6319
|
-
const text2 = request ? key2.slice(
|
|
7077
|
+
const request = chunkVXGTC6DB_cjs.isRequestKey(key2);
|
|
7078
|
+
const text2 = request ? key2.slice(chunkVXGTC6DB_cjs.REQUEST_KEY_PREFIX.length) : key2;
|
|
6320
7079
|
const space = text2.indexOf(" ");
|
|
6321
7080
|
if (space <= 0) return { method: "", origin: "", path: text2, request };
|
|
6322
7081
|
const method = text2.slice(0, space);
|
|
@@ -6410,7 +7169,8 @@ var RULE_ORDER4 = [
|
|
|
6410
7169
|
"p99",
|
|
6411
7170
|
"apdex",
|
|
6412
7171
|
"wilson",
|
|
6413
|
-
"errors"
|
|
7172
|
+
"errors",
|
|
7173
|
+
"nonSuccess"
|
|
6414
7174
|
];
|
|
6415
7175
|
function decidingCheck(checks) {
|
|
6416
7176
|
const failed = [...checks].filter((c) => !c.passed).sort((a, b) => RULE_ORDER4.indexOf(a.rule) - RULE_ORDER4.indexOf(b.rule));
|
|
@@ -6455,8 +7215,8 @@ function keyLink(ctx, kind2, key2, max = KEY_COLUMN_MAX, full = false) {
|
|
|
6455
7215
|
}
|
|
6456
7216
|
|
|
6457
7217
|
// src/html/generated/assets.ts
|
|
6458
|
-
var STYLES = ':root{--sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;--bg: #f6f7f9;--surface: #ffffff;--sunken: #f1f3f6;--hover: #f7f8fb;--line: #e4e7ec;--line-2: #d0d5dd;--fg: #101828;--fg-2: #475467;--fg-3: #5d6979;--accent: #4f46e5;--accent-2: #4338ca;--accent-soft: #eef0ff;--ok: #067647;--ok-soft: #e6f6ee;--ok-mark: #079455;--warn: #a14c05;--warn-soft: #fef4e4;--warn-mark: #d06306;--bad: #b42318;--bad-soft: #fef3f2;--bad-mark: #d92d20;--bad-solid: #b42318;--mute: #5d6979;--mute-soft: #eef0f3;--mute-mark: #7a8494;--get: #175cd3;--get-bg: #e9f1fe;--post: #067647;--post-bg: #e6f6ee;--put: #a14c05;--put-bg: #fef4e4;--patch: #6938ef;--patch-bg: #f1edfe;--del: #b42318;--del-bg: #fef3f2;--bar: #848ea0;--bar-hi: #5162e8;--on-hi: #ffffff;--track: #eceef2;--r-sm: 6px;--r: 8px;--r-lg: 12px;--sh-1: 0 1px 2px rgb(16 24 40 / 5%);--sh-2: 0 1px 2px rgb(16 24 40 / 4%), 0 4px 12px -2px rgb(16 24 40 / 6%);--sh-3: 0 24px 64px -12px rgb(16 24 40 / 30%), 0 0 0 1px var(--line);--focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);color-scheme:light}@media screen and (prefers-color-scheme:dark){:root{--bg: #0b0d12;--surface: #12151c;--sunken: #0e1117;--hover: #171b24;--line: #232836;--line-2: #323949;--fg: #e7e9ef;--fg-2: #a9b0bf;--fg-3: #8e97a8;--accent: #8b93ff;--accent-2: #a4abff;--accent-soft: #1d2040;--ok: #47cd89;--ok-soft: #0f2a1f;--ok-mark: #2fbf71;--warn: #fdb022;--warn-soft: #2e2210;--warn-mark: #f79009;--bad: #f97066;--bad-soft: #2d1214;--bad-mark: #f04438;--bad-solid: #d92d20;--mute: #98a2b3;--mute-soft: #1c212b;--mute-mark: #667085;--get: #84adff;--get-bg: #14223f;--post: #47cd89;--post-bg: #0f2a1f;--put: #fdb022;--put-bg: #2e2210;--patch: #bdb4fe;--patch-bg: #231b45;--del: #f97066;--del-bg: #2d1214;--bar: #6b7589;--bar-hi: #8b93ff;--on-hi: #0b0d12;--track: #1f2430;--sh-1: 0 1px 2px rgb(0 0 0 / 40%);--sh-2: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px -8px rgb(0 0 0 / 50%);--sh-3: 0 24px 64px -12px rgb(0 0 0 / 70%), 0 0 0 1px var(--line);color-scheme:dark}}*,*:before,*:after{box-sizing:border-box}[hidden]{display:none!important}html{-webkit-text-size-adjust:100%;background:var(--bg)}html.modal-open{overflow:hidden}body{margin:0;background:var(--bg);color:var(--fg);font:14px/1.5 var(--sans);-webkit-font-smoothing:antialiased}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}:focus-visible{outline:none;box-shadow:var(--focus);border-radius:var(--r-sm)}h1,h2,h3,h4,p,figure{margin:0}code,.mono{font-family:var(--mono);font-size:.92em}.num{text-align:right;font-variant-numeric:tabular-nums}.sub{color:var(--fg-3)}.sr,.js .js-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.i{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;vertical-align:-3px}.sprite{position:absolute;width:0;height:0;overflow:hidden}.skip{position:absolute;left:-999px}.skip:focus{left:16px;top:8px;z-index:50;background:var(--surface);padding:8px 12px}.wrap{max-width:1280px;margin:0 auto;padding:0 24px}.appbar{background:var(--surface);border-bottom:1px solid var(--line)}.appbar .wrap{display:flex;align-items:center;gap:16px;min-height:56px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}.brand{display:flex;align-items:center;gap:8px;font-weight:600;white-space:nowrap}.brand b{font-weight:600}.brand .ver{font:500 12px var(--mono);color:var(--fg-3)}.logo{width:24px;height:24px}.logo circle{fill:var(--accent)}.logo path{fill:none;stroke-width:2;stroke-linecap:round}.logo .crown{stroke:var(--accent)}.logo .bars{stroke:var(--on-hi)}.meta{position:relative;display:flex;gap:8px;flex-wrap:wrap;flex:1;min-width:0}.chip{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 8px;border:1px solid var(--line);border-radius:var(--r-sm);font-size:12px;color:var(--fg-2);background:var(--surface);white-space:nowrap}.chip b{font-weight:500;color:var(--fg)}.chip .i{width:14px;height:14px;vertical-align:0;color:var(--fg-3)}.btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);color:var(--fg);font:500 13px var(--sans);cursor:pointer;box-shadow:var(--sh-1);white-space:nowrap}.btn:hover{background:var(--hover);text-decoration:none}.btn:disabled{cursor:default;opacity:.45}.btn.icon{width:32px;padding:0;justify-content:center}.btn.sm{height:28px;font-size:12px;padding:0 10px}.btn.icon.sm{width:28px;padding:0}main.wrap{padding-top:24px;padding-bottom:48px}.hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;padding:24px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-2);position:relative;overflow:hidden}.hero:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:var(--tone)}.hero:after{content:"";position:absolute;left:0;top:0;width:480px;height:100%;background:radial-gradient(400px 160px at 0 0,var(--tone-soft),transparent);pointer-events:none}.hero>*{position:relative;z-index:1}.t-bad{--tone: var(--bad-mark);--tone-soft: var(--bad-soft);--tone-fg: var(--bad)}.t-ok{--tone: var(--ok-mark);--tone-soft: var(--ok-soft);--tone-fg: var(--ok)}.t-warn{--tone: var(--warn-mark);--tone-soft: var(--warn-soft);--tone-fg: var(--warn)}.t-err{--tone: var(--fg-2);--tone-soft: var(--mute-soft);--tone-fg: var(--fg)}.verdict{display:flex;gap:16px;align-items:flex-start}.v-ic{width:48px;height:48px;border-radius:var(--r-lg);display:grid;place-items:center;background:var(--tone-soft);color:var(--tone-fg);flex:none}.v-ic .i{width:26px;height:26px;stroke-width:2}.eyebrow{font-size:12px;font-weight:500;color:var(--fg-3)}.status{font-size:28px;line-height:36px;font-weight:700;color:var(--tone-fg)}.status .pill{vertical-align:6px;margin-left:8px}.summary{font-size:15px;margin-top:4px;max-width:70ch;overflow-wrap:anywhere}.summary .sub{font-size:13px;display:block;margin-top:4px}.hero .note,.hero>div>div>.sub{margin-top:8px}.subst{display:grid;gap:8px;align-content:center;min-width:280px;margin:0;padding-left:24px;border-left:1px solid var(--line)}.ss{display:grid;grid-template-columns:96px minmax(0,1fr);align-items:baseline;gap:8px;font-size:13px}.ss dt{color:var(--fg-3)}.ss dd{margin:0;font-weight:600}.ss dd .sub{font-weight:400}.dot{width:8px;height:8px;border-radius:50%;background:var(--mute-mark);display:inline-block;margin-right:8px}.d-ok{background:var(--ok-mark)}.d-bad{background:var(--bad-mark)}.d-warn{background:var(--warn-mark)}.kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));margin:16px 0 0;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-1)}.kpi{padding:16px 20px;border-left:1px solid var(--line);display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;align-items:end}.kpi:first-child{border-left:0}.kpi dt{font-size:12px;color:var(--fg-3);font-weight:500;grid-column:1 / -1}.kpi dd{margin:0}.kv{font-size:24px;line-height:32px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}.kv small{font-size:13px;font-weight:500;color:var(--fg-3);margin-left:2px}.kpi .viz{grid-row:2;grid-column:2;align-self:center}.kpi .ks{grid-column:1 / -1;font-size:12px;color:var(--fg-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kpi.bad .kv{color:var(--bad)}.ring{width:32px;height:32px;transform:rotate(-90deg)}.ring circle{fill:none;stroke-width:4}.ring .tr{stroke:var(--track)}.ring .vl{stroke:var(--warn-mark);stroke-linecap:round}.vsplit{display:flex;width:56px;height:6px;border-radius:3px;overflow:hidden;background:var(--track);gap:2px}.vsplit>span{height:100%}.s-bad{background:var(--bad-mark)}.s-mute{background:var(--mute-mark)}.s-warn{background:var(--warn-mark)}.s-acc{background:var(--bar-hi)}.s-neu{background:var(--bar)}.s-trk{background:var(--track);box-shadow:inset 0 0 0 1px var(--line-2)}.pips{display:flex;gap:3px}.pips span{width:6px;height:14px;border-radius:2px;background:var(--bar-hi)}.pips .off{background:var(--mute-mark)}.tabs{position:sticky;top:0;z-index:20;margin:24px -24px 0;padding:4px 24px 0;background:color-mix(in srgb,var(--bg) 85%,transparent);backdrop-filter:blur(8px)}.seg{position:relative;display:flex;gap:4px;box-shadow:inset 0 -1px 0 var(--line-2);overflow-x:auto;scrollbar-width:none}.seg a{display:inline-flex;flex:none;align-items:center;gap:8px;min-height:44px;padding:3px 16px 0;border-bottom:3px solid transparent;border-radius:var(--r-sm) var(--r-sm) 0 0;color:var(--fg-2);font-size:14px;font-weight:600;white-space:nowrap}.seg a:hover{color:var(--fg);background:var(--hover);border-bottom-color:var(--line-2);text-decoration:none}.seg a:focus-visible{border-radius:var(--r-sm) var(--r-sm) 0 0;box-shadow:inset 0 0 0 2px var(--accent)}.seg a[aria-selected=true]{color:var(--accent);background:var(--accent-soft);border-bottom-color:var(--accent)}.n{font:600 11px/18px var(--sans);min-width:20px;padding:0 6px;border-radius:9px;background:var(--line);color:var(--fg-2);text-align:center;font-variant-numeric:tabular-nums;display:inline-block}.n.bad{background:var(--bad-soft);color:var(--bad)}.n.warn{background:var(--warn-soft);color:var(--warn)}.panel{margin-top:8px}.js .panel[hidden]{display:none}.ph{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;margin:24px 0 12px;flex-wrap:wrap}.panel>.ph:first-child{margin-top:8px}.ph h2{font-size:18px;font-weight:600}.ph h3{font-size:16px;font-weight:600;display:flex;align-items:center;gap:8px}.ph p{color:var(--fg-3);font-size:13px}.ph .more{font-size:13px;font-weight:500}.status-msg:empty{display:none}.status-msg{margin-top:12px;padding:8px 12px;border-radius:var(--r);background:var(--accent-soft)}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-1)}.card-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:14px 16px 0}.card-h h4{font-size:13px;font-weight:600}.card-h .sub{font-size:12px}.card-p{padding:14px 16px 0;font-size:13px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.pill{display:inline-flex;align-items:center;gap:4px;height:20px;padding:0 8px;border-radius:10px;font-size:11.5px;font-weight:600;white-space:nowrap;background:var(--mute-soft);color:var(--mute);line-height:1}.pill.fb{background:var(--bad-solid);color:#fff}.pill.f{background:var(--bad-soft);color:var(--bad);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--bad) 30%,transparent)}.pill.p{background:var(--ok-soft);color:var(--ok)}.pill.ne{background:none;box-shadow:inset 0 0 0 1px var(--line-2);color:var(--fg-2)}.pill.w{background:var(--warn-soft);color:var(--warn)}.pill.e{background:var(--fg);color:var(--bg)}.pill .i{width:12px;height:12px;vertical-align:0;stroke-width:2}.src{display:inline-block;font:500 11px/18px var(--mono);padding:0 6px;border-radius:4px;color:var(--fg-3);background:var(--sunken);box-shadow:inset 0 0 0 1px var(--line)}.es{font:500 11px var(--mono);color:var(--fg-3)}.kind{display:inline-block;font:500 11px/18px var(--sans);padding:0 6px;border-radius:4px;color:var(--fg-2);background:var(--sunken)}.m{display:inline-block;width:52px;text-align:center;font:700 10.5px/20px var(--mono);border-radius:4px;flex:none;color:var(--fg-2);background:var(--sunken)}.GET{color:var(--get);background:var(--get-bg)}.POST{color:var(--post);background:var(--post-bg)}.PUT{color:var(--put);background:var(--put-bg)}.PATCH{color:var(--patch);background:var(--patch-bg)}.DELETE{color:var(--del);background:var(--del-bg)}.key{font-family:var(--mono);font-size:12.5px;color:var(--fg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.key i{font-style:normal;color:var(--accent)}.key .o{font:500 10.5px/16px var(--sans);padding:0 5px;margin-right:6px;border-radius:4px;background:var(--sunken);color:var(--fg-3);box-shadow:inset 0 0 0 1px var(--line)}.rq{font:500 10.5px/16px var(--sans);padding:0 5px;border-radius:4px;color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);white-space:nowrap}.key s{text-decoration:none;color:var(--fg-3)}.key b{font-weight:600}.kl{display:flex;align-items:center;gap:8px;min-width:0;color:inherit}a.kl:hover{text-decoration:none}a.kl:hover .key{color:var(--accent);text-decoration:underline;text-underline-offset:3px}.key.st{font-family:var(--sans);font-size:13px}meter{appearance:none;width:64px;height:6px;border-radius:3px;vertical-align:middle;background:var(--track);border:0}meter::-webkit-meter-bar{background:linear-gradient(90deg,transparent calc(80% - 1px),var(--fg-3) calc(80% - 1px),var(--fg-3) 80%,transparent 80%),var(--track);border:0;border-radius:3px;height:6px}meter::-webkit-meter-optimum-value{background:var(--ok-mark);border-radius:3px}meter::-webkit-meter-suboptimum-value{background:var(--warn-mark);border-radius:3px}meter::-webkit-meter-even-less-good-value{background:var(--bad-mark);border-radius:3px}meter::-moz-meter-bar{background:var(--ok-mark);border-radius:3px}meter:-moz-meter-sub-optimum::-moz-meter-bar{background:var(--warn-mark)}meter:-moz-meter-sub-sub-optimum::-moz-meter-bar{background:var(--bad-mark)}.hr{display:inline-flex;align-items:center;gap:8px;font-variant-numeric:tabular-nums;font-size:12.5px;white-space:nowrap}.hr b{font-weight:500;min-width:40px;text-align:right}.hr .ov{color:var(--bad);font-weight:600}.hr .nr{color:var(--warn)}.vlist{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:12px}.vio{position:relative;padding:14px 16px 14px 20px;display:grid;gap:8px;overflow:hidden;align-content:start}.vio:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--bad-mark)}.vio.mu:before{background:var(--mute-mark)}.vio .top{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.vio .top .src{margin-left:auto}.rule{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--fg-2);font-variant-numeric:tabular-nums;flex-wrap:wrap}.rule b{color:var(--fg);font-weight:600}.rule meter{width:96px}.hint{display:flex;gap:8px;font-size:13px;color:var(--fg-2);line-height:1.45}.hint .i{color:var(--warn);margin-top:1px}.toggle{display:inline-flex;padding:2px;border:1px solid var(--line);border-radius:var(--r);background:var(--sunken)}.toggle button{border:0;background:none;font:500 12px var(--sans);color:var(--fg-2);height:24px;padding:0 10px;border-radius:6px;cursor:pointer}.toggle button[aria-pressed=true]{background:var(--surface);color:var(--fg);box-shadow:var(--sh-1),0 0 0 1px var(--line)}.rank{list-style:none;margin:0;padding:8px 8px 12px;counter-reset:r}.rank li{counter-increment:r;display:grid;grid-template-columns:16px minmax(0,1fr) auto;column-gap:8px;row-gap:6px;align-items:center;padding:8px;border-radius:var(--r-sm)}.rank li:hover{background:var(--hover)}.rank li:before{content:counter(r);font-size:11px;color:var(--fg-3);font-variant-numeric:tabular-nums;grid-row:1}.rank .kl{grid-column:2 / -1;gap:6px}.rank .m{width:auto;padding:0 4px;font-size:9.5px;line-height:16px}.rank .key{font-size:12px}.rank .tb{grid-column:2;grid-row:2}.rank .v{grid-column:3;grid-row:2;min-width:64px;text-align:right;font-size:12px;font-variant-numeric:tabular-nums;color:var(--fg-2);white-space:nowrap}.rank .v b{color:var(--fg);font-weight:600}.tb{display:block;height:4px;border-radius:2px;background:var(--track);overflow:hidden}.tb>span{display:block;height:100%;border-radius:2px;background:var(--bar-hi)}.tb.bad>span{background:var(--bad-mark)}.tb.warn>span{background:var(--warn-mark)}.tb.neu>span{background:var(--bar)}.tw{width:72px}.w-0{width:0}.w-5{width:5%}.w-10{width:10%}.w-15{width:15%}.w-20{width:20%}.w-25{width:25%}.w-30{width:30%}.w-35{width:35%}.w-40{width:40%}.w-45{width:45%}.w-50{width:50%}.w-55{width:55%}.w-60{width:60%}.w-65{width:65%}.w-70{width:70%}.w-75{width:75%}.w-80{width:80%}.w-85{width:85%}.w-90{width:90%}.w-95{width:95%}.w-100{width:100%}.tl{list-style:none;margin:0;padding:8px}.tl li{display:grid;grid-template-columns:minmax(0,1fr) 88px 72px;gap:12px;align-items:center;padding:8px;border-radius:var(--r-sm);font-size:13px}.tl.two li{grid-template-columns:minmax(0,1fr) auto}.tl li:hover{background:var(--hover)}.tt{min-width:0}.tt>span,.tt>.kl{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tt>.kl{display:flex}.tt .sub{font:12px var(--mono);margin-top:2px}.tl .num{font-weight:600;display:flex;flex-direction:column;align-items:flex-end;gap:2px}.tl .num .sub{font-weight:400;font-size:12px}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px;border-bottom:1px solid var(--line)}.search{display:flex;align-items:center;gap:8px;height:32px;padding:0 10px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);color:var(--fg-3);width:260px;max-width:100%}.search input{border:0;outline:0;background:none;font:13px var(--sans);color:var(--fg);width:100%}.search:focus-within{box-shadow:var(--focus)}.fg{display:inline-flex;gap:4px;align-items:center;flex-wrap:wrap;padding-left:8px;border-left:1px solid var(--line)}.fg>span{font-size:12px;color:var(--fg-3);margin-right:4px}.flt{height:28px;padding:0 10px;border:1px dashed var(--line-2);border-radius:14px;background:none;color:var(--fg-2);font:500 12px var(--sans);cursor:pointer;display:inline-flex;align-items:center;gap:6px}.flt[aria-pressed=true]{border-style:solid;border-color:var(--accent);background:var(--accent-soft);color:var(--accent-2)}.count{margin-left:auto;font-size:12px;color:var(--fg-3);font-variant-numeric:tabular-nums}.scroll{overflow-x:auto}table{border-collapse:separate;border-spacing:0;width:100%;font-size:13px}caption{text-align:left;padding:0;height:0;overflow:hidden}th{font-size:12px;font-weight:500;color:var(--fg-3);text-align:left;padding:8px 12px;border-bottom:1px solid var(--line);white-space:nowrap;background:var(--sunken)}th.num{text-align:right}th button{all:unset;cursor:pointer;display:inline-flex;gap:4px;align-items:center}th button:hover{color:var(--fg)}th button:focus-visible{box-shadow:var(--focus);border-radius:4px}th[aria-sort=descending] button:after{content:"\u2193";font-size:11px;color:var(--accent)}th[aria-sort=ascending] button:after{content:"\u2191";font-size:11px;color:var(--accent)}td,tbody th{padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap;vertical-align:middle;background:var(--surface);color:var(--fg);font-size:13px;font-weight:400}tbody:last-child tr:last-child>*,tbody:last-child tr.drow:last-child>*{border-bottom:0}.keys>tbody>tr:first-child,.tests tbody tr{transition:background .12s}.js .keys>tbody>tr:first-child:hover>*,.tests tbody tr:hover>*{background:var(--hover)}.js .keys>tbody>tr:first-child{cursor:pointer}.keys>tbody>tr.sel>*{background:var(--accent-soft)}th.k{max-width:440px;padding-left:16px;display:table-cell}th.k:before{content:"";display:inline-block;vertical-align:middle;width:6px;height:6px;border-radius:50%;margin-right:10px;background:var(--ok-mark)}th.k .kl{display:inline-flex;vertical-align:middle;width:max-content;max-width:360px}th.k .key{white-space:normal;overflow-wrap:anywhere}tr.blocking th.k:before,tr.violation th.k:before{background:var(--bad-mark)}tr.muted th.k:before{background:var(--mute-mark)}tr.not-evaluated th.k:before{background:none;box-shadow:inset 0 0 0 1.5px var(--mute-mark)}tr.blocking th.k{box-shadow:inset 3px 0 0 var(--bad-mark)}td.r>*+*{margin-left:6px}td.r .why,td.num .why{display:block;margin:4px 0 0;color:var(--fg-3);font-size:12px}td .lim{color:var(--fg-3);font-size:12px;font-weight:400}td.ov{color:var(--bad);font-weight:600}td.e{color:var(--bad);font-weight:500}td.z{color:var(--fg-3)}td.loc{font:12px var(--mono);color:var(--fg-3)}.tfoot{padding:10px 16px;font-size:12px;color:var(--fg-3);border-top:1px solid var(--line)}.dep{display:inline-block;position:relative;width:16px;height:4px;margin-right:8px;vertical-align:2px;background:radial-gradient(circle,var(--line-2) 2px,transparent 2px) 0 0 / 6px 4px repeat-x}.dep:before{content:"";position:absolute;inset:0 auto 0 0;background:radial-gradient(circle,var(--fg-3) 2px,transparent 2px) 0 0 / 6px 4px repeat-x}.d1:before{width:4px}.d2:before{width:10px}.d3:before{width:16px}.tests th.tc{max-width:360px}.tc>span{display:block;overflow:hidden;text-overflow:ellipsis}.tc .tn{font-weight:500;color:var(--accent)}.tc .sub{font-size:12px;margin-top:2px}td.tk>*{display:flex;gap:6px;align-items:center}td.tk>*+*{margin-top:4px}td.tk2>*{flex-direction:column;align-items:flex-start;gap:0}.tk .kl{display:inline-flex}.tk .m{width:auto;padding:0 4px;font-size:9.5px;line-height:16px}.drow>td{white-space:normal;background:var(--bg)}.js .drow{display:none}.drow summary{cursor:pointer;color:var(--accent);font-weight:500}.kd{padding:0 4px 12px;max-width:920px}.kh{padding-top:12px}.fk{display:block;word-break:break-all;font-size:14px;font-weight:600}.fk .key{white-space:normal;overflow:visible;font-size:inherit}.pills{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap;align-items:center}.ds{padding-top:20px}.ds>h4{font-size:12px;font-weight:600;color:var(--fg-2);margin-bottom:10px;display:flex;justify-content:space-between;gap:8px;align-items:baseline}.ds>h4 .sub{font-weight:400}.hints{list-style:none;display:grid;gap:8px;margin:20px 0 0;padding:12px 14px;border-radius:var(--r);background:var(--warn-soft);border:1px solid color-mix(in srgb,var(--warn-mark) 30%,transparent)}.hints li{display:flex;gap:8px;font-size:13px}.hints .i{color:var(--warn);margin-top:1px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);border-radius:var(--r);margin:0;background:var(--surface)}.stats div{padding:10px 12px;border-left:1px solid var(--line)}.stats div:first-child{border-left:0}.stats dt{font-size:11px;color:var(--fg-3)}.stats dd{margin:0;font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.stats dd small{font-size:11px;color:var(--fg-3);font-weight:400}.stats .ov dd{color:var(--bad)}.ct{border:1px solid var(--line);border-radius:var(--r);overflow:hidden;overflow-x:auto}.ct td,.ct th{padding:8px 10px}.ct thead th{background:none}.ck td{text-align:right;font-variant-numeric:tabular-nums}.ck td:nth-last-child(-n+2){text-align:left}.ck td.ov{color:var(--bad);font-weight:600}.legend{display:flex;gap:8px 16px;font-size:12px;color:var(--fg-3);margin-top:8px;flex-wrap:wrap}.legend span{display:inline-flex;align-items:center;gap:6px}.legend i{width:10px;height:10px;border-radius:2px;display:inline-block}.legend .lg-lim{border-top:2px dashed var(--bad-mark);height:0;border-radius:0}.stc{display:flex;gap:6px;flex-wrap:wrap}.stc span{font:12px var(--mono);padding:2px 8px;border-radius:var(--r-sm);background:var(--sunken);box-shadow:inset 0 0 0 1px var(--line)}.stc b{font-weight:600}.stc .e{color:var(--bad)}.facts{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:10px;font-size:12.5px;color:var(--fg-2)}.samples{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}.samples li{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;padding:10px 12px;border-top:1px solid var(--line);font-size:13px}.samples li:first-child{border-top:0}.samples b{font-variant-numeric:tabular-nums}.samples .sub{font-family:var(--sans)}.samples .url{font:12px var(--mono);color:var(--fg-2);white-space:normal;overflow-wrap:anywhere}.ds .tl{padding:0;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}.kdlg{width:min(960px,calc(100vw - 32px));max-width:none;max-height:calc(100vh - 48px);padding:0;border:0;border-radius:var(--r-lg);background:var(--surface);color:var(--fg);box-shadow:var(--sh-3);overflow-y:auto;overscroll-behavior:contain}.kdlg::backdrop{background:#1018287f}@media(prefers-reduced-motion:no-preference){.kdlg[open]{animation:pop .12s ease-out}}@keyframes pop{0%{opacity:0;transform:translateY(8px)}}.dh{position:sticky;top:0;z-index:2;background:var(--surface);border-bottom:1px solid var(--line);padding:16px 20px 14px}.dh .nav{display:flex;gap:4px;align-items:center;margin-bottom:10px}.dh .nav .sub{font-size:12px;margin-right:auto}#dlg-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}#dlg-title:focus-visible{box-shadow:none}.dh .kh{padding-top:0}.db{padding:0 20px 8px}.db .kd{padding:0;max-width:none}.dfoot{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px 20px 20px}.copy-out input{font:12px var(--mono);width:min(520px,70vw);margin-left:8px}svg.ch,svg.split,svg.bar{display:block;width:100%;height:auto}svg.hist,svg.bar{max-width:720px}.ch text,svg.bar text{font:10.5px var(--sans);fill:var(--fg-3);font-variant-numeric:tabular-nums}.as{text-anchor:start}.am{text-anchor:middle}.ae{text-anchor:end}.hist .gr,.wf .wg{stroke:var(--line);stroke-width:1;stroke-dasharray:2 3;fill:none}.hist .ha{stroke:var(--line-2)}.hist .bars{fill:var(--bar)}.hist .bars-hi{fill:var(--bad-mark)}.hist .hm{stroke:var(--fg-2);stroke-width:1.25}.hist .hl{stroke:var(--bad-mark);stroke-width:1.5;stroke-dasharray:4 3}.hist text{fill:var(--fg-2);font-weight:600}.hist .ht text{fill:var(--fg-3);font-weight:400}.split .st{fill:var(--bar-hi)}.split .so{fill:var(--track);stroke:var(--line-2)}.bar-axis{stroke:var(--line-2)}.bar-range{fill:var(--bar)}.bar-mark{stroke:var(--fg-2);stroke-width:1.5}.bar-limit{stroke:var(--bad-mark);stroke-dasharray:4 3}svg.bar .bar-limit-text{fill:var(--bad)}.wl{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.wf-h{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;padding:16px;border-bottom:1px solid var(--line);flex-wrap:wrap}.wf-h h4{font-size:14px;font-weight:600;overflow-wrap:anywhere}.wf-h .sub{font-size:12px;margin-top:2px}.wf-h dl{display:flex;gap:24px;margin:0}.wf-h dt{font-size:11px;color:var(--fg-3)}.wf-h dd{margin:0;font-weight:600;font-variant-numeric:tabular-nums}.wfs{padding:8px 16px 16px}.wfs svg{min-width:720px}.wf .sep{stroke:var(--line)}.wf use{font:10.5px var(--mono);fill:var(--fg-2)}.wkm{font-weight:700}.wkm.mGET{fill:var(--get)}.wkm.mPOST{fill:var(--post)}.wkm.mPUT{fill:var(--put)}.wkm.mPATCH{fill:var(--patch)}.wkm.mDELETE{fill:var(--del)}.wkp{fill:var(--accent)}.wf g rect{fill:var(--bar-hi)}.wf .we rect,.wf .we path{fill:var(--bad-mark)}.wf .ww rect{fill:var(--warn-mark)}.wf .wm rect{fill:var(--mute-mark)}.wf g path{fill:var(--bad-mark);stroke:var(--surface);stroke-width:1.5}.wf .d{font-size:10px}.wf g:hover use,.wf g:hover text{fill:var(--fg)}.wf g:hover rect{opacity:.85}.sh{font-size:13px;font-weight:600;color:var(--fg-2);margin:8px 0 0}.wn{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:4px 12px;padding:16px}.wn .wi{width:32px;height:32px;border-radius:var(--r);display:grid;place-items:center;background:var(--warn-soft);color:var(--warn);grid-row:1 / 4}.wn.err .wi{background:var(--bad-soft);color:var(--bad)}.wn code{font:600 12.5px var(--mono);align-self:center;overflow-wrap:anywhere}.wn p{grid-column:2 / -1;font-size:13.5px;overflow-wrap:anywhere}.wn .hint .i{color:var(--accent)}.wn .n{align-self:start}.hl-err .wn{border-color:var(--bad-mark)}.kvl{display:grid;grid-template-columns:140px minmax(0,1fr);gap:8px 16px;margin:0;padding:16px;font-size:13px}.kvl dt{color:var(--fg-3)}.kvl dd{margin:0;min-width:0;overflow-wrap:anywhere}.plain{margin:4px 0 0;padding-left:16px}details.cfg summary{padding:14px 16px;cursor:pointer;font-weight:600;font-size:13px;list-style:none;display:flex;gap:8px;align-items:center}details.cfg summary::-webkit-details-marker{display:none}details.cfg summary:before{content:"";width:6px;height:6px;flex:none;border-right:1.5px solid var(--fg-3);border-bottom:1.5px solid var(--fg-3);transform:rotate(-45deg);transition:transform .15s}details.cfg[open] summary:before{transform:rotate(45deg)}details.cfg pre{margin:0;padding:16px;border-top:1px solid var(--line);font:12px/1.6 var(--mono);color:var(--fg-2);overflow-x:auto;background:var(--sunken);border-radius:0 0 var(--r-lg) var(--r-lg)}details.cfg .scroll{border-top:1px solid var(--line)}.empty{display:grid;justify-items:center;text-align:center;gap:8px;padding:40px 24px;color:var(--fg-2)}.empty .ei{width:44px;height:44px;border-radius:var(--r-lg);display:grid;place-items:center;background:var(--sunken);box-shadow:inset 0 0 0 1px var(--line);color:var(--fg-3)}.empty h3{font-size:15px;color:var(--fg)}.empty p{font-size:13px;max-width:56ch}.empty.sm{padding:20px 16px;gap:6px}.empty.sm .i{color:var(--ok-mark)}.note{display:flex;gap:10px;padding:12px 14px;border-radius:var(--r);background:var(--accent-soft);color:var(--fg);font-size:13px;align-items:flex-start}.note .i{color:var(--accent);margin-top:1px}.note code{background:var(--surface);padding:1px 5px;border-radius:4px}footer{padding:24px 0 40px;font-size:12px;color:var(--fg-3);border-top:1px solid var(--line)}@media(max-width:1100px){.grid4{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:1023px){.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.kpi:nth-child(4){border-left:0}.kpi:nth-child(n+4){border-top:1px solid var(--line)}.hero{grid-template-columns:minmax(0,1fr)}.subst{border-left:0;padding-left:0;border-top:1px solid var(--line);padding-top:16px;min-width:0}}@media(max-width:720px){.grid2,.vlist{grid-template-columns:minmax(0,1fr)}}@media(max-width:599px){.wrap{padding:0 16px}.tabs{margin:16px -16px 0;padding:4px 16px 0}.seg a{padding:3px 12px 0}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.kpi{padding:12px 14px}.kpi:nth-child(n){border-left:1px solid var(--line);border-top:1px solid var(--line)}.kpi:nth-child(odd){border-left:0}.kpi:nth-child(-n+2){border-top:0}.kv{font-size:20px;line-height:28px}.grid4{grid-template-columns:minmax(0,1fr)}.hero{padding:20px 16px}.status{font-size:24px;line-height:32px}.v-ic{width:40px;height:40px}.summary{font-size:14px}.ss{grid-template-columns:88px minmax(0,1fr)}.brand{flex:1;min-width:0;overflow:hidden}.brand b{overflow:hidden;text-overflow:ellipsis}.brand .ver{display:none}.meta{order:3;flex:0 0 100%;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.appbar .btn span{display:none}.appbar .btn{width:32px;padding:0;justify-content:center}.vio .rule meter{display:none}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stats div:nth-child(3){border-left:0}.stats div:nth-child(n+3){border-top:1px solid var(--line)}.tl li{grid-template-columns:minmax(0,1fr) 72px}.tl li>.num:last-child{display:none}.tl.two li>.num:last-child{display:flex}.fg{border-left:0;padding-left:0}.kvl{grid-template-columns:minmax(0,1fr);gap:2px}.kvl dd{margin-bottom:8px}.kdlg{width:100vw;max-width:100vw;height:100vh;max-height:100vh;margin:0;border-radius:0}.dh,.dfoot{padding-left:16px;padding-right:16px}.db{padding:0 16px 8px}}@media print{:root{--bg: #ffffff;--sh-1: none;--sh-2: none}.tabs,.toolbar,.btn,.toggle,.js-only,.kdlg,.skip,.status-msg,[data-none],th button:after{display:none!important}.js .panel[hidden]{display:block!important}.js .drow{display:table-row}.scroll,.ct{overflow:visible}tr,.card,.kpi,.wfb,svg{break-inside:avoid}details[data-v]::details-content{content-visibility:visible;display:block}}';
|
|
6459
|
-
var STYLES_SHA256 = "
|
|
7218
|
+
var STYLES = ':root{--sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;--bg: #f6f7f9;--surface: #ffffff;--sunken: #f1f3f6;--hover: #f7f8fb;--line: #e4e7ec;--line-2: #d0d5dd;--fg: #101828;--fg-2: #475467;--fg-3: #5d6979;--accent: #4f46e5;--accent-2: #4338ca;--accent-soft: #eef0ff;--ok: #067647;--ok-soft: #e6f6ee;--ok-mark: #079455;--warn: #a14c05;--warn-soft: #fef4e4;--warn-mark: #d06306;--bad: #b42318;--bad-soft: #fef3f2;--bad-mark: #d92d20;--bad-solid: #b42318;--mute: #5d6979;--mute-soft: #eef0f3;--mute-mark: #7a8494;--get: #175cd3;--get-bg: #e9f1fe;--post: #067647;--post-bg: #e6f6ee;--put: #a14c05;--put-bg: #fef4e4;--patch: #6938ef;--patch-bg: #f1edfe;--del: #b42318;--del-bg: #fef3f2;--bar: #848ea0;--bar-hi: #5162e8;--on-hi: #ffffff;--track: #eceef2;--r-sm: 6px;--r: 8px;--r-lg: 12px;--sh-1: 0 1px 2px rgb(16 24 40 / 5%);--sh-2: 0 1px 2px rgb(16 24 40 / 4%), 0 4px 12px -2px rgb(16 24 40 / 6%);--sh-3: 0 24px 64px -12px rgb(16 24 40 / 30%), 0 0 0 1px var(--line);--focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);color-scheme:light}@media screen and (prefers-color-scheme:dark){:root{--bg: #0b0d12;--surface: #12151c;--sunken: #0e1117;--hover: #171b24;--line: #232836;--line-2: #323949;--fg: #e7e9ef;--fg-2: #a9b0bf;--fg-3: #8e97a8;--accent: #8b93ff;--accent-2: #a4abff;--accent-soft: #1d2040;--ok: #47cd89;--ok-soft: #0f2a1f;--ok-mark: #2fbf71;--warn: #fdb022;--warn-soft: #2e2210;--warn-mark: #f79009;--bad: #f97066;--bad-soft: #2d1214;--bad-mark: #f04438;--bad-solid: #d92d20;--mute: #98a2b3;--mute-soft: #1c212b;--mute-mark: #667085;--get: #84adff;--get-bg: #14223f;--post: #47cd89;--post-bg: #0f2a1f;--put: #fdb022;--put-bg: #2e2210;--patch: #bdb4fe;--patch-bg: #231b45;--del: #f97066;--del-bg: #2d1214;--bar: #6b7589;--bar-hi: #8b93ff;--on-hi: #0b0d12;--track: #1f2430;--sh-1: 0 1px 2px rgb(0 0 0 / 40%);--sh-2: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px -8px rgb(0 0 0 / 50%);--sh-3: 0 24px 64px -12px rgb(0 0 0 / 70%), 0 0 0 1px var(--line);color-scheme:dark}}*,*:before,*:after{box-sizing:border-box}[hidden]{display:none!important}html{-webkit-text-size-adjust:100%;background:var(--bg)}html.modal-open{overflow:hidden}body{margin:0;background:var(--bg);color:var(--fg);font:14px/1.5 var(--sans);-webkit-font-smoothing:antialiased}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}:focus-visible{outline:none;box-shadow:var(--focus);border-radius:var(--r-sm)}h1,h2,h3,h4,p,figure{margin:0}code,.mono{font-family:var(--mono);font-size:.92em}.num{text-align:right;font-variant-numeric:tabular-nums}.sub{color:var(--fg-3)}.sr,.js .js-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.i{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;vertical-align:-3px}.sprite{position:absolute;width:0;height:0;overflow:hidden}.skip{position:absolute;left:-999px}.skip:focus{left:16px;top:8px;z-index:50;background:var(--surface);padding:8px 12px}.wrap{max-width:1280px;margin:0 auto;padding:0 24px}.appbar{background:var(--surface);border-bottom:1px solid var(--line)}.appbar .wrap{display:flex;align-items:center;gap:16px;min-height:56px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}.brand{display:flex;align-items:center;gap:8px;font-weight:600;white-space:nowrap}.brand b{font-weight:600}.brand .ver{font:500 12px var(--mono);color:var(--fg-3)}.logo{width:24px;height:24px}.logo circle{fill:var(--accent)}.logo path{fill:none;stroke-width:2;stroke-linecap:round}.logo .crown{stroke:var(--accent)}.logo .bars{stroke:var(--on-hi)}.meta{position:relative;display:flex;gap:8px;flex-wrap:wrap;flex:1;min-width:0}.chip{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 8px;border:1px solid var(--line);border-radius:var(--r-sm);font-size:12px;color:var(--fg-2);background:var(--surface);white-space:nowrap}.chip b{font-weight:500;color:var(--fg)}.chip .i{width:14px;height:14px;vertical-align:0;color:var(--fg-3)}.chip.warn,.chip.warn b,.chip.warn .i{color:var(--warn)}.chip.warn{border-color:var(--warn-mark);background:var(--warn-soft)}.btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);color:var(--fg);font:500 13px var(--sans);cursor:pointer;box-shadow:var(--sh-1);white-space:nowrap}.btn:hover{background:var(--hover);text-decoration:none}.btn:disabled{cursor:default;opacity:.45}.btn.icon{width:32px;padding:0;justify-content:center}.btn.sm{height:28px;font-size:12px;padding:0 10px}.btn.icon.sm{width:28px;padding:0}main.wrap{padding-top:24px;padding-bottom:48px}.hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;padding:24px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-2);position:relative;overflow:hidden}.hero:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:var(--tone)}.hero:after{content:"";position:absolute;left:0;top:0;width:480px;height:100%;background:radial-gradient(400px 160px at 0 0,var(--tone-soft),transparent);pointer-events:none}.hero>*{position:relative;z-index:1}.t-bad{--tone: var(--bad-mark);--tone-soft: var(--bad-soft);--tone-fg: var(--bad)}.t-ok{--tone: var(--ok-mark);--tone-soft: var(--ok-soft);--tone-fg: var(--ok)}.t-warn{--tone: var(--warn-mark);--tone-soft: var(--warn-soft);--tone-fg: var(--warn)}.t-err{--tone: var(--fg-2);--tone-soft: var(--mute-soft);--tone-fg: var(--fg)}.verdict{display:flex;gap:16px;align-items:flex-start}.v-ic{width:48px;height:48px;border-radius:var(--r-lg);display:grid;place-items:center;background:var(--tone-soft);color:var(--tone-fg);flex:none}.v-ic .i{width:26px;height:26px;stroke-width:2}.eyebrow{font-size:12px;font-weight:500;color:var(--fg-3)}.status{font-size:28px;line-height:36px;font-weight:700;color:var(--tone-fg)}.status .pill{vertical-align:6px;margin-left:8px}.summary{font-size:15px;margin-top:4px;max-width:70ch;overflow-wrap:anywhere}.summary .sub{font-size:13px;display:block;margin-top:4px}.hero .note,.hero>div>div>.sub{margin-top:8px}.subst{display:grid;gap:8px;align-content:center;min-width:280px;margin:0;padding-left:24px;border-left:1px solid var(--line)}.ss{display:grid;grid-template-columns:96px minmax(0,1fr);align-items:baseline;gap:8px;font-size:13px}.ss dt{color:var(--fg-3)}.ss dd{margin:0;font-weight:600}.ss dd .sub{font-weight:400}.dot{width:8px;height:8px;border-radius:50%;background:var(--mute-mark);display:inline-block;margin-right:8px}.d-ok{background:var(--ok-mark)}.d-bad{background:var(--bad-mark)}.d-warn{background:var(--warn-mark)}.kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));margin:16px 0 0;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-1)}.kpi{padding:16px 20px;border-left:1px solid var(--line);display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;align-items:end}.kpi:first-child{border-left:0}.kpi dt{font-size:12px;color:var(--fg-3);font-weight:500;grid-column:1 / -1}.kpi dd{margin:0}.kv{font-size:24px;line-height:32px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}.kv small{font-size:13px;font-weight:500;color:var(--fg-3);margin-left:2px}.kpi .viz{grid-row:2;grid-column:2;align-self:center}.kpi .ks{grid-column:1 / -1;font-size:12px;color:var(--fg-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kpi.bad .kv{color:var(--bad)}.ring{width:32px;height:32px;transform:rotate(-90deg)}.ring circle{fill:none;stroke-width:4}.ring .tr{stroke:var(--track)}.ring .vl{stroke:var(--warn-mark);stroke-linecap:round}.vsplit{display:flex;width:56px;height:6px;border-radius:3px;overflow:hidden;background:var(--track);gap:2px}.vsplit>span{height:100%}.s-bad{background:var(--bad-mark)}.s-mute{background:var(--mute-mark)}.s-warn{background:var(--warn-mark)}.s-acc{background:var(--bar-hi)}.s-neu{background:var(--bar)}.s-trk{background:var(--track);box-shadow:inset 0 0 0 1px var(--line-2)}.pips{display:flex;gap:3px}.pips span{width:6px;height:14px;border-radius:2px;background:var(--bar-hi)}.pips .off{background:var(--mute-mark)}.tabs{position:sticky;top:0;z-index:20;margin:24px -24px 0;padding:4px 24px 0;background:color-mix(in srgb,var(--bg) 85%,transparent);backdrop-filter:blur(8px)}.seg{position:relative;display:flex;gap:4px;box-shadow:inset 0 -1px 0 var(--line-2);overflow-x:auto;scrollbar-width:none}.seg a{display:inline-flex;flex:none;align-items:center;gap:8px;min-height:44px;padding:3px 16px 0;border-bottom:3px solid transparent;border-radius:var(--r-sm) var(--r-sm) 0 0;color:var(--fg-2);font-size:14px;font-weight:600;white-space:nowrap}.seg a:hover{color:var(--fg);background:var(--hover);border-bottom-color:var(--line-2);text-decoration:none}.seg a:focus-visible{border-radius:var(--r-sm) var(--r-sm) 0 0;box-shadow:inset 0 0 0 2px var(--accent)}.seg a[aria-selected=true]{color:var(--accent);background:var(--accent-soft);border-bottom-color:var(--accent)}.n{font:600 11px/18px var(--sans);min-width:20px;padding:0 6px;border-radius:9px;background:var(--line);color:var(--fg-2);text-align:center;font-variant-numeric:tabular-nums;display:inline-block}.n.bad{background:var(--bad-soft);color:var(--bad)}.n.warn{background:var(--warn-soft);color:var(--warn)}.panel{margin-top:8px}.js .panel[hidden]{display:none}.ph{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;margin:24px 0 12px;flex-wrap:wrap}.panel>.ph:first-child{margin-top:8px}.ph h2{font-size:18px;font-weight:600}.ph h3{font-size:16px;font-weight:600;display:flex;align-items:center;gap:8px}.ph p{color:var(--fg-3);font-size:13px}.ph .more{font-size:13px;font-weight:500}.status-msg:empty{display:none}.status-msg{margin-top:12px;padding:8px 12px;border-radius:var(--r);background:var(--accent-soft)}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-1)}.card-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:14px 16px 0}.card-h h4{font-size:13px;font-weight:600}.card-h .sub{font-size:12px}.card-p{padding:14px 16px 0;font-size:13px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.pill{display:inline-flex;align-items:center;gap:4px;height:20px;padding:0 8px;border-radius:10px;font-size:11.5px;font-weight:600;white-space:nowrap;background:var(--mute-soft);color:var(--mute);line-height:1}.pill.fb{background:var(--bad-solid);color:#fff}.pill.f{background:var(--bad-soft);color:var(--bad);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--bad) 30%,transparent)}.pill.p{background:var(--ok-soft);color:var(--ok)}.pill.ne{background:none;box-shadow:inset 0 0 0 1px var(--line-2);color:var(--fg-2)}.pill.w{background:var(--warn-soft);color:var(--warn)}.pill.e{background:var(--fg);color:var(--bg)}.pill .i{width:12px;height:12px;vertical-align:0;stroke-width:2}.src{display:inline-block;font:500 11px/18px var(--mono);padding:0 6px;border-radius:4px;color:var(--fg-3);background:var(--sunken);box-shadow:inset 0 0 0 1px var(--line)}.es{font:500 11px var(--mono);color:var(--fg-3)}.kind{display:inline-block;font:500 11px/18px var(--sans);padding:0 6px;border-radius:4px;color:var(--fg-2);background:var(--sunken)}.m{display:inline-block;width:52px;text-align:center;font:700 10.5px/20px var(--mono);border-radius:4px;flex:none;color:var(--fg-2);background:var(--sunken)}.GET{color:var(--get);background:var(--get-bg)}.POST{color:var(--post);background:var(--post-bg)}.PUT{color:var(--put);background:var(--put-bg)}.PATCH{color:var(--patch);background:var(--patch-bg)}.DELETE{color:var(--del);background:var(--del-bg)}.key{font-family:var(--mono);font-size:12.5px;color:var(--fg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.key i{font-style:normal;color:var(--accent)}.key .o{font:500 10.5px/16px var(--sans);padding:0 5px;margin-right:6px;border-radius:4px;background:var(--sunken);color:var(--fg-3);box-shadow:inset 0 0 0 1px var(--line)}.rq{font:500 10.5px/16px var(--sans);padding:0 5px;border-radius:4px;color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);white-space:nowrap}.key s{text-decoration:none;color:var(--fg-3)}.key b{font-weight:600}.kl{display:flex;align-items:center;gap:8px;min-width:0;color:inherit}a.kl:hover{text-decoration:none}a.kl:hover .key{color:var(--accent);text-decoration:underline;text-underline-offset:3px}.key.st{font-family:var(--sans);font-size:13px}meter{appearance:none;width:64px;height:6px;border-radius:3px;vertical-align:middle;background:var(--track);border:0}meter::-webkit-meter-bar{background:linear-gradient(90deg,transparent calc(80% - 1px),var(--fg-3) calc(80% - 1px),var(--fg-3) 80%,transparent 80%),var(--track);border:0;border-radius:3px;height:6px}meter::-webkit-meter-optimum-value{background:var(--ok-mark);border-radius:3px}meter::-webkit-meter-suboptimum-value{background:var(--warn-mark);border-radius:3px}meter::-webkit-meter-even-less-good-value{background:var(--bad-mark);border-radius:3px}meter::-moz-meter-bar{background:var(--ok-mark);border-radius:3px}meter:-moz-meter-sub-optimum::-moz-meter-bar{background:var(--warn-mark)}meter:-moz-meter-sub-sub-optimum::-moz-meter-bar{background:var(--bad-mark)}.hr{display:inline-flex;align-items:center;gap:8px;font-variant-numeric:tabular-nums;font-size:12.5px;white-space:nowrap}.hr b{font-weight:500;min-width:40px;text-align:right}.hr .ov{color:var(--bad);font-weight:600}.hr .nr{color:var(--warn)}.vlist{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:12px}.vio{position:relative;padding:14px 16px 14px 20px;display:grid;gap:8px;overflow:hidden;align-content:start}.vio:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--bad-mark)}.vio.mu:before{background:var(--mute-mark)}.vio .top{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.vio .top .src{margin-left:auto}.rule{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--fg-2);font-variant-numeric:tabular-nums;flex-wrap:wrap}.rule b{color:var(--fg);font-weight:600}.rule meter{width:96px}.hint{display:flex;gap:8px;font-size:13px;color:var(--fg-2);line-height:1.45}.hint .i{color:var(--warn);margin-top:1px}.toggle{display:inline-flex;padding:2px;border:1px solid var(--line);border-radius:var(--r);background:var(--sunken)}.toggle button{border:0;background:none;font:500 12px var(--sans);color:var(--fg-2);height:24px;padding:0 10px;border-radius:6px;cursor:pointer}.toggle button[aria-pressed=true]{background:var(--surface);color:var(--fg);box-shadow:var(--sh-1),0 0 0 1px var(--line)}.rank{list-style:none;margin:0;padding:8px 8px 12px;counter-reset:r}.rank li{counter-increment:r;display:grid;grid-template-columns:16px minmax(0,1fr) auto;column-gap:8px;row-gap:6px;align-items:center;padding:8px;border-radius:var(--r-sm)}.rank li:hover{background:var(--hover)}.rank li:before{content:counter(r);font-size:11px;color:var(--fg-3);font-variant-numeric:tabular-nums;grid-row:1}.rank .kl{grid-column:2 / -1;gap:6px}.rank .m{width:auto;padding:0 4px;font-size:9.5px;line-height:16px}.rank .key{font-size:12px}.rank .tb{grid-column:2;grid-row:2}.rank .v{grid-column:3;grid-row:2;min-width:64px;text-align:right;font-size:12px;font-variant-numeric:tabular-nums;color:var(--fg-2);white-space:nowrap}.rank .v b{color:var(--fg);font-weight:600}.tb{display:block;height:4px;border-radius:2px;background:var(--track);overflow:hidden}.tb>span{display:block;height:100%;border-radius:2px;background:var(--bar-hi)}.tb.bad>span{background:var(--bad-mark)}.tb.warn>span{background:var(--warn-mark)}.tb.neu>span{background:var(--bar)}.tw{width:72px}.w-0{width:0}.w-5{width:5%}.w-10{width:10%}.w-15{width:15%}.w-20{width:20%}.w-25{width:25%}.w-30{width:30%}.w-35{width:35%}.w-40{width:40%}.w-45{width:45%}.w-50{width:50%}.w-55{width:55%}.w-60{width:60%}.w-65{width:65%}.w-70{width:70%}.w-75{width:75%}.w-80{width:80%}.w-85{width:85%}.w-90{width:90%}.w-95{width:95%}.w-100{width:100%}.tl{list-style:none;margin:0;padding:8px}.tl li{display:grid;grid-template-columns:minmax(0,1fr) 88px 72px;gap:12px;align-items:center;padding:8px;border-radius:var(--r-sm);font-size:13px}.tl.two li{grid-template-columns:minmax(0,1fr) auto}.tl li:hover{background:var(--hover)}.tt{min-width:0}.tt>span,.tt>.kl{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tt>.kl{display:flex}.tt .sub{font:12px var(--mono);margin-top:2px}.tl .num{font-weight:600;display:flex;flex-direction:column;align-items:flex-end;gap:2px}.tl .num .sub{font-weight:400;font-size:12px}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px;border-bottom:1px solid var(--line)}.search{display:flex;align-items:center;gap:8px;height:32px;padding:0 10px;border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);color:var(--fg-3);width:260px;max-width:100%}.search input{border:0;outline:0;background:none;font:13px var(--sans);color:var(--fg);width:100%}.search:focus-within{box-shadow:var(--focus)}.fg{display:inline-flex;gap:4px;align-items:center;flex-wrap:wrap;padding-left:8px;border-left:1px solid var(--line)}.fg>span{font-size:12px;color:var(--fg-3);margin-right:4px}.flt{height:28px;padding:0 10px;border:1px dashed var(--line-2);border-radius:14px;background:none;color:var(--fg-2);font:500 12px var(--sans);cursor:pointer;display:inline-flex;align-items:center;gap:6px}.flt[aria-pressed=true]{border-style:solid;border-color:var(--accent);background:var(--accent-soft);color:var(--accent-2)}.count{margin-left:auto;font-size:12px;color:var(--fg-3);font-variant-numeric:tabular-nums}.scroll{overflow-x:auto}table{border-collapse:separate;border-spacing:0;width:100%;font-size:13px}caption{text-align:left;padding:0;height:0;overflow:hidden}th{font-size:12px;font-weight:500;color:var(--fg-3);text-align:left;padding:8px 12px;border-bottom:1px solid var(--line);white-space:nowrap;background:var(--sunken)}th.num{text-align:right}th button{all:unset;cursor:pointer;display:inline-flex;gap:4px;align-items:center}th button:hover{color:var(--fg)}th button:focus-visible{box-shadow:var(--focus);border-radius:4px}th[aria-sort=descending] button:after{content:"\u2193";font-size:11px;color:var(--accent)}th[aria-sort=ascending] button:after{content:"\u2191";font-size:11px;color:var(--accent)}td,tbody th{padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap;vertical-align:middle;background:var(--surface);color:var(--fg);font-size:13px;font-weight:400}tbody:last-child tr:last-child>*,tbody:last-child tr.drow:last-child>*{border-bottom:0}.keys>tbody>tr:first-child,.tests tbody tr{transition:background .12s}.js .keys>tbody>tr:first-child:hover>*,.tests tbody tr:hover>*{background:var(--hover)}.js .keys>tbody>tr:first-child{cursor:pointer}.keys>tbody>tr.sel>*{background:var(--accent-soft)}th.k{max-width:440px;padding-left:16px;display:table-cell}th.k:before{content:"";display:inline-block;vertical-align:middle;width:6px;height:6px;border-radius:50%;margin-right:10px;background:var(--ok-mark)}th.k .kl{display:inline-flex;vertical-align:middle;width:max-content;max-width:360px}th.k .key{white-space:normal;overflow-wrap:anywhere}tr.blocking th.k:before,tr.violation th.k:before{background:var(--bad-mark)}tr.muted th.k:before{background:var(--mute-mark)}tr.not-evaluated th.k:before{background:none;box-shadow:inset 0 0 0 1.5px var(--mute-mark)}tr.blocking th.k{box-shadow:inset 3px 0 0 var(--bad-mark)}td.r>*+*{margin-left:6px}td.r .why,td.num .why{display:block;margin:4px 0 0;color:var(--fg-3);font-size:12px}td .lim{color:var(--fg-3);font-size:12px;font-weight:400}td.ov{color:var(--bad);font-weight:600}td.e{color:var(--bad);font-weight:500}td.z{color:var(--fg-3)}td.loc{font:12px var(--mono);color:var(--fg-3)}.tfoot{padding:10px 16px;font-size:12px;color:var(--fg-3);border-top:1px solid var(--line)}.dep{display:inline-block;position:relative;width:16px;height:4px;margin-right:8px;vertical-align:2px;background:radial-gradient(circle,var(--line-2) 2px,transparent 2px) 0 0 / 6px 4px repeat-x}.dep:before{content:"";position:absolute;inset:0 auto 0 0;background:radial-gradient(circle,var(--fg-3) 2px,transparent 2px) 0 0 / 6px 4px repeat-x}.d1:before{width:4px}.d2:before{width:10px}.d3:before{width:16px}.tests th.tc{max-width:360px}.tc>span{display:block;overflow:hidden;text-overflow:ellipsis}.tc .tn{font-weight:500;color:var(--accent)}.tc .sub{font-size:12px;margin-top:2px}td.tk>*{display:flex;gap:6px;align-items:center}td.tk>*+*{margin-top:4px}td.tk2>*{flex-direction:column;align-items:flex-start;gap:0}.tk .kl{display:inline-flex}.tk .m{width:auto;padding:0 4px;font-size:9.5px;line-height:16px}.drow>td{white-space:normal;background:var(--bg)}.js .drow{display:none}.drow summary{cursor:pointer;color:var(--accent);font-weight:500}.kd{padding:0 4px 12px;max-width:920px}.kh{padding-top:12px}.fk{display:block;word-break:break-all;font-size:14px;font-weight:600}.fk .key{white-space:normal;overflow:visible;font-size:inherit}.pills{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap;align-items:center}.ds{padding-top:20px}.ds>h4{font-size:12px;font-weight:600;color:var(--fg-2);margin-bottom:10px;display:flex;justify-content:space-between;gap:8px;align-items:baseline}.ds>h4 .sub{font-weight:400}.hints{list-style:none;display:grid;gap:8px;margin:20px 0 0;padding:12px 14px;border-radius:var(--r);background:var(--warn-soft);border:1px solid color-mix(in srgb,var(--warn-mark) 30%,transparent)}.hints li{display:flex;gap:8px;font-size:13px}.hints .i{color:var(--warn);margin-top:1px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);border-radius:var(--r);margin:0;background:var(--surface)}.stats div{padding:10px 12px;border-left:1px solid var(--line)}.stats div:first-child{border-left:0}.stats dt{font-size:11px;color:var(--fg-3)}.stats dd{margin:0;font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.stats dd small{font-size:11px;color:var(--fg-3);font-weight:400}.stats .ov dd{color:var(--bad)}.ct{border:1px solid var(--line);border-radius:var(--r);overflow:hidden;overflow-x:auto}.ct td,.ct th{padding:8px 10px}.ct thead th{background:none}.ck td{text-align:right;font-variant-numeric:tabular-nums}.ck td:nth-last-child(-n+2){text-align:left}.ck td.ov{color:var(--bad);font-weight:600}.legend{display:flex;gap:8px 16px;font-size:12px;color:var(--fg-3);margin-top:8px;flex-wrap:wrap}.legend span{display:inline-flex;align-items:center;gap:6px}.legend i{width:10px;height:10px;border-radius:2px;display:inline-block}.legend .lg-lim{border-top:2px dashed var(--bad-mark);height:0;border-radius:0}.stc{display:flex;gap:6px;flex-wrap:wrap}.stc span{font:12px var(--mono);padding:2px 8px;border-radius:var(--r-sm);background:var(--sunken);box-shadow:inset 0 0 0 1px var(--line)}.stc b{font-weight:600}.stc .e{color:var(--bad)}.cw{font-size:13px;font-variant-numeric:tabular-nums}.wv,.wv th{color:var(--warn);font-weight:600}.ev{color:var(--bad);font-weight:600}.ft td:nth-last-child(-n+2){text-align:right}.facts{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:10px;font-size:12.5px;color:var(--fg-2)}.samples{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}.samples li{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;padding:10px 12px;border-top:1px solid var(--line);font-size:13px}.samples li:first-child{border-top:0}.samples b{font-variant-numeric:tabular-nums}.samples .sub{font-family:var(--sans)}.samples .url{font:12px var(--mono);color:var(--fg-2);white-space:normal;overflow-wrap:anywhere}.ds .tl{padding:0;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}.kdlg{width:min(960px,calc(100vw - 32px));max-width:none;max-height:calc(100vh - 48px);padding:0;border:0;border-radius:var(--r-lg);background:var(--surface);color:var(--fg);box-shadow:var(--sh-3);overflow-y:auto;overscroll-behavior:contain}.kdlg::backdrop{background:#1018287f}@media(prefers-reduced-motion:no-preference){.kdlg[open]{animation:pop .12s ease-out}}@keyframes pop{0%{opacity:0;transform:translateY(8px)}}.dh{position:sticky;top:0;z-index:2;background:var(--surface);border-bottom:1px solid var(--line);padding:16px 20px 14px}.dh .nav{display:flex;gap:4px;align-items:center;margin-bottom:10px}.dh .nav .sub{font-size:12px;margin-right:auto}#dlg-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}#dlg-title:focus-visible{box-shadow:none}.dh .kh{padding-top:0}.db{padding:0 20px 8px}.db .kd{padding:0;max-width:none}.dfoot{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px 20px 20px}.copy-out input{font:12px var(--mono);width:min(520px,70vw);margin-left:8px}svg.ch,svg.split,svg.bar{display:block;width:100%;height:auto}svg.hist,svg.bar{max-width:720px}.ch text,svg.bar text{font:10.5px var(--sans);fill:var(--fg-3);font-variant-numeric:tabular-nums}.as{text-anchor:start}.am{text-anchor:middle}.ae{text-anchor:end}.hist .gr,.wf .wg{stroke:var(--line);stroke-width:1;stroke-dasharray:2 3;fill:none}.hist .ha{stroke:var(--line-2)}.hist .bars{fill:var(--bar)}.hist .bars-hi{fill:var(--bad-mark)}.hist .hm{stroke:var(--fg-2);stroke-width:1.25}.hist .hl{stroke:var(--bad-mark);stroke-width:1.5;stroke-dasharray:4 3}.hist text{fill:var(--fg-2);font-weight:600}.hist .ht text{fill:var(--fg-3);font-weight:400}.split .st{fill:var(--bar-hi)}.split .so{fill:var(--track);stroke:var(--line-2)}.bar-axis{stroke:var(--line-2)}.bar-range{fill:var(--bar)}.bar-mark{stroke:var(--fg-2);stroke-width:1.5}.bar-limit{stroke:var(--bad-mark);stroke-dasharray:4 3}svg.bar .bar-limit-text{fill:var(--bad)}.wl{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.wf-h{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;padding:16px;border-bottom:1px solid var(--line);flex-wrap:wrap}.wf-h h4{font-size:14px;font-weight:600;overflow-wrap:anywhere}.wf-h .sub{font-size:12px;margin-top:2px}.wf-h dl{display:flex;gap:24px;margin:0}.wf-h dt{font-size:11px;color:var(--fg-3)}.wf-h dd{margin:0;font-weight:600;font-variant-numeric:tabular-nums}.wfs{padding:8px 16px 16px}.wfs svg{min-width:720px}.wf .sep{stroke:var(--line)}.wf use{font:10.5px var(--mono);fill:var(--fg-2)}.wkm{font-weight:700}.wkm.mGET{fill:var(--get)}.wkm.mPOST{fill:var(--post)}.wkm.mPUT{fill:var(--put)}.wkm.mPATCH{fill:var(--patch)}.wkm.mDELETE{fill:var(--del)}.wkp{fill:var(--accent)}.wf g rect{fill:var(--bar-hi)}.wf .we rect,.wf .we path{fill:var(--bad-mark)}.wf .ww rect{fill:var(--warn-mark)}.wf .wm rect{fill:var(--mute-mark)}.wf g path{fill:var(--bad-mark);stroke:var(--surface);stroke-width:1.5}.wf .d{font-size:10px}.wf g:hover use,.wf g:hover text{fill:var(--fg)}.wf g:hover rect{opacity:.85}.sh{font-size:13px;font-weight:600;color:var(--fg-2);margin:8px 0 0}.wn{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:4px 12px;padding:16px}.wn .wi{width:32px;height:32px;border-radius:var(--r);display:grid;place-items:center;background:var(--warn-soft);color:var(--warn);grid-row:1 / 4}.wn.err .wi{background:var(--bad-soft);color:var(--bad)}.wn code{font:600 12.5px var(--mono);align-self:center;overflow-wrap:anywhere}.wn p{grid-column:2 / -1;font-size:13.5px;overflow-wrap:anywhere}.wn .hint .i{color:var(--accent)}.wn .n{align-self:start}.hl-err .wn{border-color:var(--bad-mark)}.kvl{display:grid;grid-template-columns:140px minmax(0,1fr);gap:8px 16px;margin:0;padding:16px;font-size:13px}.kvl dt{color:var(--fg-3)}.kvl dd{margin:0;min-width:0;overflow-wrap:anywhere}.plain{margin:4px 0 0;padding-left:16px}details.cfg summary{padding:14px 16px;cursor:pointer;font-weight:600;font-size:13px;list-style:none;display:flex;gap:8px;align-items:center}details.cfg summary::-webkit-details-marker{display:none}details.cfg summary:before{content:"";width:6px;height:6px;flex:none;border-right:1.5px solid var(--fg-3);border-bottom:1.5px solid var(--fg-3);transform:rotate(-45deg);transition:transform .15s}details.cfg[open] summary:before{transform:rotate(45deg)}details.cfg pre{margin:0;padding:16px;border-top:1px solid var(--line);font:12px/1.6 var(--mono);color:var(--fg-2);overflow-x:auto;background:var(--sunken);border-radius:0 0 var(--r-lg) var(--r-lg)}details.cfg .scroll{border-top:1px solid var(--line)}.empty{display:grid;justify-items:center;text-align:center;gap:8px;padding:40px 24px;color:var(--fg-2)}.empty .ei{width:44px;height:44px;border-radius:var(--r-lg);display:grid;place-items:center;background:var(--sunken);box-shadow:inset 0 0 0 1px var(--line);color:var(--fg-3)}.empty h3{font-size:15px;color:var(--fg)}.empty p{font-size:13px;max-width:56ch}.empty.sm{padding:20px 16px;gap:6px}.empty.sm .i{color:var(--ok-mark)}.note{display:flex;gap:10px;padding:12px 14px;border-radius:var(--r);background:var(--accent-soft);color:var(--fg);font-size:13px;align-items:flex-start}.note .i{color:var(--accent);margin-top:1px}.note code{background:var(--surface);padding:1px 5px;border-radius:4px}footer{padding:24px 0 40px;font-size:12px;color:var(--fg-3);border-top:1px solid var(--line)}@media(max-width:1100px){.grid4{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:1023px){.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.kpi:nth-child(4){border-left:0}.kpi:nth-child(n+4){border-top:1px solid var(--line)}.hero{grid-template-columns:minmax(0,1fr)}.subst{border-left:0;padding-left:0;border-top:1px solid var(--line);padding-top:16px;min-width:0}}@media(max-width:720px){.grid2,.vlist{grid-template-columns:minmax(0,1fr)}}@media(max-width:599px){.wrap{padding:0 16px}.tabs{margin:16px -16px 0;padding:4px 16px 0}.seg a{padding:3px 12px 0}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.kpi{padding:12px 14px}.kpi:nth-child(n){border-left:1px solid var(--line);border-top:1px solid var(--line)}.kpi:nth-child(odd){border-left:0}.kpi:nth-child(-n+2){border-top:0}.kv{font-size:20px;line-height:28px}.grid4{grid-template-columns:minmax(0,1fr)}.hero{padding:20px 16px}.status{font-size:24px;line-height:32px}.v-ic{width:40px;height:40px}.summary{font-size:14px}.ss{grid-template-columns:88px minmax(0,1fr)}.brand{flex:1;min-width:0;overflow:hidden}.brand b{overflow:hidden;text-overflow:ellipsis}.brand .ver{display:none}.meta{order:3;flex:0 0 100%;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.appbar .btn span{display:none}.appbar .btn{width:32px;padding:0;justify-content:center}.vio .rule meter{display:none}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stats div:nth-child(3){border-left:0}.stats div:nth-child(n+3){border-top:1px solid var(--line)}.tl li{grid-template-columns:minmax(0,1fr) 72px}.tl li>.num:last-child{display:none}.tl.two li>.num:last-child{display:flex}.fg{border-left:0;padding-left:0}.kvl{grid-template-columns:minmax(0,1fr);gap:2px}.kvl dd{margin-bottom:8px}.kdlg{width:100vw;max-width:100vw;height:100vh;max-height:100vh;margin:0;border-radius:0}.dh,.dfoot{padding-left:16px;padding-right:16px}.db{padding:0 16px 8px}}@media print{:root{--bg: #ffffff;--sh-1: none;--sh-2: none}.tabs,.toolbar,.btn,.toggle,.js-only,.kdlg,.skip,.status-msg,[data-none],th button:after{display:none!important}.js .panel[hidden]{display:block!important}.js .drow{display:table-row}.scroll,.ct{overflow:visible}tr,.card,.kpi,.wfb,svg{break-inside:avoid}details[data-v]::details-content{content-visibility:visible;display:block}}';
|
|
7219
|
+
var STYLES_SHA256 = "vj6+OV+2/gRJ/ra9DdYu796fZD2ovPBNRtVAgJdSL6E=";
|
|
6460
7220
|
var SCRIPT = '(()=>{const u=document,ee=u.getElementById("report-data")?.textContent??"{}",q=JSON.parse(ee),B={api:q.endpoints??{},step:q.steps??{}},re=q.testBreakdown?.tests??[],te={api:"endpoints",step:"steps"};u.documentElement.classList.add("js");function f(e,n=u){return Array.from(n.querySelectorAll(e))}function A(e,n){return Object.prototype.hasOwnProperty.call(e,n)}const V=u.getElementById("status");function $(e){V!==null&&(V.textContent=e)}function w(e){history.replaceState(null,"",e)}const E=u.querySelector("[data-tabs]"),T=E===null?[]:f("a[data-tab]",E),H=new Map;for(const e of f("[data-panel]"))H.set(e.dataset.panel??"",e);let U="overview";function ae(e,n){const t=n.offsetLeft,l=t+n.offsetWidth;t<e.scrollLeft?e.scrollLeft=t:l>e.scrollLeft+e.clientWidth&&(e.scrollLeft=l-e.clientWidth)}function h(e,n=!1){if(H.has(e)){U=e;for(const t of T){const l=t.dataset.tab===e;t.setAttribute("aria-selected",String(l)),t.tabIndex=l?0:-1,l&&n&&t.focus(),l&&E!==null&&ae(E,t)}for(const[t,l]of H)l.hidden=t!==e}}if(E!==null){E.setAttribute("role","tablist");for(const e of T){const n=e.dataset.tab??"";e.setAttribute("role","tab"),e.setAttribute("aria-controls",`tab-${n}`);const t=H.get(n);t?.setAttribute("role","tabpanel"),t?.setAttribute("aria-labelledby",e.id)}E.addEventListener("keydown",e=>{const n=T.findIndex(s=>s.dataset.tab===U);let t=-1;if(e.key==="ArrowRight"?t=(n+1)%T.length:e.key==="ArrowLeft"?t=(n-1+T.length)%T.length:e.key==="Home"?t=0:e.key==="End"&&(t=T.length-1),t<0)return;e.preventDefault();const l=T[t]?.dataset.tab??"overview";h(l,!0),w(`#tab=${l}`)})}const I={api:new Map,step:new Map};function j(e){const n=e?.dataset.kind??"api";return A(te,n)?n:"api"}const x=new Map;for(const e of f("table.keys")){const n=j(e);for(const t of Array.from(e.tBodies)){const l=t.querySelector(".fk")?.textContent??"";x.set(t,l),A(B[n],l)&&I[n].set(l,t)}}function ie(e){return j(e.closest("table"))}const _={api:"Endpoint",step:"Step"},d=u.getElementById("key-dialog"),C=u.getElementById("dlg-title"),z=u.getElementById("dlg-pos"),ue=d?.querySelector(".dh-slot")??null,J=d?.querySelector(".db")??null,k=d?.querySelector(".copy-out")??null,G=d?.querySelector(\'[data-act="prev"]\')??null,Q=d?.querySelector(\'[data-act="next"]\')??null;let p=null,K=null;function P(){p!==null&&(p.head!==null&&p.block.prepend(p.head),p.home.appendChild(p.block),p.body.rows[0]?.classList.remove("sel"),p=null)}function ne(e){const n=e.closest("table");return n===null?[e]:Array.from(n.tBodies).filter(t=>!t.hidden)}function W(e,n,t=!1){const l=e.querySelector("details"),s=l?.querySelector(".kd");if(d===null||J===null||l===null||s==null)return;P(),n!==null&&(K=n);const o=s.querySelector(".kh");o!==null&&ue?.appendChild(o),J.appendChild(s),p={body:e,block:s,head:o,home:l},e.rows[0]?.classList.add("sel");const r=ie(e),m=x.get(e)??"",c=ne(e),a=c.indexOf(e);C!==null&&(C.textContent=m),z!==null&&(z.textContent=a<0?_[r]:`${_[r]} ${String(a+1)} of ${String(c.length)}`),G!==null&&(G.disabled=a<=0),Q!==null&&(Q.disabled=a<0||a>=c.length-1),k!==null&&(k.hidden=!0),t&&h(te[r]),d.open||(d.showModal(),u.documentElement.classList.add("modal-open")),d.scrollTop=0,w(`#key=${r}:${encodeURIComponent(m)}`),C?.focus()}let O=!0;function v(e=!0){d===null||!d.open||(O=e,P(),d.close())}d?.addEventListener("close",()=>{P(),u.documentElement.classList.remove("modal-open"),O&&(w(`#tab=${U}`),K?.focus()),O=!0,K=null});function X(e){if(p===null)return;const n=ne(p.body),t=n[n.indexOf(p.body)+e];t!==void 0&&W(t,null)}d?.addEventListener("click",e=>{if(e.target===d){v();return}const n=e.target.closest("[data-act]")?.dataset.act;n==="close"?v():n==="prev"?X(-1):n==="next"&&X(1)});function F(e,n=null){let t=/^#tab[=-]([a-z-]+)$/u.exec(e);if(t!==null){v(!1);const s=t[1]??"";H.has(s)?(h(s),w(`#tab=${s}`)):(h("overview"),$("Tab not found in this report"));return}let l;if(t=/^#key=(api|request|step):(.*)$/su.exec(e),t!==null){let s;try{s=decodeURIComponent(t[2]??"")}catch{s=null}const o=t[1];s!==null&&A(I,o)&&(l=I[o].get(s))}else{if(t=/^#key-(?:api|step)-(\\d+)$/u.exec(e),t===null)return;l=u.getElementById(e.slice(1))?.closest("tbody")??void 0}if(l===void 0){v(!1),h("overview"),$("Key not found in this report");return}W(l,n,n===null)}u.addEventListener("click",e=>{const n=e.target,t=n.closest(\'a[href^="#"]\');if(t===null){const s=n.closest("table.keys > tbody > tr:first-child"),o=s?.parentElement;if(s==null||!(o instanceof HTMLTableSectionElement)||n.closest("button, input, label, summary")!==null)return;W(o,s.querySelector(\'a[href^="#key-"]\'));return}const l=t.getAttribute("href")??"";if(t.hasAttribute("data-show-violations")){e.preventDefault(),v(!1),h("endpoints"),w("#tab=endpoints"),me();return}/^#(?:tab-|key-)/u.test(l)&&(e.preventDefault(),F(l,t))});window.addEventListener("hashchange",()=>F(location.hash));function ce(e){const n=e.evaluation.checks;if(n.length===0)return null;let t=-1/0;for(const l of n)t=Math.max(t,l.usage??1/0);return t}function de(e,n,t){if(e===void 0)return null;switch(n){case"headroom":return ce(e);case"samples":return e.successCount;case"errors":return e.errorCount;case"p50":return e.stats?.percentiles.p50??null;case"percentile":return e.stats?.percentiles[t]??null;case"p99":return e.stats?.percentiles.p99??null;case"max":return e.stats?.max??null;case"ttfb":return e.ttfb?.p50??null;case"tests":return e.testCount;default:return null}}function fe(e,n){if(e===void 0)return null;switch(n){case"runs":return e.executions;case"requests":return e.requestCount;case"errors":return e.errorCount;case"total":return e.totalMs;case"avg":return Math.round(e.totalMs/e.executions*10)/10;case"longest":return e.maxRequestMs;case"keys":return e.keyCount;case"violations":return e.violatedKeyCount;default:return null}}function le(e,n,t){const l=f("th[data-sort]",e);let s=null;for(const o of l){const r=o.dataset.sort??"";o.querySelector("button")?.addEventListener("click",()=>{const c=r==="key"||r==="title"||r==="result"||r==="source"?"ascending":"descending",a=s?.column===r?s.direction==="ascending"?"descending":"ascending":c;s={column:r,direction:a};const L=a==="ascending"?1:-1,g=[...n].sort((i,b)=>{if(r==="key"||r==="title")return(i.text<b.text?-1:i.text>b.text?1:0)*L||i.order-b.order;const y=i.value(r),M=b.value(r);return y===null||M===null?y===M?i.order-b.order:y===null?1:-1:(y-M)*L||i.order-b.order});for(const i of g)t.appendChild(i.element);for(const i of l)i===o?i.setAttribute("aria-sort",a):i.removeAttribute("aria-sort")})}}const se=new Map;function oe(e,n){const t=u.querySelector(`[data-for="${e}"]`);if(t===null)return;const l=t.querySelector(\'input[type="search"]\'),s=f("button[data-f]",t),o=t.querySelector("[data-count]"),r=t.querySelector("[data-none]");function m(){const c=(l?.value??"").toLowerCase(),a=new Map;for(const g of s){if(g.getAttribute("aria-pressed")!=="true")continue;const i=g.dataset.f??"",b=a.get(i)??new Set;b.add(g.dataset.v??""),a.set(i,b)}let L=0;for(const g of n){let i=g.text.includes(c);for(const[b,y]of a){const M=g.attributes[b]??null;(M===null||!y.has(M))&&(i=!1)}g.element.hidden=!i,i&&L++}o!==null&&(o.textContent=`showing ${L} of ${n.length}`),r!==null&&(r.hidden=L>0)}for(const c of s)c.addEventListener("click",()=>{c.setAttribute("aria-pressed",String(c.getAttribute("aria-pressed")!=="true")),m()});l?.addEventListener("input",m);for(const c of f("[data-reset]",t))c.addEventListener("click",()=>{l!==null&&(l.value="");for(const a of s)a.setAttribute("aria-pressed","false");m()});se.set(e,c=>{l!==null&&(l.value="");for(const a of s){const L=c[a.dataset.f??""]?.includes(a.dataset.v??"")===!0;a.setAttribute("aria-pressed",String(L))}m()})}function me(){se.get("table-api")?.({g:["0","1"]})}for(const e of f("table.keys")){const n=j(e),t=e.dataset.level??"p95",l=Array.from(e.tBodies),s=l.map(o=>{const r=x.get(o)??"";return{element:o,order:Number(/\\d+$/u.exec(o.querySelector("details")?.id??"")?.[0]??"0"),text:r,value:m=>m==="result"?Number(o.dataset.g??"3"):m==="source"?Number(r.startsWith("request ")):de(A(B[n],r)?B[n][r]:void 0,m,t)}});le(e,s,e),oe(e.id,l.map(o=>({element:o,text:(x.get(o)??"").toLowerCase(),attributes:{g:o.dataset.g??null,s:o.dataset.s??null,m:o.hasAttribute("data-m")?"":null}})))}const N=u.querySelector("#table-tests"),D=N?.tBodies[0];if(N!==null&&D!==void 0){const e=Array.from(D.rows),n=t=>re[Number(t.dataset.i??"-1")];le(N,e.map(t=>({element:t,order:Number(t.dataset.i??"0"),text:n(t)?.title??"",value:l=>fe(n(t),l)})),D),oe("table-tests",e.map(t=>{const l=n(t);return{element:t,text:`${l?.title??""}\\0${l?.file??""}`.toLowerCase(),attributes:{v:t.hasAttribute("data-v")?"":null}}}))}const Y=u.querySelector("[data-kinds]");if(Y!==null){const e=f("button[data-k]",Y),n=t=>{for(const l of e)l.setAttribute("aria-pressed",String(l.dataset.k===t));for(const l of f("ol[data-rank]")){let s=0;for(const o of f("li",l)){const r=o.dataset.k===t&&s<10;o.hidden=!r,r&&s++}l.hidden=s===0;for(const o of f("[data-k-empty]",l.parentElement??u))o.hidden=o.dataset.kEmpty!==t}};for(const t of e)t.addEventListener("click",()=>n(t.dataset.k??"api"));n(e[0]?.dataset.k??"api")}u.addEventListener("click",e=>{if(e.target.closest("[data-copy]")===null)return;const n=location.href,t=()=>{const l=k?.querySelector("input");k===null||l==null||(k.hidden=!1,l.value=n,l.focus(),l.select())};if(navigator.clipboard===void 0){t();return}navigator.clipboard.writeText(n).then(()=>$("Link copied"),t)});const Z=u.getElementById("download"),R=u.getElementById("download-link");Z instanceof HTMLButtonElement&&R instanceof HTMLAnchorElement&&Z.addEventListener("click",()=>{const e=URL.createObjectURL(new Blob([ee],{type:"application/json"}));R.href=e,R.click(),setTimeout(()=>URL.revokeObjectURL(e),1e3)});for(const e of f(".js-only"))e.hidden=!1;let S=[];window.addEventListener("beforeprint",()=>{v(!1),S=f("details[data-v]:not([open])");for(const e of S)e.open=!0});window.addEventListener("afterprint",()=>{for(const e of S)e.open=!1;S=[]});h("overview");F(location.hash);})();';
|
|
6461
7221
|
var SCRIPT_SHA256 = "Jda/ayo/X8RNPoTXXep2nOa041MPnyTQ/N6biJU+P6k=";
|
|
6462
7222
|
|
|
@@ -6655,8 +7415,8 @@ function histogramSvg(input) {
|
|
|
6655
7415
|
}
|
|
6656
7416
|
const outline = (from, to) => {
|
|
6657
7417
|
let previous = base;
|
|
6658
|
-
const steps = counts.slice(from, to).map((
|
|
6659
|
-
const y = r(base - H_BARS *
|
|
7418
|
+
const steps = counts.slice(from, to).map((count4) => {
|
|
7419
|
+
const y = r(base - H_BARS * count4 / most);
|
|
6660
7420
|
const step = y === previous ? "" : `V${y}`;
|
|
6661
7421
|
previous = y;
|
|
6662
7422
|
return `${step}h${r(width)}`;
|
|
@@ -6785,6 +7545,8 @@ function ruleLabel(rule, level) {
|
|
|
6785
7545
|
return "slow share";
|
|
6786
7546
|
case "errors":
|
|
6787
7547
|
return "error rate";
|
|
7548
|
+
case "nonSuccess":
|
|
7549
|
+
return "non-success share";
|
|
6788
7550
|
default:
|
|
6789
7551
|
return rule;
|
|
6790
7552
|
}
|
|
@@ -6881,7 +7643,8 @@ function usageClass(usage, failed) {
|
|
|
6881
7643
|
var SHARE_RULES2 = /* @__PURE__ */ new Set([
|
|
6882
7644
|
"apdex",
|
|
6883
7645
|
"wilson",
|
|
6884
|
-
"errors"
|
|
7646
|
+
"errors",
|
|
7647
|
+
"nonSuccess"
|
|
6885
7648
|
]);
|
|
6886
7649
|
function overOf(check2) {
|
|
6887
7650
|
if (check2.passed) return void 0;
|
|
@@ -6897,7 +7660,7 @@ function usageMeter(check2, long = false) {
|
|
|
6897
7660
|
}
|
|
6898
7661
|
function checkValue(check2, value) {
|
|
6899
7662
|
if (TIME_RULES4.has(check2.rule)) return formatMs2(value);
|
|
6900
|
-
return check2.rule === "errors" ? formatPercent(value) : formatRatio(value);
|
|
7663
|
+
return check2.rule === "errors" || check2.rule === "nonSuccess" ? formatPercent(value) : formatRatio(value);
|
|
6901
7664
|
}
|
|
6902
7665
|
function lowestMinSamples(report, level) {
|
|
6903
7666
|
const checks = report.config.checks;
|
|
@@ -7122,13 +7885,92 @@ function statusesPart(ctx, kind2, key2, agg) {
|
|
|
7122
7885
|
html`<p class="facts">${facts2}</p>`
|
|
7123
7886
|
);
|
|
7124
7887
|
}
|
|
7888
|
+
function coldCalls(cold2) {
|
|
7889
|
+
if (cold2.count === 1) return `First call ${cold2.durations.map(formatMs2).join(", ")}`;
|
|
7890
|
+
const more = cold2.count > cold2.durations.length ? ", \u2026" : "";
|
|
7891
|
+
return `First ${String(cold2.count)} calls ${cold2.durations.map(formatMs2).join(", ")}${more} \xB7 max ${formatMs2(cold2.max)}`;
|
|
7892
|
+
}
|
|
7893
|
+
function coldPart(agg) {
|
|
7894
|
+
const cold2 = agg.cold;
|
|
7895
|
+
if (cold2 === null) return null;
|
|
7896
|
+
const slow = cold2.ratio !== null && cold2.ratio >= chunkVXGTC6DB_cjs.COLD_WARN_RATIO;
|
|
7897
|
+
return part(
|
|
7898
|
+
"Cold vs warm",
|
|
7899
|
+
"first calls in each pass",
|
|
7900
|
+
html`<p class="cw">${coldCalls(cold2)}`,
|
|
7901
|
+
cold2.warmP50 === null ? null : (
|
|
7902
|
+
// Only cold samples (a key called once per pass): their p50 (08-REQ-43).
|
|
7903
|
+
html` · ${!cold2.excluded && cold2.count === agg.successCount ? "p50 of all samples" : "warm p50"} ${formatMs2(cold2.warmP50)}`
|
|
7904
|
+
),
|
|
7905
|
+
cold2.ratio === null ? null : html` · <b${slow ? html` class="wv"` : null}>×${cold2.ratio.toFixed(1)}</b>`,
|
|
7906
|
+
html`</p><p class="facts"><span>First cold sample: ${testRef2(cold2.test)}</span><span>${cold2.excluded ? "Cold samples are not evaluated." : "Too few warm samples to set the first calls apart: they are included in the statistics."}</span></p>`
|
|
7907
|
+
);
|
|
7908
|
+
}
|
|
7909
|
+
function unsuccessfulPart(ctx, agg) {
|
|
7910
|
+
if (agg.failedTimings.length === 0) return null;
|
|
7911
|
+
const errors = ctx.report.config.checks?.errors?.statuses ?? DEFAULT_ERROR_STATUSES;
|
|
7912
|
+
return part(
|
|
7913
|
+
"Unsuccessful responses",
|
|
7914
|
+
agg.nonSuccessCount === null ? null : plural3(agg.nonSuccessCount, "response"),
|
|
7915
|
+
html`<div class="ct" tabindex="0"><table class="ck ft"><caption>Unsuccessful responses</caption><thead><tr><th scope="col">Status</th><th scope="col" class="num">Samples</th><th scope="col" class="num">p50</th><th scope="col" class="num">p95</th></tr></thead><tbody>${agg.failedTimings.map(
|
|
7916
|
+
(f) => html`<tr><th scope="row" class="${isErrorStatus(String(f.status), errors) ? "ev" : "wv"}">${f.status}</th><td>${f.count}</td><td>${formatMs2(f.p50)}</td><td>${formatMs2(f.p95)}</td></tr>`
|
|
7917
|
+
)}</tbody></table></div>`,
|
|
7918
|
+
html`<p class="legend">Not part of the time statistics; the nonSuccess and errors rules count them.</p>`
|
|
7919
|
+
);
|
|
7920
|
+
}
|
|
7921
|
+
function workloadPart(kind2, agg) {
|
|
7922
|
+
const w = agg.evaluation.workload;
|
|
7923
|
+
if (w === null) return null;
|
|
7924
|
+
const perPass2 = (side) => (side.count / side.passes).toFixed(1);
|
|
7925
|
+
const row = (label, base, now, warn = false) => html`<tr${warn ? html` class="wv"` : null}><th scope="row">${label}</th><td>${base}</td><td>${now}</td></tr>`;
|
|
7926
|
+
return part(
|
|
7927
|
+
"Compared with the thresholds run",
|
|
7928
|
+
w.perPassRatio === null ? null : `\xD7${w.perPassRatio.toFixed(2)} samples per pass`,
|
|
7929
|
+
html`<div class="ct" tabindex="0"><table class="ck ft"><caption>Compared with the thresholds run</caption><thead><tr><th scope="col"></th><th scope="col" class="num">Thresholds run</th><th scope="col" class="num">This run</th></tr></thead><tbody>${[
|
|
7930
|
+
row("Samples", w.base.count, w.now.count),
|
|
7931
|
+
row("Per pass", perPass2(w.base), perPass2(w.now), w.shifted),
|
|
7932
|
+
row(
|
|
7933
|
+
`Share of ${KIND_LABEL2[kind2]} traffic`,
|
|
7934
|
+
formatPercent(w.base.share),
|
|
7935
|
+
formatPercent(w.now.share)
|
|
7936
|
+
),
|
|
7937
|
+
row(
|
|
7938
|
+
"Passes \xB7 workers",
|
|
7939
|
+
`${String(w.base.passes)} \xB7 ${String(w.base.workers)}`,
|
|
7940
|
+
`${String(w.now.passes)} \xB7 ${String(w.now.workers)}`
|
|
7941
|
+
)
|
|
7942
|
+
]}</tbody></table></div>`,
|
|
7943
|
+
w.shifted ? html`<p class="legend">The key gets a different number of samples per pass than in the thresholds run, which changes its percentiles without a change of the application.</p>` : null
|
|
7944
|
+
);
|
|
7945
|
+
}
|
|
7946
|
+
var OPERATIONS_HINT_MIN_SAMPLES = 20;
|
|
7947
|
+
function operationsHint(ctx, kind2, key2, count4) {
|
|
7948
|
+
if (kind2 !== "api" || count4 < OPERATIONS_HINT_MIN_SAMPLES) return null;
|
|
7949
|
+
const operations = ctx.report.config.keys?.operations;
|
|
7950
|
+
if (operations !== void 0 && operations.length > 0) return null;
|
|
7951
|
+
const plain = key2.startsWith(chunkVXGTC6DB_cjs.REQUEST_KEY_PREFIX) ? key2.slice(chunkVXGTC6DB_cjs.REQUEST_KEY_PREFIX.length) : key2;
|
|
7952
|
+
if (!plain.startsWith("POST ")) return null;
|
|
7953
|
+
const slash = plain.indexOf("/");
|
|
7954
|
+
if (slash < 0) return null;
|
|
7955
|
+
const path = plain.slice(slash).split(/[?#]/u, 1)[0] ?? "";
|
|
7956
|
+
const name = path.endsWith("/graphql") ? "GraphQL" : path.split("/").includes("trpc") ? "tRPC" : null;
|
|
7957
|
+
if (name === null) return null;
|
|
7958
|
+
return `This looks like ${name}: one key mixes all operations. Set keys.operations to get a key per operation (docs/configuration.md#operations).`;
|
|
7959
|
+
}
|
|
7125
7960
|
function keyDetails(ctx, kind2, key2, agg) {
|
|
7126
7961
|
const hints = ctx.migrated ? [] : agg.hints;
|
|
7962
|
+
const texts = hints.map((h) => hintText(h, ctx.level, agg.evaluation.muted, kind2));
|
|
7963
|
+
const operations = operationsHint(ctx, kind2, key2, agg.count);
|
|
7964
|
+
if (operations !== null) texts.push(operations);
|
|
7127
7965
|
return join4(
|
|
7128
7966
|
html`<div class="kd">`,
|
|
7129
7967
|
keyHeader(ctx, kind2, key2, agg),
|
|
7130
|
-
|
|
7968
|
+
texts.length === 0 ? null : html`<ul class="hints">${texts.map((t) => html`<li>${icon("bulb")}${t}</li>`)}</ul>`,
|
|
7131
7969
|
statsGrid(ctx, kind2, agg),
|
|
7970
|
+
// 1.1.0 (11-REQ-61): after the stats grid, before the histogram.
|
|
7971
|
+
coldPart(agg),
|
|
7972
|
+
unsuccessfulPart(ctx, agg),
|
|
7973
|
+
workloadPart(kind2, agg),
|
|
7132
7974
|
distribution(ctx, agg),
|
|
7133
7975
|
checksTable(ctx, kind2, agg),
|
|
7134
7976
|
kind2 === "api" ? ttfbSplit(agg) : null,
|
|
@@ -7176,7 +8018,7 @@ function headroomCell(ctx, agg) {
|
|
|
7176
8018
|
if (top === void 0) return html`<td class="z">${DASH}</td>`;
|
|
7177
8019
|
return html`<td>${usageMeter(top)}</td>`;
|
|
7178
8020
|
}
|
|
7179
|
-
function
|
|
8021
|
+
function samplesCell2(ctx, kind2, agg) {
|
|
7180
8022
|
const note = notTimedNote(ctx, kind2, agg);
|
|
7181
8023
|
return html`<td class="num">${agg.successCount} / ${agg.count}${note === null ? null : html`<small class="why">${note}</small>`}</td>`;
|
|
7182
8024
|
}
|
|
@@ -7195,7 +8037,7 @@ function keyRow(ctx, kind2, key2, agg, columns, ttfb) {
|
|
|
7195
8037
|
reason === null ? null : html`<small class="why">${reason}</small>`,
|
|
7196
8038
|
html`</td>`,
|
|
7197
8039
|
headroomCell(ctx, agg),
|
|
7198
|
-
|
|
8040
|
+
samplesCell2(ctx, kind2, agg),
|
|
7199
8041
|
agg.errorCount === 0 ? html`<td class="num"></td>` : html`<td class="num e">${agg.errorCount}</td>`,
|
|
7200
8042
|
timeCell(s?.percentiles["p50"]),
|
|
7201
8043
|
s === null ? timeCell(void 0) : limitCell(
|
|
@@ -7614,7 +8456,18 @@ function rankings(ctx) {
|
|
|
7614
8456
|
return byKindThenKey(a, b);
|
|
7615
8457
|
};
|
|
7616
8458
|
const errorTone = (e) => e.agg.evaluation.result === "fail" ? "bad" : e.agg.errorCount > 0 ? "warn" : "";
|
|
7617
|
-
const
|
|
8459
|
+
const errorStatuses = ctx.report.config.checks?.errors?.statuses ?? DEFAULT_ERROR_STATUSES;
|
|
8460
|
+
const failed = (e) => {
|
|
8461
|
+
if (e.agg.nonSuccessCount === null) return e.agg.errorCount;
|
|
8462
|
+
let withoutStatus = 0;
|
|
8463
|
+
for (const [label, n] of Object.entries(e.agg.statuses)) {
|
|
8464
|
+
if (!/^\d{3}$/u.test(label) && isErrorStatus(label, errorStatuses)) withoutStatus += n;
|
|
8465
|
+
}
|
|
8466
|
+
return Math.max(e.agg.errorCount, e.agg.nonSuccessCount + withoutStatus);
|
|
8467
|
+
};
|
|
8468
|
+
const failedShare = (e) => failed(e) / e.agg.count;
|
|
8469
|
+
const failedTone = (e) => e.agg.evaluation.result === "fail" ? "bad" : failed(e) > 0 ? "warn" : "";
|
|
8470
|
+
const beyondErrors = all.some((e) => failed(e) > e.agg.errorCount);
|
|
7618
8471
|
const list2 = [
|
|
7619
8472
|
{
|
|
7620
8473
|
id: "slowest",
|
|
@@ -7638,13 +8491,16 @@ function rankings(ctx) {
|
|
|
7638
8491
|
},
|
|
7639
8492
|
{
|
|
7640
8493
|
id: "errors",
|
|
7641
|
-
|
|
7642
|
-
|
|
8494
|
+
// The 1.0.x name while no key fails beyond its errors (also a report migrated from v4).
|
|
8495
|
+
...beyondErrors ? {
|
|
8496
|
+
title: "Highest failure rate",
|
|
8497
|
+
note: "errors \xB7 non-success"
|
|
8498
|
+
} : { title: "Highest error rate", note: "errors" },
|
|
7643
8499
|
empty: "No errors in this run",
|
|
7644
|
-
entries: all.filter((e) => e
|
|
7645
|
-
size:
|
|
7646
|
-
tone:
|
|
7647
|
-
value: (e) => html`<b>${formatPercent(
|
|
8500
|
+
entries: all.filter((e) => failed(e) > 0).sort(order((e) => [failedShare(e), failed(e)])),
|
|
8501
|
+
size: failedShare,
|
|
8502
|
+
tone: failedTone,
|
|
8503
|
+
value: (e) => html`<b>${formatPercent(failedShare(e))}</b> · ${failed(e)} of ${e.agg.count}`
|
|
7648
8504
|
}
|
|
7649
8505
|
];
|
|
7650
8506
|
if (!ctx.migrated) {
|
|
@@ -7663,6 +8519,20 @@ function rankings(ctx) {
|
|
|
7663
8519
|
}
|
|
7664
8520
|
});
|
|
7665
8521
|
}
|
|
8522
|
+
const coldRatio = (e) => e.agg.cold?.ratio ?? 0;
|
|
8523
|
+
const cold2 = all.filter((e) => coldRatio(e) >= chunkVXGTC6DB_cjs.COLD_WARN_RATIO);
|
|
8524
|
+
if (cold2.length > 0) {
|
|
8525
|
+
list2.push({
|
|
8526
|
+
id: "cold",
|
|
8527
|
+
title: "Slowest first calls",
|
|
8528
|
+
note: "first call \xB7 warm p50",
|
|
8529
|
+
empty: "No slow first calls in this run",
|
|
8530
|
+
entries: cold2.sort(order((e) => [coldRatio(e)])),
|
|
8531
|
+
size: coldRatio,
|
|
8532
|
+
tone: () => "warn",
|
|
8533
|
+
value: (e) => html`<b>×${coldRatio(e).toFixed(1)}</b> · ${formatMs2(e.agg.cold?.max ?? 0)} vs ${formatMs2(e.agg.cold?.warmP50 ?? 0)}`
|
|
8534
|
+
});
|
|
8535
|
+
}
|
|
7666
8536
|
return list2;
|
|
7667
8537
|
}
|
|
7668
8538
|
function emptySmall(text2, name = "ok") {
|
|
@@ -7889,12 +8759,12 @@ function generatedSource(file) {
|
|
|
7889
8759
|
const tool2 = field2(generated, "tool");
|
|
7890
8760
|
const run = textOf(field2(generated, "sourceRunId"));
|
|
7891
8761
|
const at2 = textOf(field2(generated, "sourceRunStartedAt"));
|
|
7892
|
-
const
|
|
8762
|
+
const count4 = field2(generated, "sourceSampleCount");
|
|
7893
8763
|
return [
|
|
7894
8764
|
`generated by ${textOf(field2(tool2, "name")) ?? "unknown"} v${textOf(field2(tool2, "version")) ?? "?"}`,
|
|
7895
8765
|
run === null ? "" : ` from run ${run}`,
|
|
7896
8766
|
at2 === null ? "" : ` (${formatDate(at2)})`,
|
|
7897
|
-
typeof
|
|
8767
|
+
typeof count4 === "number" ? `, ${plural3(count4, "sample")}` : ""
|
|
7898
8768
|
].join("");
|
|
7899
8769
|
}
|
|
7900
8770
|
function sourceCell(file) {
|
|
@@ -7980,6 +8850,36 @@ function configurationSection(report) {
|
|
|
7980
8850
|
html`<pre><code>${stableJson(report.config, " ")}</code></pre></details></section>`
|
|
7981
8851
|
);
|
|
7982
8852
|
}
|
|
8853
|
+
function shardsSection(report) {
|
|
8854
|
+
const shards = report.shards;
|
|
8855
|
+
if (shards === null) return null;
|
|
8856
|
+
const rows = [
|
|
8857
|
+
...shards.list.map((s) => ({
|
|
8858
|
+
index: s.index,
|
|
8859
|
+
row: join4(
|
|
8860
|
+
html`<tr><th scope="row">${s.index}/${shards.total}</th><td class="num">${formatRunDuration(s.startedAt, s.finishedAt)}</td>`,
|
|
8861
|
+
html`<td class="num">${s.tests.expected + s.tests.unexpected + s.tests.flaky}</td><td class="num">${s.samples}</td>`,
|
|
8862
|
+
html`<td>${passesText(s.passes)}</td><td>${s.host.cpuModel === "" ? "unknown" : s.host.cpuModel} (${s.host.platform} ${s.host.arch})</td>`,
|
|
8863
|
+
html`<td>${buildLink(s.buildUrl)}</td></tr>`
|
|
8864
|
+
)
|
|
8865
|
+
})),
|
|
8866
|
+
...shards.missing.map((index) => ({
|
|
8867
|
+
index,
|
|
8868
|
+
row: html`<tr><th scope="row">${index}/${shards.total}</th><td colspan="6">missing: no shard file</td></tr>`
|
|
8869
|
+
}))
|
|
8870
|
+
].sort((a, b) => a.index - b.index);
|
|
8871
|
+
return card(
|
|
8872
|
+
"shards-h",
|
|
8873
|
+
"Shards",
|
|
8874
|
+
html`<p class="card-p">Merged from ${shards.list.length} of ${plural3(shards.total, "shard")} with PW_PERF_MODE=merge.</p>`,
|
|
8875
|
+
join4(
|
|
8876
|
+
html`<div class="scroll" tabindex="0" role="region" aria-label="Shards table"><table><caption>Shards</caption><thead><tr>`,
|
|
8877
|
+
html`<th scope="col">Shard</th><th scope="col" class="num">Duration</th><th scope="col" class="num">Tests</th>`,
|
|
8878
|
+
html`<th scope="col" class="num">Samples</th><th scope="col">Passes</th><th scope="col">Machine</th><th scope="col">Build</th>`,
|
|
8879
|
+
html`</tr></thead><tbody>${rows.map((r2) => r2.row)}</tbody></table></div>`
|
|
8880
|
+
)
|
|
8881
|
+
);
|
|
8882
|
+
}
|
|
7983
8883
|
function runTab(report) {
|
|
7984
8884
|
return join4(
|
|
7985
8885
|
html`<div class="grid2"><div>`,
|
|
@@ -7988,6 +8888,7 @@ function runTab(report) {
|
|
|
7988
8888
|
originsSection(report),
|
|
7989
8889
|
conditionsSection(report),
|
|
7990
8890
|
html`</div></div>`,
|
|
8891
|
+
shardsSection(report),
|
|
7991
8892
|
thresholdsSection(report),
|
|
7992
8893
|
configurationSection(report)
|
|
7993
8894
|
);
|
|
@@ -8088,10 +8989,18 @@ function testsTab(ctx) {
|
|
|
8088
8989
|
}
|
|
8089
8990
|
|
|
8090
8991
|
// src/html/render.ts
|
|
8091
|
-
var DOCS_URL = `${
|
|
8992
|
+
var DOCS_URL = `${chunkVXGTC6DB_cjs.REPOSITORY_URL}#readme`;
|
|
8092
8993
|
function chip2(name, content) {
|
|
8093
8994
|
return html`<span class="chip">${icon(name)}${content}</span>`;
|
|
8094
8995
|
}
|
|
8996
|
+
function shardsChip(report) {
|
|
8997
|
+
const shards = report.shards;
|
|
8998
|
+
if (shards === null) return null;
|
|
8999
|
+
if (shards.missing.length === 0) {
|
|
9000
|
+
return chip2("env", html`merged from <b>${plural3(shards.total, "shard")}</b>`);
|
|
9001
|
+
}
|
|
9002
|
+
return html`<span class="chip warn">${icon("warn")}<b>${String(shards.list.length)} of ${plural3(shards.total, "shard")}</b></span>`;
|
|
9003
|
+
}
|
|
8095
9004
|
function header2(report) {
|
|
8096
9005
|
const ci = report.ci;
|
|
8097
9006
|
return join4(
|
|
@@ -8102,6 +9011,7 @@ function header2(report) {
|
|
|
8102
9011
|
html`<div class="meta" role="group" aria-label="Run details" tabindex="0">`,
|
|
8103
9012
|
report.env === null ? null : chip2("env", html`env <b>${report.env}</b>`),
|
|
8104
9013
|
chip2("play", html`mode <b>${report.mode}</b>`),
|
|
9014
|
+
shardsChip(report),
|
|
8105
9015
|
chip2("clock", html`<b>${formatDate(report.startedAt).slice(0, -4)}</b> UTC`),
|
|
8106
9016
|
ci === null || ci.branch === null && ci.commit === null ? null : chip2(
|
|
8107
9017
|
"branch",
|
|
@@ -8216,7 +9126,7 @@ function keyDialog() {
|
|
|
8216
9126
|
);
|
|
8217
9127
|
}
|
|
8218
9128
|
function footer(report) {
|
|
8219
|
-
return html`<footer><div class="wrap">Generated by <a href="${
|
|
9129
|
+
return html`<footer><div class="wrap">Generated by <a href="${chunkVXGTC6DB_cjs.REPOSITORY_URL}" rel="noopener noreferrer">${report.tool.name}</a> v${report.tool.version}</div></footer>`;
|
|
8220
9130
|
}
|
|
8221
9131
|
var CONTENT_SECURITY_POLICY = `default-src 'none'; script-src 'sha256-${SCRIPT_SHA256}'; style-src 'sha256-${STYLES_SHA256}'; img-src data:`;
|
|
8222
9132
|
function renderHtmlReport(report) {
|
|
@@ -8227,7 +9137,7 @@ function renderHtmlReport(report) {
|
|
|
8227
9137
|
html`<meta http-equiv="Content-Security-Policy" content="${CONTENT_SECURITY_POLICY}">`,
|
|
8228
9138
|
html`<meta name="viewport" content="width=device-width, initial-scale=1">`,
|
|
8229
9139
|
html`<meta name="color-scheme" content="light dark">`,
|
|
8230
|
-
html`<meta name="generator" content="${`${
|
|
9140
|
+
html`<meta name="generator" content="${`${chunkVXGTC6DB_cjs.PACKAGE_NAME} ${report.tool.version}`}">`,
|
|
8231
9141
|
html`<link rel="icon" type="image/svg+xml" href="${FAVICON_URI}"><title>${report.suite === void 0 ? "" : `${report.suite.name} \xB7 `}Performance report ${report.runId}</title>`,
|
|
8232
9142
|
html`<style>${trustedHtml(STYLES)}</style></head>`
|
|
8233
9143
|
);
|
|
@@ -8398,12 +9308,17 @@ var JournalAggregator = class extends Aggregator {
|
|
|
8398
9308
|
super.endResult(meta);
|
|
8399
9309
|
this.journal?.push(["e", meta]);
|
|
8400
9310
|
}
|
|
9311
|
+
startSegment() {
|
|
9312
|
+
super.startSegment();
|
|
9313
|
+
this.journal?.push(["p"]);
|
|
9314
|
+
}
|
|
8401
9315
|
};
|
|
8402
9316
|
function replayEntries(aggregator, entries2) {
|
|
8403
9317
|
for (const entry of entries2) {
|
|
8404
9318
|
if (entry[0] === "r") aggregator.addRequest(entry[1], entry[2], entry[3], entry[4], entry[5]);
|
|
8405
9319
|
else if (entry[0] === "s") aggregator.addStep(entry[1]);
|
|
8406
|
-
else aggregator.endResult(entry[1]);
|
|
9320
|
+
else if (entry[0] === "e") aggregator.endResult(entry[1]);
|
|
9321
|
+
else aggregator.startSegment();
|
|
8407
9322
|
}
|
|
8408
9323
|
}
|
|
8409
9324
|
function isRecord2(value) {
|
|
@@ -8537,7 +9452,7 @@ function cleanReportDir(io, input) {
|
|
|
8537
9452
|
if (refusal2 !== null) {
|
|
8538
9453
|
return warning(
|
|
8539
9454
|
`it ${refusal2}`,
|
|
8540
|
-
`Set report.dir to a folder used only for the results of this package (default ${
|
|
9455
|
+
`Set report.dir to a folder used only for the results of this package (default ${chunkVYODYUEL_cjs.DEFAULT_CONFIG.report.dir}); files of earlier runs in it were kept.`
|
|
8541
9456
|
);
|
|
8542
9457
|
}
|
|
8543
9458
|
try {
|
|
@@ -8551,6 +9466,63 @@ function cleanReportDir(io, input) {
|
|
|
8551
9466
|
return null;
|
|
8552
9467
|
}
|
|
8553
9468
|
|
|
9469
|
+
// src/reporter/shard-file.ts
|
|
9470
|
+
function shardFileName(shard) {
|
|
9471
|
+
return `shard-${String(shard.current)}-of-${String(shard.total)}.json`;
|
|
9472
|
+
}
|
|
9473
|
+
|
|
9474
|
+
// src/console/shard-summary.ts
|
|
9475
|
+
function count3(n) {
|
|
9476
|
+
return n.toLocaleString("en-US");
|
|
9477
|
+
}
|
|
9478
|
+
function formatShardSummary(input, opts) {
|
|
9479
|
+
const { current, total } = input.shard;
|
|
9480
|
+
const runs = input.tests * input.passes;
|
|
9481
|
+
const all = input.samples.api + input.samples.step;
|
|
9482
|
+
const rows = [
|
|
9483
|
+
[
|
|
9484
|
+
"Tests",
|
|
9485
|
+
`${plural2(input.tests, "test")} \xD7 ${plural2(input.passes, "pass", "passes")} = ${plural2(runs, "test run")}`
|
|
9486
|
+
],
|
|
9487
|
+
[
|
|
9488
|
+
"Samples",
|
|
9489
|
+
`${count3(all)} (api ${count3(input.samples.api)} \xB7 step ${count3(input.samples.step)})`
|
|
9490
|
+
],
|
|
9491
|
+
["Data", input.data]
|
|
9492
|
+
];
|
|
9493
|
+
if (input.warnings > 0)
|
|
9494
|
+
rows.push(["Warnings", `${String(input.warnings)} (shown after the merge)`]);
|
|
9495
|
+
const icon2 = opts.ascii ? "" : "\u23F3 ";
|
|
9496
|
+
const lines = [
|
|
9497
|
+
...issueBox("error", input.toolErrors, Infinity, opts),
|
|
9498
|
+
...table(
|
|
9499
|
+
[
|
|
9500
|
+
{ header: "", style: "bold" },
|
|
9501
|
+
{ header: "", flex: true, minWidth: 10 }
|
|
9502
|
+
],
|
|
9503
|
+
rows.map((cells) => ({ cells })),
|
|
9504
|
+
{
|
|
9505
|
+
...opts,
|
|
9506
|
+
border: "cyan",
|
|
9507
|
+
header: false,
|
|
9508
|
+
title: `${icon2}${input.packageName} \xB7 shard ${String(current)}/${String(total)} done`
|
|
9509
|
+
}
|
|
9510
|
+
)
|
|
9511
|
+
];
|
|
9512
|
+
return `${lines.join("\n")}
|
|
9513
|
+
`;
|
|
9514
|
+
}
|
|
9515
|
+
function shardOutcomeLine(outcome, path) {
|
|
9516
|
+
const playwright = outcome.tests.status === "passed" && outcome.exitCode === 0 ? 0 : 1;
|
|
9517
|
+
const details = outcome.exitCode === 0 ? "shard data written" : "shard data incomplete";
|
|
9518
|
+
return `Outcome: Playwright exit code ${String(playwright)} \xB7 details: ${details} (code ${String(outcome.exitCode)}) in ${path}
|
|
9519
|
+
`;
|
|
9520
|
+
}
|
|
9521
|
+
function mergeOutcomeLine(outcome, path) {
|
|
9522
|
+
return `Outcome: ${performanceText(outcome)} (code ${String(outcome.exitCode)}) in ${path}
|
|
9523
|
+
`;
|
|
9524
|
+
}
|
|
9525
|
+
|
|
8554
9526
|
// src/reporter/samples.ts
|
|
8555
9527
|
function testTitle(test) {
|
|
8556
9528
|
const titles = [test.title];
|
|
@@ -8579,7 +9551,7 @@ function testMeta(test, result2, file) {
|
|
|
8579
9551
|
};
|
|
8580
9552
|
}
|
|
8581
9553
|
function sampleAttachments(result2) {
|
|
8582
|
-
return result2.attachments.filter((a) => a.name ===
|
|
9554
|
+
return result2.attachments.filter((a) => a.name === chunkVXGTC6DB_cjs.SAMPLES_ATTACHMENT_NAME).map((a) => a.body === void 0 ? "" : a.body.toString("utf8"));
|
|
8583
9555
|
}
|
|
8584
9556
|
function hasTraceOrVideo(result2) {
|
|
8585
9557
|
return result2.attachments.some((a) => a.name === "trace" || a.name === "video");
|
|
@@ -8588,6 +9560,9 @@ function hasTraceOrVideo(result2) {
|
|
|
8588
9560
|
// src/reporter/session.ts
|
|
8589
9561
|
var PENDING_TOP_KEYS = 5;
|
|
8590
9562
|
var DEFAULT_WIDTH = 120;
|
|
9563
|
+
var LONG_RUN_MS = 2 * 60 * 60 * 1e3;
|
|
9564
|
+
var MERGE_COMMAND = "PW_PERF_MODE=merge npx pw-perf";
|
|
9565
|
+
var MERGE_DIR = chunkVYODYUEL_cjs.DEFAULT_CONFIG.report.dir;
|
|
8591
9566
|
function runSettings(registered, env, packageVersion) {
|
|
8592
9567
|
if (registered !== void 0) {
|
|
8593
9568
|
return {
|
|
@@ -8603,10 +9578,10 @@ function runSettings(registered, env, packageVersion) {
|
|
|
8603
9578
|
perfConfigPassed: registered.perfConfigPassed ?? true
|
|
8604
9579
|
};
|
|
8605
9580
|
}
|
|
8606
|
-
const read2 =
|
|
9581
|
+
const read2 = chunkVXGTC6DB_cjs.readModeState(env);
|
|
8607
9582
|
if (read2.ok && read2.value === null) return null;
|
|
8608
9583
|
const mode2 = read2.ok && read2.value !== null ? read2.value : { mode: "test" };
|
|
8609
|
-
const resolved =
|
|
9584
|
+
const resolved = chunkVYODYUEL_cjs.resolveConfig(void 0, {
|
|
8610
9585
|
mode: mode2.mode === "check" ? "test" : mode2.mode,
|
|
8611
9586
|
...mode2.mode === "check" ? {} : mode2.pass !== void 0 ? { passes: mode2.pass.total } : mode2.passes === void 0 ? {} : { passes: mode2.passes },
|
|
8612
9587
|
...mode2.env === void 0 ? {} : { env: mode2.env },
|
|
@@ -8626,7 +9601,7 @@ function runSettings(registered, env, packageVersion) {
|
|
|
8626
9601
|
replacedReporters: []
|
|
8627
9602
|
},
|
|
8628
9603
|
registered: false,
|
|
8629
|
-
warnings: [
|
|
9604
|
+
warnings: [chunkVXGTC6DB_cjs.notWrappedWarning()],
|
|
8630
9605
|
toolErrors: read2.ok ? [] : read2.issues
|
|
8631
9606
|
};
|
|
8632
9607
|
}
|
|
@@ -8699,6 +9674,17 @@ var RunSession = class {
|
|
|
8699
9674
|
/** Measured projects with browser samples; the others with requests are request only (02-REQ-42). */
|
|
8700
9675
|
projectsWithBrowserRequests = /* @__PURE__ */ new Set();
|
|
8701
9676
|
playwrightVersion = "";
|
|
9677
|
+
/** FullConfig.shard of a perf-mode run (17-REQ-01); null without --shard. */
|
|
9678
|
+
shard = null;
|
|
9679
|
+
/** FullConfig.configFile, for the shard file (17-REQ-10). */
|
|
9680
|
+
configFile;
|
|
9681
|
+
/** Measured tests of one pass, for the shard summary (17-REQ-08). */
|
|
9682
|
+
passTests = 0;
|
|
9683
|
+
/** Machine and CI of the report: this process, or the shards in a merge (17-REQ-16). */
|
|
9684
|
+
hostInfo;
|
|
9685
|
+
ciInfo;
|
|
9686
|
+
/** The shard merge this session finishes (17-REQ-15); null in a Playwright run. */
|
|
9687
|
+
merging = null;
|
|
8702
9688
|
constructor(host, settings, options = {}) {
|
|
8703
9689
|
this.host = host;
|
|
8704
9690
|
this.settings = settings;
|
|
@@ -8706,7 +9692,7 @@ var RunSession = class {
|
|
|
8706
9692
|
this.warnings = [...settings.warnings];
|
|
8707
9693
|
this.toolErrors = [...settings.toolErrors];
|
|
8708
9694
|
this.startedAt = host.now();
|
|
8709
|
-
this.runId = settings.mode.runId ??
|
|
9695
|
+
this.runId = settings.mode.runId ?? chunkVXGTC6DB_cjs.generateRunId(this.startedAt, host.random);
|
|
8710
9696
|
this.configDir = host.cwd;
|
|
8711
9697
|
this.conditions = { workers: 1, projects: [], overriddenSettings: [] };
|
|
8712
9698
|
const keys = settings.config.keys;
|
|
@@ -8714,6 +9700,12 @@ var RunSession = class {
|
|
|
8714
9700
|
this.aggregator = this.createAggregator();
|
|
8715
9701
|
this.keyOf = createKeyBuilder(keys, { baseOrigins: [] });
|
|
8716
9702
|
this.steps = new StepRecorder(settings.config);
|
|
9703
|
+
this.hostInfo = host.host;
|
|
9704
|
+
this.ciInfo = host.ci;
|
|
9705
|
+
}
|
|
9706
|
+
/** A run of one shard writes a shard file instead of evaluating (17-REQ-05). */
|
|
9707
|
+
get sharded() {
|
|
9708
|
+
return this.shard !== null && !this.check && this.merging === null;
|
|
8717
9709
|
}
|
|
8718
9710
|
/** Mode of the run report; a check aggregates like a measurement run (04-REQ-48). */
|
|
8719
9711
|
get mode() {
|
|
@@ -8742,11 +9734,13 @@ var RunSession = class {
|
|
|
8742
9734
|
measuredProjects: this.measured,
|
|
8743
9735
|
dependencyProjects: this.dependencyOnly,
|
|
8744
9736
|
evaluatedPercentile: cfg.checks.time.percentile.level,
|
|
8745
|
-
rawUrls: cfg.report.rawUrls
|
|
9737
|
+
rawUrls: cfg.report.rawUrls,
|
|
9738
|
+
coldSamples: cfg.measure.coldSamples,
|
|
9739
|
+
minSamples: cfg.checks.time.median.minSamples
|
|
8746
9740
|
});
|
|
8747
9741
|
}
|
|
8748
9742
|
info(line) {
|
|
8749
|
-
this.host.stdout.write(`${
|
|
9743
|
+
this.host.stdout.write(`${chunkVXGTC6DB_cjs.PACKAGE_NAME}: ${line}
|
|
8750
9744
|
`);
|
|
8751
9745
|
}
|
|
8752
9746
|
/** A hook threw: the error goes to the report and the outcome file (01-REQ-16). */
|
|
@@ -8762,9 +9756,11 @@ var RunSession = class {
|
|
|
8762
9756
|
projects: fullConfig.projects.filter((p) => inRun.has(p.name))
|
|
8763
9757
|
};
|
|
8764
9758
|
this.configLike = config;
|
|
9759
|
+
this.configFile = config.configFile;
|
|
9760
|
+
this.shard = config.shard === null ? null : { ...config.shard };
|
|
8765
9761
|
this.startedAt = this.host.now();
|
|
8766
9762
|
if (this.settings.mode.runId === void 0) {
|
|
8767
|
-
this.runId =
|
|
9763
|
+
this.runId = chunkVXGTC6DB_cjs.generateRunId(this.startedAt, this.host.random);
|
|
8768
9764
|
}
|
|
8769
9765
|
const io = this.host.io;
|
|
8770
9766
|
this.configDir = config.configFile === void 0 ? config.rootDir : io.directoryOf(config.configFile);
|
|
@@ -8810,25 +9806,19 @@ var RunSession = class {
|
|
|
8810
9806
|
}
|
|
8811
9807
|
const duplicate = duplicateBaseUrlLabels(this.conditions, config, keys);
|
|
8812
9808
|
if (duplicate !== null) this.warnings.push(duplicate);
|
|
8813
|
-
const empty = emptyBaseUrlWarning(this.conditions, config);
|
|
9809
|
+
const empty = emptyBaseUrlWarning(this.conditions, config, this.baseUrlHint("test"));
|
|
8814
9810
|
if (empty !== null) this.warnings.push(empty);
|
|
8815
9811
|
if (this.settings.registered && this.settings.perfConfigPassed === false) {
|
|
8816
9812
|
const notPassed = configFileNotPassedWarning(io.listDirSync(this.configDir));
|
|
8817
9813
|
if (notPassed !== null) this.warnings.push(notPassed);
|
|
8818
9814
|
}
|
|
8819
|
-
if (this.settings.registered && this.measured.size === 0) {
|
|
9815
|
+
if (this.settings.registered && this.measured.size === 0 && inRun.size > 0) {
|
|
8820
9816
|
this.toolErrors.push(noMeasuredProjectError(inRun));
|
|
8821
9817
|
}
|
|
8822
|
-
if (config.shard !== null) {
|
|
8823
|
-
this.toolErrors.push({
|
|
8824
|
-
code: "RUN_SHARDED",
|
|
8825
|
-
message: `The perf-mode run is sharded (--shard ${config.shard.current}/${config.shard.total}): each machine would evaluate only part of the keys.`,
|
|
8826
|
-
hint: "Run perf mode on one machine without --shard."
|
|
8827
|
-
});
|
|
8828
|
-
}
|
|
8829
9818
|
this.beginWarnings = this.warnings.length;
|
|
8830
9819
|
this.beginToolErrors = this.toolErrors.length;
|
|
8831
|
-
|
|
9820
|
+
this.passTests = measuredTestCount(suite.allTests(), this.measured);
|
|
9821
|
+
if (this.passes > 1 || this.sharded) this.aggregator.journal = [];
|
|
8832
9822
|
if (this.passIndex > 1) {
|
|
8833
9823
|
this.info(`pass ${String(this.passIndex)}/${String(this.passes)} (perf mode "${this.mode}")`);
|
|
8834
9824
|
return;
|
|
@@ -8840,6 +9830,7 @@ var RunSession = class {
|
|
|
8840
9830
|
/** report.dir as an absolute path. */
|
|
8841
9831
|
reportDir() {
|
|
8842
9832
|
const io = this.host.io;
|
|
9833
|
+
if (this.merging !== null) return io.resolvePath(this.host.cwd, MERGE_DIR);
|
|
8843
9834
|
return io.resolvePath(this.configDir, this.settings.config.report.dir);
|
|
8844
9835
|
}
|
|
8845
9836
|
/** Removes pass-<k>.json files of an earlier run (02-REQ-36). */
|
|
@@ -8867,8 +9858,9 @@ var RunSession = class {
|
|
|
8867
9858
|
const cfg = this.settings.config;
|
|
8868
9859
|
const io = this.host.io;
|
|
8869
9860
|
const tests = measuredTestCount(suite.allTests(), this.measured);
|
|
8870
|
-
const file = cfg.report.html ? "report.html" : "report.json";
|
|
9861
|
+
const file = this.shard !== null ? shardFileName(this.shard) : cfg.report.html ? "report.html" : "report.json";
|
|
8871
9862
|
const { width, color } = this.terminal();
|
|
9863
|
+
const lastMs = this.check ? null : this.lastMsPerTest();
|
|
8872
9864
|
return formatStartBanner(
|
|
8873
9865
|
{
|
|
8874
9866
|
packageName: "pw-perf",
|
|
@@ -8877,11 +9869,14 @@ var RunSession = class {
|
|
|
8877
9869
|
dependencies: this.conditions.projects.filter((p) => p.role !== "measured").map((p) => p.name),
|
|
8878
9870
|
tests,
|
|
8879
9871
|
passes: this.passes,
|
|
8880
|
-
maxTests: this.settings.mode.maxTests ??
|
|
8881
|
-
estimate: this.check ? null : startEstimate({ tests, passes: this.passes, msPerTest:
|
|
9872
|
+
maxTests: this.settings.mode.maxTests ?? chunkVXGTC6DB_cjs.DEFAULT_MAX_TESTS,
|
|
9873
|
+
estimate: this.check ? null : startEstimate({ tests, passes: this.passes, msPerTest: lastMs }),
|
|
9874
|
+
// 17-REQ-25: a run without shards estimated above 2 hours could be split.
|
|
9875
|
+
long: !this.check && this.shard === null && lastMs !== null && tests * this.passes * lastMs > LONG_RUN_MS,
|
|
9876
|
+
shard: this.shard,
|
|
8882
9877
|
report: this.check ? null : io.relativeSlashPath(this.host.cwd, io.resolvePath(this.reportDir(), file)),
|
|
8883
9878
|
// run.grep already selects the measured subset (04-REQ-65, 04-D-51).
|
|
8884
|
-
tip: cfg.run.grep === null &&
|
|
9879
|
+
tip: cfg.run.grep === null && chunkVXGTC6DB_cjs.testFilters(chunkVXGTC6DB_cjs.testArgsFromArgv(this.host.argv)).length === 0
|
|
8885
9880
|
},
|
|
8886
9881
|
{ width, color, ascii: asciiTerminal(this.host.env) }
|
|
8887
9882
|
);
|
|
@@ -8939,7 +9934,7 @@ var RunSession = class {
|
|
|
8939
9934
|
if (bodies.length > 1) {
|
|
8940
9935
|
this.warnings.push({
|
|
8941
9936
|
code: "ATTACHMENT_DUPLICATE",
|
|
8942
|
-
message: `Test "${meta.title}" has ${bodies.length} ${
|
|
9937
|
+
message: `Test "${meta.title}" has ${bodies.length} ${chunkVXGTC6DB_cjs.SAMPLES_ATTACHMENT_NAME} attachments; all of them were processed.`,
|
|
8943
9938
|
hint: "Apply withPerfFixtures() once per test object."
|
|
8944
9939
|
});
|
|
8945
9940
|
}
|
|
@@ -9052,19 +10047,20 @@ var RunSession = class {
|
|
|
9052
10047
|
}
|
|
9053
10048
|
source() {
|
|
9054
10049
|
const browsers = this.conditions.projects.filter((p) => p.role === "measured" && p.browserName !== null).map((p) => p.browserName);
|
|
9055
|
-
const { nodeVersion: _, ...host } = this.
|
|
10050
|
+
const { nodeVersion: _, ...host } = this.hostInfo;
|
|
9056
10051
|
return {
|
|
9057
10052
|
browsers: [...new Set(browsers)].sort(),
|
|
9058
10053
|
playwrightVersion: this.playwrightVersion,
|
|
9059
10054
|
host,
|
|
9060
10055
|
normalization: this.normalization,
|
|
9061
|
-
stepNormalization: this.steps.fingerprint()
|
|
10056
|
+
stepNormalization: this.steps.fingerprint(),
|
|
10057
|
+
coldSamples: this.settings.config.measure.coldSamples
|
|
9062
10058
|
};
|
|
9063
10059
|
}
|
|
9064
10060
|
reportInput(status, finishedAt, aggregates, evaluation, warnings, toolErrors) {
|
|
9065
10061
|
return {
|
|
9066
10062
|
meta: {
|
|
9067
|
-
tool: { name:
|
|
10063
|
+
tool: { name: chunkVXGTC6DB_cjs.PACKAGE_NAME, version: this.settings.packageVersion },
|
|
9068
10064
|
runId: this.runId,
|
|
9069
10065
|
mode: this.mode,
|
|
9070
10066
|
startedAt: this.startedAt.toISOString(),
|
|
@@ -9072,8 +10068,8 @@ var RunSession = class {
|
|
|
9072
10068
|
env: this.settings.config.run.env,
|
|
9073
10069
|
configDir: this.configDir,
|
|
9074
10070
|
...this.suite === null ? {} : { suite: this.suite },
|
|
9075
|
-
ci: this.
|
|
9076
|
-
host: this.
|
|
10071
|
+
ci: this.ciInfo,
|
|
10072
|
+
host: this.hostInfo,
|
|
9077
10073
|
playwright: { version: this.playwrightVersion }
|
|
9078
10074
|
},
|
|
9079
10075
|
config: this.settings.snapshot,
|
|
@@ -9091,12 +10087,34 @@ var RunSession = class {
|
|
|
9091
10087
|
)
|
|
9092
10088
|
},
|
|
9093
10089
|
tests: this.testsResult(status),
|
|
10090
|
+
shards: this.shardsField(),
|
|
9094
10091
|
aggregates,
|
|
9095
10092
|
evaluation,
|
|
9096
10093
|
warnings,
|
|
9097
10094
|
toolErrors
|
|
9098
10095
|
};
|
|
9099
10096
|
}
|
|
10097
|
+
/** The shards field of the report (17-REQ-17): null without a merge. */
|
|
10098
|
+
shardsField() {
|
|
10099
|
+
if (this.merging === null) return null;
|
|
10100
|
+
const { input } = this.merging;
|
|
10101
|
+
return {
|
|
10102
|
+
total: input.total,
|
|
10103
|
+
missing: [...input.missing],
|
|
10104
|
+
list: input.shards.map((shard) => ({
|
|
10105
|
+
index: shard.shard.current,
|
|
10106
|
+
runId: shard.runId,
|
|
10107
|
+
startedAt: shard.startedAt,
|
|
10108
|
+
finishedAt: shard.finishedAt,
|
|
10109
|
+
status: shard.status,
|
|
10110
|
+
passes: { ...shard.passes, failed: [...shard.passes.failed] },
|
|
10111
|
+
tests: { status: shard.status, ...shard.tests },
|
|
10112
|
+
samples: shard.entries.filter((e) => e[0] === "r" || e[0] === "s").length,
|
|
10113
|
+
host: { ...shard.host },
|
|
10114
|
+
buildUrl: shard.ci?.buildUrl ?? null
|
|
10115
|
+
}))
|
|
10116
|
+
};
|
|
10117
|
+
}
|
|
9100
10118
|
terminal() {
|
|
9101
10119
|
const out = this.host.stdout;
|
|
9102
10120
|
return {
|
|
@@ -9110,24 +10128,28 @@ var RunSession = class {
|
|
|
9110
10128
|
*/
|
|
9111
10129
|
async end(result2) {
|
|
9112
10130
|
if (this.passIndex > 1) return this.endLaterPass(result2);
|
|
9113
|
-
|
|
10131
|
+
const emptyShard = this.sharded && !this.host.argv.includes("--list");
|
|
10132
|
+
if (this.testsStarted === 0 && !emptyShard) return void 0;
|
|
9114
10133
|
if (this.check) return this.endCheck(result2);
|
|
9115
10134
|
let status = result2.status;
|
|
9116
10135
|
let outcome;
|
|
9117
10136
|
try {
|
|
9118
10137
|
if (this.passes > 1) status = await this.runPasses(result2);
|
|
9119
|
-
outcome = await this.finish({ status });
|
|
10138
|
+
outcome = this.sharded ? await this.finishShard({ status }) : await this.finish({ status });
|
|
9120
10139
|
} catch (error) {
|
|
9121
10140
|
this.recordInternalError("onEnd", error);
|
|
9122
10141
|
outcome = this.fallbackOutcome({ status });
|
|
10142
|
+
if (this.sharded) outcome.evaluation.gateEnabled = false;
|
|
9123
10143
|
for (const issue2 of outcome.toolErrors) {
|
|
9124
|
-
this.host.stderr.write(`${
|
|
10144
|
+
this.host.stderr.write(`${chunkVXGTC6DB_cjs.PACKAGE_NAME}: ${issue2.code}: ${issue2.message}
|
|
9125
10145
|
`);
|
|
9126
10146
|
}
|
|
9127
10147
|
}
|
|
9128
10148
|
const written = await this.writeOutcome(outcome);
|
|
9129
10149
|
if (written !== null) {
|
|
9130
|
-
this.host.stdout.write(
|
|
10150
|
+
this.host.stdout.write(
|
|
10151
|
+
this.sharded ? shardOutcomeLine(outcome, written) : outcomeLine(outcome, written)
|
|
10152
|
+
);
|
|
9131
10153
|
}
|
|
9132
10154
|
if (this.next !== null) {
|
|
9133
10155
|
this.host.stdout.write(nextLine(this.next, this.terminal().color));
|
|
@@ -9174,12 +10196,12 @@ var RunSession = class {
|
|
|
9174
10196
|
await this.host.io.writeJsonStable(path, file);
|
|
9175
10197
|
} catch (error) {
|
|
9176
10198
|
this.host.stderr.write(
|
|
9177
|
-
`${
|
|
10199
|
+
`${chunkVXGTC6DB_cjs.PACKAGE_NAME}: ${label}: the pass file could not be written to ${path}: ${error instanceof Error ? error.message : String(error)}
|
|
9178
10200
|
`
|
|
9179
10201
|
);
|
|
9180
10202
|
return void 0;
|
|
9181
10203
|
}
|
|
9182
|
-
const samples = file.entries.filter((e) => e[0]
|
|
10204
|
+
const samples = file.entries.filter((e) => e[0] === "r" || e[0] === "s").length;
|
|
9183
10205
|
this.info(`${label} done: ${plural4(this.testsStarted, "test")}, ${plural4(samples, "sample")}.`);
|
|
9184
10206
|
return void 0;
|
|
9185
10207
|
}
|
|
@@ -9195,17 +10217,17 @@ var RunSession = class {
|
|
|
9195
10217
|
await io.writeJsonStable(this.passPath(1), this.passFile(status, this.host.now()));
|
|
9196
10218
|
} catch {
|
|
9197
10219
|
}
|
|
9198
|
-
this.aggregator.journal = null;
|
|
10220
|
+
if (!this.sharded) this.aggregator.journal = null;
|
|
9199
10221
|
const total = this.passes;
|
|
9200
10222
|
const info = io.readPackageInfo(this.host.cwd);
|
|
9201
10223
|
const passInput = {
|
|
9202
10224
|
execPath: this.host.execPath,
|
|
9203
10225
|
argv: this.host.argv,
|
|
9204
|
-
env: this.
|
|
10226
|
+
env: this.scriptEnv(info.scripts),
|
|
9205
10227
|
scripts: info.scripts
|
|
9206
10228
|
};
|
|
9207
|
-
const command =
|
|
9208
|
-
const shape =
|
|
10229
|
+
const command = chunkVXGTC6DB_cjs.passCommand(passInput);
|
|
10230
|
+
const shape = chunkVXGTC6DB_cjs.runShape(passInput);
|
|
9209
10231
|
const pm = packageManager({
|
|
9210
10232
|
userAgent: this.host.env["npm_config_user_agent"] ?? null,
|
|
9211
10233
|
lockFiles: info.lockFiles
|
|
@@ -9216,7 +10238,7 @@ var RunSession = class {
|
|
|
9216
10238
|
this.info(`${label}: ${shown}`);
|
|
9217
10239
|
const env = {
|
|
9218
10240
|
...this.host.env,
|
|
9219
|
-
...
|
|
10241
|
+
...chunkVXGTC6DB_cjs.writeModeState({ ...this.settings.mode, runId: this.runId, pass: { index, total } })
|
|
9220
10242
|
};
|
|
9221
10243
|
const exit = await this.host.runPass(command, env);
|
|
9222
10244
|
if (exit.error !== void 0) {
|
|
@@ -9258,6 +10280,7 @@ var RunSession = class {
|
|
|
9258
10280
|
});
|
|
9259
10281
|
continue;
|
|
9260
10282
|
}
|
|
10283
|
+
this.aggregator.startSegment();
|
|
9261
10284
|
this.mergePass(parsed.value);
|
|
9262
10285
|
status = worseStatus(status, parsed.value.status);
|
|
9263
10286
|
}
|
|
@@ -9265,6 +10288,11 @@ var RunSession = class {
|
|
|
9265
10288
|
}
|
|
9266
10289
|
/** Adds the data of a later pass to this run (04-REQ-64). */
|
|
9267
10290
|
mergePass(file) {
|
|
10291
|
+
this.mergeData(file);
|
|
10292
|
+
this.completedPasses += 1;
|
|
10293
|
+
}
|
|
10294
|
+
/** Adds the samples, counters and issues of a pass or shard file to this run. */
|
|
10295
|
+
mergeData(file) {
|
|
9268
10296
|
replayEntries(this.aggregator, file.entries);
|
|
9269
10297
|
for (const name of ["expected", "unexpected", "flaky", "skipped"]) {
|
|
9270
10298
|
this.mergedTests[name] += file.tests[name];
|
|
@@ -9282,12 +10310,11 @@ var RunSession = class {
|
|
|
9282
10310
|
}
|
|
9283
10311
|
this.warnings.push(...file.warnings);
|
|
9284
10312
|
this.toolErrors.push(...file.toolErrors);
|
|
9285
|
-
this.completedPasses += 1;
|
|
9286
10313
|
}
|
|
9287
10314
|
async finish(result2) {
|
|
9288
10315
|
const cfg = this.settings.config;
|
|
9289
10316
|
const io = this.host.io;
|
|
9290
|
-
const finishedAt = this.host.now();
|
|
10317
|
+
const finishedAt = this.merging?.finishedAt ?? this.host.now();
|
|
9291
10318
|
const warnings = [...this.warnings, ...this.runWarnings()];
|
|
9292
10319
|
const toolErrors = [...this.toolErrors];
|
|
9293
10320
|
const aggregates = this.aggregator.finalize();
|
|
@@ -9299,12 +10326,24 @@ var RunSession = class {
|
|
|
9299
10326
|
const pending = this.pendingWarning();
|
|
9300
10327
|
if (pending !== null) warnings.push(pending);
|
|
9301
10328
|
const tests = this.testsResult(result2.status);
|
|
9302
|
-
const assessment = assessRun(
|
|
9303
|
-
{ tests, maxFailures: this.maxFailures, sharded: false },
|
|
9304
|
-
cfg.gate
|
|
9305
|
-
);
|
|
10329
|
+
const assessment = assessRun({ tests, maxFailures: this.maxFailures }, cfg.gate);
|
|
9306
10330
|
warnings.push(...assessment.warnings);
|
|
9307
10331
|
toolErrors.push(...assessment.toolErrors);
|
|
10332
|
+
if (!toolErrors.some((issue2) => issue2.code === "RUN_INCOMPLETE")) {
|
|
10333
|
+
for (const shard of this.merging?.input.shards ?? []) {
|
|
10334
|
+
const stopped = assessRun(
|
|
10335
|
+
{ tests: { status: shard.status, ...shard.tests }, maxFailures: shard.maxFailures },
|
|
10336
|
+
{ maxFailedTestShare: 1 }
|
|
10337
|
+
).toolErrors.find((issue2) => issue2.code === "RUN_INCOMPLETE");
|
|
10338
|
+
if (stopped !== void 0) {
|
|
10339
|
+
toolErrors.push({
|
|
10340
|
+
...stopped,
|
|
10341
|
+
message: `Shard ${String(shard.shard.current)}/${String(shard.shard.total)}: ${stopped.message}`
|
|
10342
|
+
});
|
|
10343
|
+
break;
|
|
10344
|
+
}
|
|
10345
|
+
}
|
|
10346
|
+
}
|
|
9308
10347
|
const location = {
|
|
9309
10348
|
configDir: this.configDir,
|
|
9310
10349
|
dir: cfg.thresholds.dir,
|
|
@@ -9319,7 +10358,9 @@ var RunSession = class {
|
|
|
9319
10358
|
env: cfg.run.env,
|
|
9320
10359
|
fatalToolError: this.fatal,
|
|
9321
10360
|
source: this.source(),
|
|
9322
|
-
startedAt: this.startedAt.toISOString()
|
|
10361
|
+
startedAt: this.startedAt.toISOString(),
|
|
10362
|
+
passes: this.completedPasses,
|
|
10363
|
+
workers: this.conditions.workers
|
|
9323
10364
|
});
|
|
9324
10365
|
warnings.push(...evaluation.warnings);
|
|
9325
10366
|
toolErrors.push(...evaluation.toolErrors);
|
|
@@ -9327,7 +10368,7 @@ var RunSession = class {
|
|
|
9327
10368
|
this.reportInput(result2.status, finishedAt, aggregates, evaluation, warnings, toolErrors)
|
|
9328
10369
|
);
|
|
9329
10370
|
let report = build();
|
|
9330
|
-
const reportDir =
|
|
10371
|
+
const reportDir = this.reportDir();
|
|
9331
10372
|
const paths = {
|
|
9332
10373
|
reportJson: null,
|
|
9333
10374
|
reportHtml: null,
|
|
@@ -9389,7 +10430,8 @@ var RunSession = class {
|
|
|
9389
10430
|
width,
|
|
9390
10431
|
color,
|
|
9391
10432
|
ascii: asciiTerminal(this.host.env),
|
|
9392
|
-
html: paths.reportHtml !== null
|
|
10433
|
+
html: paths.reportHtml !== null,
|
|
10434
|
+
reportDir
|
|
9393
10435
|
})
|
|
9394
10436
|
);
|
|
9395
10437
|
const noSteps = this.steps.noStepsLine(Object.keys(aggregates.steps));
|
|
@@ -9402,7 +10444,7 @@ var RunSession = class {
|
|
|
9402
10444
|
width,
|
|
9403
10445
|
color,
|
|
9404
10446
|
prune: this.pruned,
|
|
9405
|
-
subset:
|
|
10447
|
+
subset: this.testFilterArgs().length > 0,
|
|
9406
10448
|
// Absolute, like the Report line of the summary (10, chapter 9.1; 09-REQ-30).
|
|
9407
10449
|
diffPath: paths.thresholdsDiff,
|
|
9408
10450
|
temporary,
|
|
@@ -9418,6 +10460,206 @@ var RunSession = class {
|
|
|
9418
10460
|
});
|
|
9419
10461
|
return buildOutcome(report, paths);
|
|
9420
10462
|
}
|
|
10463
|
+
/** Data of this shard for the merge (17-REQ-10). */
|
|
10464
|
+
shardFile(status, finishedAt, shard) {
|
|
10465
|
+
const io = this.host.io;
|
|
10466
|
+
const cwd = this.host.cwd;
|
|
10467
|
+
const { status: _, ...tests } = this.testsResult(status);
|
|
10468
|
+
return {
|
|
10469
|
+
format: "pw-perf-shard",
|
|
10470
|
+
schemaVersion: 1,
|
|
10471
|
+
toolVersion: this.settings.packageVersion,
|
|
10472
|
+
playwrightVersion: this.playwrightVersion,
|
|
10473
|
+
shard: { ...shard },
|
|
10474
|
+
runId: this.runId,
|
|
10475
|
+
mode: this.mode,
|
|
10476
|
+
env: this.settings.config.run.env,
|
|
10477
|
+
prune: this.settings.mode.prune === true,
|
|
10478
|
+
testFilter: chunkVXGTC6DB_cjs.testFilters(chunkVXGTC6DB_cjs.testArgsFromArgv(this.host.argv)).length > 0,
|
|
10479
|
+
maxFailures: this.maxFailures,
|
|
10480
|
+
paths: {
|
|
10481
|
+
configDir: io.relativeSlashPath(cwd, this.configDir),
|
|
10482
|
+
configFile: this.configFile === void 0 ? "" : io.relativeSlashPath(this.configDir, this.configFile),
|
|
10483
|
+
reportDir: io.relativeSlashPath(cwd, this.reportDir())
|
|
10484
|
+
},
|
|
10485
|
+
config: this.settings.snapshot,
|
|
10486
|
+
normalization: this.normalization,
|
|
10487
|
+
stepNormalization: this.steps.fingerprint(),
|
|
10488
|
+
projects: {
|
|
10489
|
+
measured: [...this.measured].sort(),
|
|
10490
|
+
dependencies: [...this.dependencyOnly].sort()
|
|
10491
|
+
},
|
|
10492
|
+
startedAt: this.startedAt.toISOString(),
|
|
10493
|
+
finishedAt: finishedAt.toISOString(),
|
|
10494
|
+
status,
|
|
10495
|
+
passes: {
|
|
10496
|
+
planned: this.passes,
|
|
10497
|
+
completed: this.completedPasses,
|
|
10498
|
+
failed: [...this.failedPasses].sort((a, b) => a - b)
|
|
10499
|
+
},
|
|
10500
|
+
host: this.hostInfo,
|
|
10501
|
+
ci: this.ciInfo,
|
|
10502
|
+
// Without requestOnly: the merge decides it from the counters of all shards (02-REQ-42).
|
|
10503
|
+
runConditions: structuredClone(this.conditions),
|
|
10504
|
+
tests,
|
|
10505
|
+
counters: {
|
|
10506
|
+
testsStarted: this.testsStarted,
|
|
10507
|
+
notInstrumented: { ...this.notInstrumented },
|
|
10508
|
+
crashedTests: { ...this.crashedTests },
|
|
10509
|
+
withArtifacts: this.withArtifacts,
|
|
10510
|
+
instrumentedProjects: [...this.instrumentedProjects].sort(),
|
|
10511
|
+
projectsWithRequests: [...this.projectsWithRequests].sort(),
|
|
10512
|
+
projectsWithBrowserRequests: [...this.projectsWithBrowserRequests].sort(),
|
|
10513
|
+
pending: Object.fromEntries([...this.pending].sort((a, b) => a[0] < b[0] ? -1 : 1))
|
|
10514
|
+
},
|
|
10515
|
+
beginWarnings: this.warnings.slice(0, this.beginWarnings),
|
|
10516
|
+
beginToolErrors: this.toolErrors.slice(0, this.beginToolErrors),
|
|
10517
|
+
// The step redactions stay in this process; their warning travels with the file (06-REQ-37).
|
|
10518
|
+
warnings: [...this.warnings.slice(this.beginWarnings), ...this.steps.issues([])],
|
|
10519
|
+
toolErrors: this.toolErrors.slice(this.beginToolErrors),
|
|
10520
|
+
entries: this.aggregator.journal ?? []
|
|
10521
|
+
};
|
|
10522
|
+
}
|
|
10523
|
+
/**
|
|
10524
|
+
* End of a shard (17-REQ-05…08): the shard file and the shard summary, no evaluation, no report
|
|
10525
|
+
* and no thresholds files. The outcome has exit code 0, or 3 with tool errors.
|
|
10526
|
+
*/
|
|
10527
|
+
async finishShard(result2) {
|
|
10528
|
+
const shard = this.shard;
|
|
10529
|
+
const io = this.host.io;
|
|
10530
|
+
const finishedAt = this.host.now();
|
|
10531
|
+
const file = this.shardFile(result2.status, finishedAt, shard);
|
|
10532
|
+
const toolErrors = [...this.toolErrors];
|
|
10533
|
+
toolErrors.push(
|
|
10534
|
+
...assessRun(
|
|
10535
|
+
{ tests: this.testsResult(result2.status), maxFailures: 0 },
|
|
10536
|
+
{ maxFailedTestShare: 1 }
|
|
10537
|
+
).toolErrors
|
|
10538
|
+
);
|
|
10539
|
+
const path = io.resolvePath(this.reportDir(), shardFileName(shard));
|
|
10540
|
+
try {
|
|
10541
|
+
await io.writeJsonStable(path, file);
|
|
10542
|
+
} catch (error) {
|
|
10543
|
+
toolErrors.push({
|
|
10544
|
+
code: "SHARD_WRITE_FAILED",
|
|
10545
|
+
message: `The shard file could not be written to ${path}: ${error instanceof Error ? error.message : String(error)}`,
|
|
10546
|
+
hint: "Check that report.dir is writable; the merge needs the file of every shard."
|
|
10547
|
+
});
|
|
10548
|
+
}
|
|
10549
|
+
const samples = { api: 0, step: 0 };
|
|
10550
|
+
for (const entry of file.entries) {
|
|
10551
|
+
if (entry[0] === "r") samples.api += 1;
|
|
10552
|
+
else if (entry[0] === "s") samples.step += 1;
|
|
10553
|
+
}
|
|
10554
|
+
const { width, color } = this.terminal();
|
|
10555
|
+
const warnings = collapseIssues([...file.beginWarnings, ...file.warnings]).length;
|
|
10556
|
+
this.host.stdout.write(
|
|
10557
|
+
formatShardSummary(
|
|
10558
|
+
{
|
|
10559
|
+
packageName: "pw-perf",
|
|
10560
|
+
shard,
|
|
10561
|
+
tests: this.passTests,
|
|
10562
|
+
passes: this.passes,
|
|
10563
|
+
samples,
|
|
10564
|
+
data: io.relativeSlashPath(this.host.cwd, path),
|
|
10565
|
+
warnings,
|
|
10566
|
+
toolErrors: collapseIssues(toolErrors)
|
|
10567
|
+
},
|
|
10568
|
+
{ width, color, ascii: asciiTerminal(this.host.env) }
|
|
10569
|
+
)
|
|
10570
|
+
);
|
|
10571
|
+
this.next = toolErrors.length > 0 ? null : `when all ${String(shard.total)} shards are done, run ${MERGE_COMMAND} in the merge job`;
|
|
10572
|
+
return {
|
|
10573
|
+
schemaVersion: SCHEMA_VERSIONS.outcome,
|
|
10574
|
+
runId: this.runId,
|
|
10575
|
+
mode: this.mode,
|
|
10576
|
+
exitCode: toolErrors.length > 0 ? 3 : 0,
|
|
10577
|
+
tests: { status: result2.status },
|
|
10578
|
+
evaluation: { status: toolErrors.length > 0 ? "error" : "passed", gateEnabled: false },
|
|
10579
|
+
toolErrors: collapseIssues(toolErrors),
|
|
10580
|
+
paths: { reportJson: null, reportHtml: null, thresholds: [], thresholdsDiff: null }
|
|
10581
|
+
};
|
|
10582
|
+
}
|
|
10583
|
+
/**
|
|
10584
|
+
* The shard merge (17-REQ-15…20): replays the shard files in one aggregator, each shard a new
|
|
10585
|
+
* segment for the cold samples, and finishes like the first pass of a run without shards.
|
|
10586
|
+
* Writes outcome.json and returns its exit code.
|
|
10587
|
+
*/
|
|
10588
|
+
async merge(input) {
|
|
10589
|
+
const first2 = input.shards[0];
|
|
10590
|
+
if (first2 === void 0) throw new Error("merge without shard files");
|
|
10591
|
+
const io = this.host.io;
|
|
10592
|
+
const latest = input.shards.reduce(
|
|
10593
|
+
(max, shard) => shard.finishedAt > max ? shard.finishedAt : max,
|
|
10594
|
+
first2.finishedAt
|
|
10595
|
+
);
|
|
10596
|
+
const earliest = input.shards.reduce(
|
|
10597
|
+
(min, shard) => shard.startedAt < min ? shard.startedAt : min,
|
|
10598
|
+
first2.startedAt
|
|
10599
|
+
);
|
|
10600
|
+
this.merging = { input, finishedAt: new Date(latest) };
|
|
10601
|
+
this.startedAt = new Date(earliest);
|
|
10602
|
+
this.configDir = input.configDir;
|
|
10603
|
+
this.configFile = first2.paths.configFile === "" ? void 0 : io.resolvePath(input.configDir, first2.paths.configFile);
|
|
10604
|
+
this.suite = io.readSuite(this.configDir, this.configFile);
|
|
10605
|
+
this.playwrightVersion = first2.playwrightVersion;
|
|
10606
|
+
this.normalization = first2.normalization;
|
|
10607
|
+
this.conditions = first2.runConditions;
|
|
10608
|
+
this.measured = new Set(first2.projects.measured);
|
|
10609
|
+
this.dependencyOnly = new Set(first2.projects.dependencies);
|
|
10610
|
+
this.hostInfo = first2.host;
|
|
10611
|
+
this.ciInfo = this.host.ci ?? first2.ci;
|
|
10612
|
+
this.aggregator = this.createAggregator();
|
|
10613
|
+
const seen = /* @__PURE__ */ new Set();
|
|
10614
|
+
for (const shard of input.shards) {
|
|
10615
|
+
for (const issue2 of shard.beginWarnings) {
|
|
10616
|
+
const id = `${issue2.code}\0${issue2.message}`;
|
|
10617
|
+
if (seen.has(id)) continue;
|
|
10618
|
+
seen.add(id);
|
|
10619
|
+
this.warnings.push(issue2);
|
|
10620
|
+
}
|
|
10621
|
+
}
|
|
10622
|
+
const seenErrors = /* @__PURE__ */ new Set();
|
|
10623
|
+
for (const shard of input.shards) {
|
|
10624
|
+
for (const issue2 of shard.beginToolErrors) {
|
|
10625
|
+
const id = `${issue2.code}\0${issue2.message}`;
|
|
10626
|
+
if (seenErrors.has(id)) continue;
|
|
10627
|
+
seenErrors.add(id);
|
|
10628
|
+
this.toolErrors.push(issue2);
|
|
10629
|
+
}
|
|
10630
|
+
}
|
|
10631
|
+
this.completedPasses = Math.min(...input.shards.map((shard) => shard.passes.completed));
|
|
10632
|
+
let status = "passed";
|
|
10633
|
+
const failed = /* @__PURE__ */ new Set();
|
|
10634
|
+
for (const shard of input.shards) {
|
|
10635
|
+
this.aggregator.startSegment();
|
|
10636
|
+
this.mergeData(shard);
|
|
10637
|
+
for (const n of shard.passes.failed) failed.add(n);
|
|
10638
|
+
status = worseStatus(status, shard.status);
|
|
10639
|
+
}
|
|
10640
|
+
this.failedPasses.push(...[...failed].sort((a, b) => a - b));
|
|
10641
|
+
this.warnings.push(...input.warnings);
|
|
10642
|
+
this.toolErrors.push(...input.toolErrors);
|
|
10643
|
+
let outcome;
|
|
10644
|
+
try {
|
|
10645
|
+
outcome = await this.finish({ status });
|
|
10646
|
+
} catch (error) {
|
|
10647
|
+
this.toolErrors.push({
|
|
10648
|
+
code: "MERGE_INTERNAL_ERROR",
|
|
10649
|
+
message: `Unexpected error in the merge: ${error instanceof Error ? error.stack ?? error.message : String(error)}`,
|
|
10650
|
+
hint: "This is a bug in the package; please report it with the message above."
|
|
10651
|
+
});
|
|
10652
|
+
outcome = { ...this.fallbackOutcome({ status }) };
|
|
10653
|
+
for (const issue2 of outcome.toolErrors) {
|
|
10654
|
+
this.host.stderr.write(`${chunkVXGTC6DB_cjs.PACKAGE_NAME}: ${issue2.code}: ${issue2.message}
|
|
10655
|
+
`);
|
|
10656
|
+
}
|
|
10657
|
+
}
|
|
10658
|
+
const written = await this.writeOutcome(outcome);
|
|
10659
|
+
if (written !== null) this.host.stdout.write(mergeOutcomeLine(outcome, written));
|
|
10660
|
+
if (this.next !== null) this.host.stdout.write(nextLine(this.next, this.terminal().color));
|
|
10661
|
+
return outcome.exitCode;
|
|
10662
|
+
}
|
|
9421
10663
|
countCheck(test, result2, measured) {
|
|
9422
10664
|
const c = this.checkRun;
|
|
9423
10665
|
const duration = result2.duration ?? 0;
|
|
@@ -9452,7 +10694,7 @@ var RunSession = class {
|
|
|
9452
10694
|
if (this.settings.mode.runId !== void 0) {
|
|
9453
10695
|
try {
|
|
9454
10696
|
this.host.io.removeFileSync(
|
|
9455
|
-
this.host.io.tempPath(
|
|
10697
|
+
this.host.io.tempPath(chunkVXGTC6DB_cjs.checkStateFileName(this.settings.mode.runId))
|
|
9456
10698
|
);
|
|
9457
10699
|
} catch {
|
|
9458
10700
|
}
|
|
@@ -9467,7 +10709,7 @@ var RunSession = class {
|
|
|
9467
10709
|
const aggregates = this.aggregator.finalize();
|
|
9468
10710
|
const tests = this.testsResult(result2.status);
|
|
9469
10711
|
const assessment = assessRun(
|
|
9470
|
-
{ tests, maxFailures: this.maxFailures
|
|
10712
|
+
{ tests, maxFailures: this.maxFailures },
|
|
9471
10713
|
{ maxFailedTestShare: 1 }
|
|
9472
10714
|
);
|
|
9473
10715
|
const toolErrors = [...this.toolErrors, ...assessment.toolErrors];
|
|
@@ -9490,7 +10732,7 @@ var RunSession = class {
|
|
|
9490
10732
|
warnings.push({
|
|
9491
10733
|
code: "CONFIG_BASEURL_EMPTY",
|
|
9492
10734
|
message: `Measured ${unset.length === 1 ? "project" : "projects"} ${unset.join(", ")} ${unset.length === 1 ? "has" : "have"} no use.baseURL.`,
|
|
9493
|
-
hint: "
|
|
10735
|
+
hint: this.baseUrlHint("check")
|
|
9494
10736
|
});
|
|
9495
10737
|
}
|
|
9496
10738
|
const keys = cfg.keys;
|
|
@@ -9514,12 +10756,12 @@ var RunSession = class {
|
|
|
9514
10756
|
[...new Set(candidates)].filter((o) => !coveredByOrigins(keys.origins, o)).map((origin) => ({ origin, base: baseSet.has(origin) }))
|
|
9515
10757
|
);
|
|
9516
10758
|
if (random !== null) warnings.push(random);
|
|
9517
|
-
const patterns =
|
|
10759
|
+
const patterns = chunkVYODYUEL_cjs.compileHostPatterns(keys.origins);
|
|
9518
10760
|
const exact = new Set(
|
|
9519
|
-
Object.keys(keys.origins).filter((k) => !
|
|
10761
|
+
Object.keys(keys.origins).filter((k) => !chunkVYODYUEL_cjs.isHostPattern(k)).flatMap((k) => URL.canParse(k) ? [new URL(k).origin] : [])
|
|
9520
10762
|
);
|
|
9521
10763
|
const origins = [...aggregates.origins].sort((a, b) => b.requestCount - a.requestCount || (a.origin < b.origin ? -1 : 1)).map((o) => {
|
|
9522
|
-
const pattern = URL.canParse(o.origin) ?
|
|
10764
|
+
const pattern = URL.canParse(o.origin) ? chunkVYODYUEL_cjs.matchingPattern(patterns, new URL(o.origin)) : null;
|
|
9523
10765
|
const source = exact.has(o.origin) ? "keys.origins" : pattern !== null ? `keys.origins pattern ${pattern.canonical}` : baseSet.has(o.origin) ? "baseURL" : "host";
|
|
9524
10766
|
return { origin: o.origin, label: o.label, requests: o.requestCount, source };
|
|
9525
10767
|
});
|
|
@@ -9605,7 +10847,8 @@ var RunSession = class {
|
|
|
9605
10847
|
passesThresholds: cfg.run.passes.thresholds,
|
|
9606
10848
|
meanMs,
|
|
9607
10849
|
setupMs: c.setupMs
|
|
9608
|
-
})
|
|
10850
|
+
}),
|
|
10851
|
+
shard: this.shard
|
|
9609
10852
|
},
|
|
9610
10853
|
{ width, color, ascii: asciiTerminal(this.host.env) }
|
|
9611
10854
|
)
|
|
@@ -9625,14 +10868,29 @@ var RunSession = class {
|
|
|
9625
10868
|
}
|
|
9626
10869
|
/** The words the run added to the test command, as for the next pass (09-REQ-32, 04-REQ-63). */
|
|
9627
10870
|
runArgs() {
|
|
9628
|
-
const
|
|
10871
|
+
const { scripts } = this.host.io.readPackageInfo(this.host.cwd);
|
|
10872
|
+
const shape = chunkVXGTC6DB_cjs.runShape({
|
|
9629
10873
|
execPath: this.host.execPath,
|
|
9630
10874
|
argv: this.host.argv,
|
|
9631
|
-
env: this.
|
|
9632
|
-
scripts
|
|
10875
|
+
env: this.scriptEnv(scripts),
|
|
10876
|
+
scripts
|
|
9633
10877
|
});
|
|
9634
10878
|
return { script: shape.script !== null, tail: shape.tail };
|
|
9635
10879
|
}
|
|
10880
|
+
scriptEnvCache = null;
|
|
10881
|
+
/**
|
|
10882
|
+
* The environment with npm_lifecycle_event of the script that started Playwright through
|
|
10883
|
+
* `npx` (04-REQ-63 point 2); the process table is read at most once per run.
|
|
10884
|
+
*/
|
|
10885
|
+
scriptEnv(scripts) {
|
|
10886
|
+
this.scriptEnvCache ??= chunkVXGTC6DB_cjs.scriptEnv({
|
|
10887
|
+
env: this.host.env,
|
|
10888
|
+
scripts,
|
|
10889
|
+
pid: this.host.pid,
|
|
10890
|
+
processTable: this.host.processTable?.bind(this.host)
|
|
10891
|
+
});
|
|
10892
|
+
return this.scriptEnvCache;
|
|
10893
|
+
}
|
|
9636
10894
|
/**
|
|
9637
10895
|
* The test directory relative to INIT_CWD, the directory the package manager was called from
|
|
9638
10896
|
* (e.g. the root of a monorepo), or null when it is the same or not below it: an INIT_CWD
|
|
@@ -9645,10 +10903,21 @@ var RunSession = class {
|
|
|
9645
10903
|
const dir = io.relativeSlashPath(io.resolvePath(this.host.cwd, from), this.host.cwd);
|
|
9646
10904
|
return dir === "." || dir === ".." || dir.startsWith("../") || /^([A-Za-z]:)?\//u.test(dir) ? null : dir;
|
|
9647
10905
|
}
|
|
10906
|
+
/**
|
|
10907
|
+
* Hint of CONFIG_BASEURL_EMPTY (03-REQ-21): the example script run with the package manager of
|
|
10908
|
+
* the project, as in the Next: hint (09-REQ-32).
|
|
10909
|
+
*/
|
|
10910
|
+
baseUrlHint(mode2) {
|
|
10911
|
+
const pm = packageManager({
|
|
10912
|
+
userAgent: this.host.env["npm_config_user_agent"] ?? null,
|
|
10913
|
+
lockFiles: this.host.io.readPackageInfo(this.configDir).lockFiles
|
|
10914
|
+
});
|
|
10915
|
+
return `If baseURL comes from environment variables, run the tests through the script that sets them (e.g. PW_PERF_MODE=${mode2} ${scriptCommand(pm, "e2e:qa")}, see docs/dynamic-environments.md).`;
|
|
10916
|
+
}
|
|
9648
10917
|
/** Commands of the project for each mode, for the Next: hint (09-REQ-32). */
|
|
9649
10918
|
commands() {
|
|
9650
|
-
const env = this.host.env;
|
|
9651
10919
|
const info = this.host.io.readPackageInfo(this.configDir);
|
|
10920
|
+
const env = this.scriptEnv(this.host.io.readPackageInfo(this.host.cwd).scripts);
|
|
9652
10921
|
const ctx = {
|
|
9653
10922
|
env: this.settings.config.run.env,
|
|
9654
10923
|
lifecycleEvent: env["npm_lifecycle_event"] ?? null,
|
|
@@ -9662,7 +10931,8 @@ var RunSession = class {
|
|
|
9662
10931
|
};
|
|
9663
10932
|
return {
|
|
9664
10933
|
test: suggestCommand("test", ctx),
|
|
9665
|
-
|
|
10934
|
+
// The merge does not know the test command of the shard jobs (17-REQ-19).
|
|
10935
|
+
thresholds: this.merging === null ? suggestCommand("thresholds", ctx) : MERGE_THRESHOLDS_COMMAND,
|
|
9666
10936
|
check: suggestCommand("check", ctx)
|
|
9667
10937
|
};
|
|
9668
10938
|
}
|
|
@@ -9715,7 +10985,7 @@ var RunSession = class {
|
|
|
9715
10985
|
}
|
|
9716
10986
|
warnings.push(...derived.value.warnings);
|
|
9717
10987
|
const absolute = io.thresholdsFilePaths(location);
|
|
9718
|
-
const reportDir =
|
|
10988
|
+
const reportDir = this.reportDir();
|
|
9719
10989
|
let writeFailed = false;
|
|
9720
10990
|
for (const file of derived.value.files) {
|
|
9721
10991
|
if (file.content === null || !file.changed) continue;
|
|
@@ -9806,7 +11076,7 @@ var RunSession = class {
|
|
|
9806
11076
|
*/
|
|
9807
11077
|
prune(warnings) {
|
|
9808
11078
|
if (this.settings.mode.prune !== true) return false;
|
|
9809
|
-
const filters =
|
|
11079
|
+
const filters = this.testFilterArgs();
|
|
9810
11080
|
if (filters.length > 0) {
|
|
9811
11081
|
warnings.push({
|
|
9812
11082
|
code: "RUN_PRUNE_SKIPPED",
|
|
@@ -9818,13 +11088,21 @@ var RunSession = class {
|
|
|
9818
11088
|
this.pruned = true;
|
|
9819
11089
|
return true;
|
|
9820
11090
|
}
|
|
11091
|
+
/**
|
|
11092
|
+
* Test filters of the run (04-REQ-35): from the arguments, or in a merge a marker when a shard
|
|
11093
|
+
* had one (17-REQ-18); --shard is no filter.
|
|
11094
|
+
*/
|
|
11095
|
+
testFilterArgs() {
|
|
11096
|
+
if (this.merging !== null) {
|
|
11097
|
+
const filtered = this.merging.input.shards.filter((shard) => shard.testFilter).map((shard) => `shard ${String(shard.shard.current)}`);
|
|
11098
|
+
return filtered.length === 0 ? [] : [`a test filter in ${filtered.join(", ")}`];
|
|
11099
|
+
}
|
|
11100
|
+
return chunkVXGTC6DB_cjs.testFilters(chunkVXGTC6DB_cjs.testArgsFromArgv(this.host.argv));
|
|
11101
|
+
}
|
|
9821
11102
|
/** <report.dir>/outcome.json (02-REQ-27, 04-REQ-62). */
|
|
9822
11103
|
outcomePath() {
|
|
9823
11104
|
const io = this.host.io;
|
|
9824
|
-
return io.resolvePath(
|
|
9825
|
-
io.resolvePath(this.configDir, this.settings.config.report.dir),
|
|
9826
|
-
"outcome.json"
|
|
9827
|
-
);
|
|
11105
|
+
return io.resolvePath(this.reportDir(), "outcome.json");
|
|
9828
11106
|
}
|
|
9829
11107
|
/** Last step of onEnd (02-REQ-27); returns the path written, or null. */
|
|
9830
11108
|
async writeOutcome(outcome) {
|
|
@@ -9834,7 +11112,7 @@ var RunSession = class {
|
|
|
9834
11112
|
return file;
|
|
9835
11113
|
} catch (error) {
|
|
9836
11114
|
this.host.stderr.write(
|
|
9837
|
-
`${
|
|
11115
|
+
`${chunkVXGTC6DB_cjs.PACKAGE_NAME}: OUTCOME_WRITE_FAILED: the outcome file could not be written to ${file}: ${error instanceof Error ? error.message : String(error)}
|
|
9838
11116
|
`
|
|
9839
11117
|
);
|
|
9840
11118
|
return null;
|
|
@@ -9843,7 +11121,7 @@ var RunSession = class {
|
|
|
9843
11121
|
};
|
|
9844
11122
|
function configFileNotPassedWarning(entries2) {
|
|
9845
11123
|
const names2 = new Set(entries2);
|
|
9846
|
-
const file =
|
|
11124
|
+
const file = chunkVXGTC6DB_cjs.CONFIG_FILE_EXTENSIONS.map((ext) => `${chunkVXGTC6DB_cjs.CONFIG_FILE_BASENAME}${ext}`).find(
|
|
9847
11125
|
(name) => names2.has(name)
|
|
9848
11126
|
);
|
|
9849
11127
|
if (file === void 0) return null;
|
|
@@ -9853,7 +11131,8 @@ function configFileNotPassedWarning(entries2) {
|
|
|
9853
11131
|
hint: "Import it in the Playwright config and pass it as the second argument: withPerf(config, perfConfig)."
|
|
9854
11132
|
};
|
|
9855
11133
|
}
|
|
9856
|
-
|
|
11134
|
+
var MERGE_THRESHOLDS_COMMAND = "PW_PERF_MODE=thresholds in the shard jobs, then PW_PERF_MODE=merge npx pw-perf";
|
|
11135
|
+
function emptyBaseUrlWarning(conditions, config, hint2) {
|
|
9857
11136
|
const names2 = conditions.projects.flatMap((p, i) => {
|
|
9858
11137
|
if (p.role !== "measured") return [];
|
|
9859
11138
|
const baseURL = config.projects[i]?.use.baseURL;
|
|
@@ -9871,48 +11150,11 @@ function emptyBaseUrlWarning(conditions, config) {
|
|
|
9871
11150
|
return {
|
|
9872
11151
|
code: "CONFIG_BASEURL_EMPTY",
|
|
9873
11152
|
message: `Measured ${names2.length === 1 ? "project" : "projects"} ${names2.join(", ")} ${names2.length === 1 ? "has" : "have"} an empty use.baseURL.`,
|
|
9874
|
-
hint:
|
|
11153
|
+
hint: hint2
|
|
9875
11154
|
};
|
|
9876
11155
|
}
|
|
9877
11156
|
|
|
9878
11157
|
// src/reporter/perf-reporter.ts
|
|
9879
|
-
function processHost() {
|
|
9880
|
-
const env = process.env;
|
|
9881
|
-
return {
|
|
9882
|
-
env,
|
|
9883
|
-
io: {
|
|
9884
|
-
loadThresholds,
|
|
9885
|
-
thresholdsFilePaths,
|
|
9886
|
-
writeJsonStable,
|
|
9887
|
-
writeTextAtomic,
|
|
9888
|
-
resolvePath,
|
|
9889
|
-
directoryOf,
|
|
9890
|
-
relativeSlashPath,
|
|
9891
|
-
removeFileSync,
|
|
9892
|
-
readPackageInfo,
|
|
9893
|
-
readSuite,
|
|
9894
|
-
tempPath,
|
|
9895
|
-
readTextFile,
|
|
9896
|
-
readTextFileSync,
|
|
9897
|
-
listDirSync,
|
|
9898
|
-
isDirectorySync,
|
|
9899
|
-
realPathSync,
|
|
9900
|
-
homeDir,
|
|
9901
|
-
scanDirSync,
|
|
9902
|
-
emptyDirSync
|
|
9903
|
-
},
|
|
9904
|
-
stdout: process.stdout,
|
|
9905
|
-
stderr: process.stderr,
|
|
9906
|
-
cwd: process.cwd(),
|
|
9907
|
-
argv: process.argv,
|
|
9908
|
-
now: () => /* @__PURE__ */ new Date(),
|
|
9909
|
-
random: Math.random,
|
|
9910
|
-
ci: readCiInfo(env),
|
|
9911
|
-
host: readHostInfo(env),
|
|
9912
|
-
execPath: process.execPath,
|
|
9913
|
-
runPass: (command, passEnv) => runPass(command, passEnv, process.cwd())
|
|
9914
|
-
};
|
|
9915
|
-
}
|
|
9916
11158
|
var PerfReporter = class {
|
|
9917
11159
|
/** Reporter options from the Playwright config; none are defined yet. */
|
|
9918
11160
|
options;
|
|
@@ -9924,7 +11166,7 @@ var PerfReporter = class {
|
|
|
9924
11166
|
let startError;
|
|
9925
11167
|
try {
|
|
9926
11168
|
const host = processHost();
|
|
9927
|
-
const settings = runSettings(
|
|
11169
|
+
const settings = runSettings(chunkVXGTC6DB_cjs.getRegistered(), host.env, chunkVXGTC6DB_cjs.version);
|
|
9928
11170
|
session = settings === null ? null : new RunSession(host, settings);
|
|
9929
11171
|
} catch (error) {
|
|
9930
11172
|
startError = error;
|