playwright-performance-regression 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +100 -0
- package/README.md +11 -4
- package/dist/chunk-JS7SBYOF.js +11226 -0
- package/dist/{chunk-ZHJQFWES.js → chunk-PTQWKPHU.js} +276 -11
- package/dist/{chunk-5Y34Q4DR.js → chunk-Q73KMM6D.js} +95 -30
- package/dist/{chunk-CTE5EY35.cjs → chunk-VBNIFMNE.cjs} +298 -32
- package/dist/{chunk-LEIBG5A4.cjs → chunk-VXGTC6DB.cjs} +25 -6
- package/dist/{chunk-W7NEFS5V.cjs → chunk-VYODYUEL.cjs} +95 -29
- package/dist/{chunk-ORWOFAZ5.js → chunk-ZEQ2IGDC.js} +108 -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 +1831 -621
- package/dist/reporter.js +7 -8154
- 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-BA37V6SL.js +0 -1803
- 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;
|
|
@@ -422,33 +423,43 @@ function readHostInfo(env) {
|
|
|
422
423
|
}
|
|
423
424
|
|
|
424
425
|
// src/core/schema/formats.ts
|
|
425
|
-
var nonEmpty =
|
|
426
|
-
var nonEmptyOrNull =
|
|
426
|
+
var nonEmpty = chunkVYODYUEL_cjs.str({ minLength: 1 });
|
|
427
|
+
var nonEmptyOrNull = chunkVYODYUEL_cjs.nullable(nonEmpty);
|
|
427
428
|
function present(value, pointer, sink, properties) {
|
|
428
429
|
for (const [name, schema] of Object.entries(properties)) {
|
|
429
430
|
if (Object.hasOwn(value, name)) schema.check(value[name], `${pointer}/${name}`, sink);
|
|
430
431
|
}
|
|
431
432
|
}
|
|
432
433
|
var noTiming = {
|
|
433
|
-
duration:
|
|
434
|
-
requestStart:
|
|
435
|
-
ttfb:
|
|
436
|
-
timeSource:
|
|
437
|
-
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)
|
|
438
439
|
};
|
|
439
|
-
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(
|
|
440
450
|
{
|
|
441
|
-
method:
|
|
451
|
+
method: chunkVYODYUEL_cjs.str({ pattern: /^[A-Z]+$/u }),
|
|
442
452
|
url: nonEmpty,
|
|
443
453
|
resourceType: nonEmpty,
|
|
444
|
-
status:
|
|
454
|
+
status: chunkVYODYUEL_cjs.oneOf(chunkVYODYUEL_cjs.int({ minimum: 100, maximum: 599 }), chunkVYODYUEL_cjs.constant("FAILED"), chunkVYODYUEL_cjs.constant("PENDING")),
|
|
445
455
|
failureText: nonEmpty,
|
|
446
|
-
startTime:
|
|
447
|
-
duration:
|
|
448
|
-
requestStart:
|
|
449
|
-
ttfb:
|
|
450
|
-
timeSource:
|
|
451
|
-
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
|
|
452
463
|
},
|
|
453
464
|
{
|
|
454
465
|
required: [
|
|
@@ -477,15 +488,16 @@ var requestSample = chunkW7NEFS5V_cjs.obj(
|
|
|
477
488
|
}
|
|
478
489
|
}
|
|
479
490
|
);
|
|
480
|
-
var apiRequestSample =
|
|
491
|
+
var apiRequestSample = chunkVYODYUEL_cjs.obj(
|
|
481
492
|
{
|
|
482
|
-
method:
|
|
493
|
+
method: chunkVYODYUEL_cjs.str({ pattern: /^[A-Z]+$/u }),
|
|
483
494
|
url: nonEmpty,
|
|
484
|
-
status:
|
|
495
|
+
status: chunkVYODYUEL_cjs.oneOf(chunkVYODYUEL_cjs.int({ minimum: 100, maximum: 599 }), chunkVYODYUEL_cjs.constant("FAILED"), chunkVYODYUEL_cjs.constant("PENDING")),
|
|
485
496
|
failureText: nonEmpty,
|
|
486
|
-
startTime:
|
|
487
|
-
duration:
|
|
488
|
-
source:
|
|
497
|
+
startTime: chunkVYODYUEL_cjs.epochMs,
|
|
498
|
+
duration: chunkVYODYUEL_cjs.msOrNull,
|
|
499
|
+
source: chunkVYODYUEL_cjs.enumOf(["request", "context", "tracked"]),
|
|
500
|
+
operation
|
|
489
501
|
},
|
|
490
502
|
{
|
|
491
503
|
required: ["method", "url", "status", "startTime", "duration", "source"],
|
|
@@ -498,46 +510,52 @@ var apiRequestSample = chunkW7NEFS5V_cjs.obj(
|
|
|
498
510
|
sink.add(`${pointer}/failureText`, "must NOT be present unless status is FAILED");
|
|
499
511
|
}
|
|
500
512
|
if (status === "FAILED" || status === "PENDING" || !Object.hasOwn(value, "status")) {
|
|
501
|
-
present(value, pointer, sink, { duration:
|
|
513
|
+
present(value, pointer, sink, { duration: chunkVYODYUEL_cjs.nul });
|
|
502
514
|
}
|
|
503
515
|
}
|
|
504
516
|
}
|
|
505
517
|
);
|
|
506
|
-
var sampleBatch =
|
|
518
|
+
var sampleBatch = chunkVYODYUEL_cjs.obj(
|
|
507
519
|
{
|
|
508
|
-
schemaVersion:
|
|
509
|
-
collector:
|
|
520
|
+
schemaVersion: chunkVYODYUEL_cjs.constant(4),
|
|
521
|
+
collector: chunkVYODYUEL_cjs.obj(
|
|
510
522
|
{
|
|
511
|
-
name:
|
|
523
|
+
name: chunkVYODYUEL_cjs.str({ pattern: /^[a-z0-9-]+$/u }),
|
|
512
524
|
version: nonEmpty,
|
|
513
525
|
browserName: nonEmptyOrNull
|
|
514
526
|
},
|
|
515
527
|
{ required: ["name", "version", "browserName"] }
|
|
516
528
|
),
|
|
517
|
-
requests:
|
|
518
|
-
apiRequests:
|
|
519
|
-
diagnostics:
|
|
529
|
+
requests: chunkVYODYUEL_cjs.arr(requestSample),
|
|
530
|
+
apiRequests: chunkVYODYUEL_cjs.arr(apiRequestSample),
|
|
531
|
+
diagnostics: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.issue)
|
|
520
532
|
},
|
|
521
533
|
{ required: ["schemaVersion", "collector", "requests", "apiRequests", "diagnostics"] }
|
|
522
534
|
);
|
|
523
535
|
var LIMIT_FIELDS = ["t", "median", "percentile", "p99", "minApdex", "maxWilson", "maxErrorRate"];
|
|
524
|
-
var
|
|
536
|
+
var ENTRY_LIMIT_FIELDS = [...LIMIT_FIELDS, "maxNonSuccessRate"];
|
|
537
|
+
var thresholdsEntry = chunkVYODYUEL_cjs.obj(
|
|
525
538
|
{
|
|
526
|
-
t:
|
|
527
|
-
median:
|
|
528
|
-
percentile:
|
|
529
|
-
p99:
|
|
530
|
-
minApdex:
|
|
531
|
-
maxWilson:
|
|
532
|
-
maxErrorRate:
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
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
|
|
537
555
|
},
|
|
538
556
|
{
|
|
539
557
|
refine(value, pointer, sink) {
|
|
540
|
-
if (![...
|
|
558
|
+
if (![...ENTRY_LIMIT_FIELDS, "gate"].some((name) => Object.hasOwn(value, name))) {
|
|
541
559
|
sink.add(pointer, "must have at least one limit or gate");
|
|
542
560
|
}
|
|
543
561
|
if (Object.hasOwn(value, "gate")) {
|
|
@@ -553,19 +571,21 @@ var thresholdsEntry = chunkW7NEFS5V_cjs.obj(
|
|
|
553
571
|
}
|
|
554
572
|
}
|
|
555
573
|
);
|
|
556
|
-
var thresholdsGenerated =
|
|
574
|
+
var thresholdsGenerated = chunkVYODYUEL_cjs.obj(
|
|
557
575
|
{
|
|
558
|
-
tool:
|
|
559
|
-
env:
|
|
560
|
-
sourceRunId:
|
|
561
|
-
sourceRunStartedAt:
|
|
562
|
-
sourceSampleCount:
|
|
563
|
-
evaluatedPercentile:
|
|
564
|
-
derivation:
|
|
565
|
-
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 }),
|
|
566
584
|
playwrightVersion: nonEmpty,
|
|
567
|
-
host:
|
|
568
|
-
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 })
|
|
569
589
|
},
|
|
570
590
|
{
|
|
571
591
|
required: [
|
|
@@ -583,16 +603,16 @@ var thresholdsGenerated = chunkW7NEFS5V_cjs.obj(
|
|
|
583
603
|
]
|
|
584
604
|
}
|
|
585
605
|
);
|
|
586
|
-
var thresholdsFile =
|
|
606
|
+
var thresholdsFile = chunkVYODYUEL_cjs.obj(
|
|
587
607
|
{
|
|
588
|
-
schemaVersion:
|
|
589
|
-
kind:
|
|
590
|
-
generated:
|
|
591
|
-
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)
|
|
592
612
|
},
|
|
593
613
|
{ required: ["schemaVersion", "kind", "generated", "entries"] }
|
|
594
614
|
);
|
|
595
|
-
var evaluationCounts =
|
|
615
|
+
var evaluationCounts = chunkVYODYUEL_cjs.obj(
|
|
596
616
|
Object.fromEntries(
|
|
597
617
|
[
|
|
598
618
|
"keys",
|
|
@@ -606,7 +626,7 @@ var evaluationCounts = chunkW7NEFS5V_cjs.obj(
|
|
|
606
626
|
"violations",
|
|
607
627
|
"blockingViolations",
|
|
608
628
|
"muted"
|
|
609
|
-
].map((name) => [name,
|
|
629
|
+
].map((name) => [name, chunkVYODYUEL_cjs.count])
|
|
610
630
|
),
|
|
611
631
|
{
|
|
612
632
|
required: [
|
|
@@ -624,50 +644,50 @@ var evaluationCounts = chunkW7NEFS5V_cjs.obj(
|
|
|
624
644
|
]
|
|
625
645
|
}
|
|
626
646
|
);
|
|
627
|
-
var thresholdFileInfo =
|
|
647
|
+
var thresholdFileInfo = chunkVYODYUEL_cjs.obj(
|
|
628
648
|
{
|
|
629
|
-
kind:
|
|
649
|
+
kind: chunkVYODYUEL_cjs.kind,
|
|
630
650
|
path: nonEmpty,
|
|
631
|
-
status:
|
|
632
|
-
generated:
|
|
633
|
-
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)
|
|
634
654
|
},
|
|
635
655
|
{ required: ["kind", "path", "status", "generated", "unseenKeys"] }
|
|
636
656
|
);
|
|
637
|
-
var testRef =
|
|
657
|
+
var testRef = chunkVYODYUEL_cjs.obj(
|
|
638
658
|
{
|
|
639
|
-
title:
|
|
640
|
-
project:
|
|
641
|
-
file:
|
|
642
|
-
line:
|
|
643
|
-
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 })
|
|
644
664
|
},
|
|
645
665
|
{ required: ["title", "project", "file", "line", "repeatEachIndex"] }
|
|
646
666
|
);
|
|
647
|
-
var slowSample =
|
|
648
|
-
{ duration:
|
|
667
|
+
var slowSample = chunkVYODYUEL_cjs.obj(
|
|
668
|
+
{ duration: chunkVYODYUEL_cjs.ms, startedAt: chunkVYODYUEL_cjs.timestamp, test: testRef, url: nonEmpty },
|
|
649
669
|
{ required: ["duration", "startedAt", "test"] }
|
|
650
670
|
);
|
|
651
|
-
var stats =
|
|
671
|
+
var stats = chunkVYODYUEL_cjs.obj(
|
|
652
672
|
{
|
|
653
|
-
min:
|
|
654
|
-
avg:
|
|
655
|
-
max:
|
|
656
|
-
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"] })
|
|
657
677
|
},
|
|
658
678
|
{ required: ["min", "avg", "max", "percentiles"] }
|
|
659
679
|
);
|
|
660
|
-
var check =
|
|
680
|
+
var check = chunkVYODYUEL_cjs.obj(
|
|
661
681
|
{
|
|
662
|
-
rule:
|
|
663
|
-
n:
|
|
664
|
-
actual:
|
|
665
|
-
observed:
|
|
666
|
-
limit:
|
|
667
|
-
passed:
|
|
668
|
-
hardLimitExceeded:
|
|
669
|
-
blocking:
|
|
670
|
-
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 }))
|
|
671
691
|
},
|
|
672
692
|
{
|
|
673
693
|
required: [
|
|
@@ -683,33 +703,54 @@ var check = chunkW7NEFS5V_cjs.obj(
|
|
|
683
703
|
]
|
|
684
704
|
}
|
|
685
705
|
);
|
|
686
|
-
var
|
|
706
|
+
var workloadSide = chunkVYODYUEL_cjs.obj(
|
|
707
|
+
{
|
|
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(
|
|
687
726
|
{
|
|
688
|
-
result:
|
|
689
|
-
reason:
|
|
690
|
-
thresholdSource:
|
|
691
|
-
limits:
|
|
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(
|
|
692
731
|
{
|
|
693
|
-
t:
|
|
694
|
-
median:
|
|
695
|
-
percentile:
|
|
696
|
-
p99:
|
|
697
|
-
minApdex:
|
|
698
|
-
maxWilson:
|
|
699
|
-
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)
|
|
700
740
|
},
|
|
701
|
-
{ required:
|
|
741
|
+
{ required: ENTRY_LIMIT_FIELDS }
|
|
702
742
|
),
|
|
703
|
-
checks:
|
|
704
|
-
muted:
|
|
705
|
-
|
|
706
|
-
{ 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 },
|
|
707
747
|
{ required: ["until", "note", "expired"] }
|
|
708
748
|
),
|
|
709
|
-
|
|
710
|
-
)
|
|
749
|
+
chunkVYODYUEL_cjs.nul
|
|
750
|
+
),
|
|
751
|
+
workload: chunkVYODYUEL_cjs.oneOf(workload, chunkVYODYUEL_cjs.nul)
|
|
711
752
|
},
|
|
712
|
-
{ required: ["result", "reason", "thresholdSource", "limits", "checks", "muted"] }
|
|
753
|
+
{ required: ["result", "reason", "thresholdSource", "limits", "checks", "muted", "workload"] }
|
|
713
754
|
);
|
|
714
755
|
var HINT_CODES = [
|
|
715
756
|
"HINT_HARD_LIMIT",
|
|
@@ -748,41 +789,41 @@ var HINT_PARAMS = [
|
|
|
748
789
|
"t",
|
|
749
790
|
"n"
|
|
750
791
|
];
|
|
751
|
-
var hint =
|
|
752
|
-
{ 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())) },
|
|
753
794
|
{ required: ["code", "params"] }
|
|
754
795
|
);
|
|
755
|
-
var histogram =
|
|
756
|
-
|
|
796
|
+
var histogram = chunkVYODYUEL_cjs.oneOf(
|
|
797
|
+
chunkVYODYUEL_cjs.obj(
|
|
757
798
|
{
|
|
758
|
-
edges:
|
|
759
|
-
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 })
|
|
760
801
|
},
|
|
761
802
|
{ required: ["edges", "counts"] }
|
|
762
803
|
),
|
|
763
|
-
|
|
804
|
+
chunkVYODYUEL_cjs.nul
|
|
764
805
|
);
|
|
765
|
-
var testCost =
|
|
806
|
+
var testCost = chunkVYODYUEL_cjs.obj(
|
|
766
807
|
{
|
|
767
|
-
title:
|
|
768
|
-
project:
|
|
769
|
-
file:
|
|
770
|
-
line:
|
|
771
|
-
executions:
|
|
772
|
-
requestCount:
|
|
773
|
-
errorCount:
|
|
774
|
-
totalMs:
|
|
775
|
-
maxRequestMs:
|
|
776
|
-
keyCount:
|
|
777
|
-
topKeys:
|
|
778
|
-
|
|
779
|
-
{ 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 },
|
|
780
821
|
{ required: ["key", "count", "totalMs"] }
|
|
781
822
|
),
|
|
782
823
|
{ maxItems: 3 }
|
|
783
824
|
),
|
|
784
|
-
violatedKeys:
|
|
785
|
-
violatedKeyCount:
|
|
825
|
+
violatedKeys: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.key, { maxItems: 10 }),
|
|
826
|
+
violatedKeyCount: chunkVYODYUEL_cjs.count
|
|
786
827
|
},
|
|
787
828
|
{
|
|
788
829
|
required: [
|
|
@@ -802,71 +843,91 @@ var testCost = chunkW7NEFS5V_cjs.obj(
|
|
|
802
843
|
]
|
|
803
844
|
}
|
|
804
845
|
);
|
|
805
|
-
var waterfallRequest =
|
|
846
|
+
var waterfallRequest = chunkVYODYUEL_cjs.obj(
|
|
806
847
|
{
|
|
807
|
-
offset:
|
|
808
|
-
duration:
|
|
809
|
-
key:
|
|
810
|
-
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 })
|
|
811
852
|
},
|
|
812
853
|
{ required: ["offset", "duration", "key", "status"] }
|
|
813
854
|
);
|
|
814
|
-
var waterfall =
|
|
855
|
+
var waterfall = chunkVYODYUEL_cjs.obj(
|
|
815
856
|
{
|
|
816
857
|
test: testRef,
|
|
817
|
-
totalMs:
|
|
818
|
-
requestCount:
|
|
819
|
-
spanMs:
|
|
820
|
-
requests:
|
|
821
|
-
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
|
|
822
863
|
},
|
|
823
864
|
{ required: ["test", "totalMs", "requestCount", "spanMs", "requests", "omitted"] }
|
|
824
865
|
);
|
|
825
|
-
var testBreakdown =
|
|
826
|
-
|
|
866
|
+
var testBreakdown = chunkVYODYUEL_cjs.oneOf(
|
|
867
|
+
chunkVYODYUEL_cjs.obj(
|
|
827
868
|
{
|
|
828
|
-
tests:
|
|
829
|
-
omitted:
|
|
830
|
-
waterfalls:
|
|
869
|
+
tests: chunkVYODYUEL_cjs.arr(testCost, { maxItems: 500 }),
|
|
870
|
+
omitted: chunkVYODYUEL_cjs.count,
|
|
871
|
+
waterfalls: chunkVYODYUEL_cjs.arr(waterfall, { maxItems: 5 })
|
|
831
872
|
},
|
|
832
873
|
{ required: ["tests", "omitted", "waterfalls"] }
|
|
833
874
|
),
|
|
834
|
-
|
|
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"] }
|
|
835
893
|
);
|
|
836
894
|
var aggregateProps = {
|
|
837
|
-
count:
|
|
838
|
-
successCount:
|
|
839
|
-
errorCount:
|
|
840
|
-
fromFailedTests:
|
|
841
|
-
testCount:
|
|
842
|
-
statuses:
|
|
843
|
-
|
|
844
|
-
|
|
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 })
|
|
845
903
|
),
|
|
846
|
-
timeSources:
|
|
847
|
-
stats:
|
|
848
|
-
ttfb:
|
|
849
|
-
|
|
850
|
-
|
|
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
|
|
851
909
|
),
|
|
852
|
-
slowest:
|
|
853
|
-
topTests:
|
|
854
|
-
|
|
910
|
+
slowest: chunkVYODYUEL_cjs.arr(slowSample, { maxItems: 3 }),
|
|
911
|
+
topTests: chunkVYODYUEL_cjs.arr(
|
|
912
|
+
chunkVYODYUEL_cjs.obj(
|
|
855
913
|
{
|
|
856
|
-
title:
|
|
857
|
-
project:
|
|
858
|
-
file:
|
|
859
|
-
line:
|
|
860
|
-
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 })
|
|
861
919
|
},
|
|
862
920
|
{ required: ["title", "project", "file", "line", "sampleCount"] }
|
|
863
921
|
),
|
|
864
922
|
{ maxItems: 5 }
|
|
865
923
|
),
|
|
866
|
-
samples:
|
|
924
|
+
samples: chunkVYODYUEL_cjs.obj({ durations: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.ms), sampled: chunkVYODYUEL_cjs.bool }, { required: ["durations", "sampled"] }),
|
|
867
925
|
evaluation: keyEvaluation,
|
|
868
926
|
histogram,
|
|
869
|
-
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 })
|
|
870
931
|
};
|
|
871
932
|
var aggregateRequired = [
|
|
872
933
|
"count",
|
|
@@ -883,122 +944,169 @@ var aggregateRequired = [
|
|
|
883
944
|
"samples",
|
|
884
945
|
"evaluation",
|
|
885
946
|
"histogram",
|
|
886
|
-
"hints"
|
|
947
|
+
"hints",
|
|
948
|
+
"cold",
|
|
949
|
+
"nonSuccessCount",
|
|
950
|
+
"failedTimings"
|
|
887
951
|
];
|
|
888
|
-
var aggregate =
|
|
889
|
-
var stepAggregate =
|
|
952
|
+
var aggregate = chunkVYODYUEL_cjs.obj(aggregateProps, { required: aggregateRequired });
|
|
953
|
+
var stepAggregate = chunkVYODYUEL_cjs.obj(
|
|
890
954
|
{
|
|
891
955
|
...aggregateProps,
|
|
892
|
-
location:
|
|
893
|
-
|
|
894
|
-
|
|
956
|
+
location: chunkVYODYUEL_cjs.oneOf(
|
|
957
|
+
chunkVYODYUEL_cjs.obj({ file: nonEmpty, line: chunkVYODYUEL_cjs.int({ minimum: 1 }) }, { required: ["file", "line"] }),
|
|
958
|
+
chunkVYODYUEL_cjs.nul
|
|
895
959
|
),
|
|
896
|
-
stepErrorsFromFailedTests:
|
|
960
|
+
stepErrorsFromFailedTests: chunkVYODYUEL_cjs.count
|
|
897
961
|
},
|
|
898
962
|
{ required: [...aggregateRequired, "location", "stepErrorsFromFailedTests"] }
|
|
899
963
|
);
|
|
900
|
-
var
|
|
964
|
+
var hostInfo = chunkVYODYUEL_cjs.obj(
|
|
901
965
|
{
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
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(
|
|
984
|
+
{
|
|
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,
|
|
909
1002
|
configDir: nonEmpty,
|
|
910
1003
|
// Optional (02-REQ-42): left out when neither a package name nor a repository root is known.
|
|
911
|
-
suite:
|
|
912
|
-
{ name: nonEmpty, source:
|
|
1004
|
+
suite: chunkVYODYUEL_cjs.obj(
|
|
1005
|
+
{ name: nonEmpty, source: chunkVYODYUEL_cjs.enumOf(["package", "config"]) },
|
|
913
1006
|
{ required: ["name", "source"] }
|
|
914
1007
|
),
|
|
915
|
-
config:
|
|
916
|
-
normalization:
|
|
917
|
-
stepNormalization:
|
|
918
|
-
ci:
|
|
919
|
-
|
|
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(
|
|
920
1013
|
{
|
|
921
|
-
provider:
|
|
1014
|
+
provider: chunkVYODYUEL_cjs.enumOf(["github", "gitlab", "jenkins", "azure", "other"]),
|
|
922
1015
|
commit: nonEmptyOrNull,
|
|
923
1016
|
branch: nonEmptyOrNull,
|
|
924
1017
|
buildUrl: nonEmptyOrNull
|
|
925
1018
|
},
|
|
926
1019
|
{ required: ["provider", "commit", "branch", "buildUrl"] }
|
|
927
1020
|
),
|
|
928
|
-
|
|
1021
|
+
chunkVYODYUEL_cjs.nul
|
|
929
1022
|
),
|
|
930
|
-
host:
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
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
|
|
949
1066
|
),
|
|
950
|
-
runConditions:
|
|
1067
|
+
runConditions: chunkVYODYUEL_cjs.obj(
|
|
951
1068
|
{
|
|
952
|
-
workers:
|
|
953
|
-
projects:
|
|
954
|
-
|
|
1069
|
+
workers: chunkVYODYUEL_cjs.int({ minimum: 1 }),
|
|
1070
|
+
projects: chunkVYODYUEL_cjs.arr(
|
|
1071
|
+
chunkVYODYUEL_cjs.obj(
|
|
955
1072
|
{
|
|
956
|
-
name:
|
|
957
|
-
role:
|
|
958
|
-
browserName:
|
|
959
|
-
repeatEach:
|
|
960
|
-
retries:
|
|
961
|
-
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)
|
|
962
1079
|
},
|
|
963
1080
|
{ required: ["name", "role", "browserName", "repeatEach", "retries"] }
|
|
964
1081
|
)
|
|
965
1082
|
),
|
|
966
|
-
overriddenSettings:
|
|
1083
|
+
overriddenSettings: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.str())
|
|
967
1084
|
},
|
|
968
1085
|
{ required: ["workers", "projects", "overriddenSettings"] }
|
|
969
1086
|
),
|
|
970
|
-
tests:
|
|
1087
|
+
tests: testsInfo,
|
|
1088
|
+
evaluation: chunkVYODYUEL_cjs.obj(
|
|
971
1089
|
{
|
|
972
|
-
status:
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
flaky: chunkW7NEFS5V_cjs.count,
|
|
976
|
-
skipped: chunkW7NEFS5V_cjs.count
|
|
977
|
-
},
|
|
978
|
-
{ required: ["status", "expected", "unexpected", "flaky", "skipped"] }
|
|
979
|
-
),
|
|
980
|
-
evaluation: chunkW7NEFS5V_cjs.obj(
|
|
981
|
-
{
|
|
982
|
-
status: chunkW7NEFS5V_cjs.evaluationStatus,
|
|
983
|
-
gateEnabled: chunkW7NEFS5V_cjs.bool,
|
|
984
|
-
counts: chunkW7NEFS5V_cjs.obj(
|
|
1090
|
+
status: chunkVYODYUEL_cjs.evaluationStatus,
|
|
1091
|
+
gateEnabled: chunkVYODYUEL_cjs.bool,
|
|
1092
|
+
counts: chunkVYODYUEL_cjs.obj(
|
|
985
1093
|
{ api: evaluationCounts, step: evaluationCounts },
|
|
986
1094
|
{ required: ["api", "step"] }
|
|
987
1095
|
)
|
|
988
1096
|
},
|
|
989
1097
|
{ required: ["status", "gateEnabled", "counts"] }
|
|
990
1098
|
),
|
|
991
|
-
thresholdFiles:
|
|
992
|
-
warnings:
|
|
993
|
-
toolErrors:
|
|
994
|
-
origins:
|
|
995
|
-
|
|
996
|
-
{ 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 },
|
|
997
1105
|
{ required: ["origin", "label", "requestCount"] }
|
|
998
1106
|
)
|
|
999
1107
|
),
|
|
1000
|
-
endpoints:
|
|
1001
|
-
steps:
|
|
1108
|
+
endpoints: chunkVYODYUEL_cjs.record(chunkVYODYUEL_cjs.key, aggregate),
|
|
1109
|
+
steps: chunkVYODYUEL_cjs.record(chunkVYODYUEL_cjs.key, stepAggregate),
|
|
1002
1110
|
testBreakdown
|
|
1003
1111
|
},
|
|
1004
1112
|
{
|
|
@@ -1018,6 +1126,7 @@ var runReport = chunkW7NEFS5V_cjs.obj(
|
|
|
1018
1126
|
"host",
|
|
1019
1127
|
"playwright",
|
|
1020
1128
|
"passes",
|
|
1129
|
+
"shards",
|
|
1021
1130
|
"runConditions",
|
|
1022
1131
|
"tests",
|
|
1023
1132
|
"evaluation",
|
|
@@ -1031,24 +1140,24 @@ var runReport = chunkW7NEFS5V_cjs.obj(
|
|
|
1031
1140
|
]
|
|
1032
1141
|
}
|
|
1033
1142
|
);
|
|
1034
|
-
|
|
1143
|
+
chunkVYODYUEL_cjs.obj(
|
|
1035
1144
|
{
|
|
1036
|
-
schemaVersion:
|
|
1037
|
-
runId:
|
|
1145
|
+
schemaVersion: chunkVYODYUEL_cjs.constant(1),
|
|
1146
|
+
runId: chunkVYODYUEL_cjs.runId,
|
|
1038
1147
|
// The outcome has its own modes: a check writes neither a report nor thresholds (02-REQ-34).
|
|
1039
|
-
mode:
|
|
1040
|
-
exitCode:
|
|
1041
|
-
tests:
|
|
1042
|
-
evaluation:
|
|
1043
|
-
{ 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 },
|
|
1044
1153
|
{ required: ["status", "gateEnabled"] }
|
|
1045
1154
|
),
|
|
1046
|
-
toolErrors:
|
|
1047
|
-
paths:
|
|
1155
|
+
toolErrors: chunkVYODYUEL_cjs.arr(chunkVYODYUEL_cjs.issue),
|
|
1156
|
+
paths: chunkVYODYUEL_cjs.obj(
|
|
1048
1157
|
{
|
|
1049
1158
|
reportJson: nonEmptyOrNull,
|
|
1050
1159
|
reportHtml: nonEmptyOrNull,
|
|
1051
|
-
thresholds:
|
|
1160
|
+
thresholds: chunkVYODYUEL_cjs.arr(nonEmpty),
|
|
1052
1161
|
thresholdsDiff: nonEmptyOrNull
|
|
1053
1162
|
},
|
|
1054
1163
|
{ required: ["reportJson", "reportHtml", "thresholds", "thresholdsDiff"] }
|
|
@@ -1068,12 +1177,35 @@ chunkW7NEFS5V_cjs.obj(
|
|
|
1068
1177
|
}
|
|
1069
1178
|
);
|
|
1070
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
|
+
|
|
1071
1203
|
// src/core/schema/parse.ts
|
|
1072
1204
|
var MAX_PROBLEMS = 5;
|
|
1073
1205
|
var SCHEMA_VERSIONS = {
|
|
1074
|
-
samples:
|
|
1075
|
-
runReport:
|
|
1076
|
-
thresholds:
|
|
1206
|
+
samples: 4,
|
|
1207
|
+
runReport: 5,
|
|
1208
|
+
thresholds: 3,
|
|
1077
1209
|
outcome: 1
|
|
1078
1210
|
};
|
|
1079
1211
|
var HINTS = {
|
|
@@ -1116,7 +1248,7 @@ function migrate(document, from, to, migrations) {
|
|
|
1116
1248
|
return current;
|
|
1117
1249
|
}
|
|
1118
1250
|
function validate(document, source, format) {
|
|
1119
|
-
const sink = new
|
|
1251
|
+
const sink = new chunkVYODYUEL_cjs.Sink(MAX_PROBLEMS + 1);
|
|
1120
1252
|
format.schema.check(document, "", sink);
|
|
1121
1253
|
if (sink.problems.length === 0) format.extraChecks?.(document, sink);
|
|
1122
1254
|
if (sink.problems.length === 0) return null;
|
|
@@ -1131,7 +1263,7 @@ function parseVersioned(text2, source, format, options = {}) {
|
|
|
1131
1263
|
const parsed = parseJson(text2, source, format);
|
|
1132
1264
|
if (!parsed.ok) return parsed;
|
|
1133
1265
|
const document = parsed.value;
|
|
1134
|
-
if (!
|
|
1266
|
+
if (!chunkVYODYUEL_cjs.isRecord(document)) {
|
|
1135
1267
|
return failure(
|
|
1136
1268
|
issueOf("SCHEMA_VALIDATION_FAILED", source, `${format.name} does not match the format`, [
|
|
1137
1269
|
{ pointer: "", message: "must be object" }
|
|
@@ -1194,21 +1326,21 @@ var SAMPLES_FORMAT = {
|
|
|
1194
1326
|
};
|
|
1195
1327
|
function migrateRunReportV1(document) {
|
|
1196
1328
|
const aggregates = (value) => {
|
|
1197
|
-
if (!
|
|
1329
|
+
if (!chunkVYODYUEL_cjs.isRecord(value)) return value;
|
|
1198
1330
|
return Object.fromEntries(
|
|
1199
1331
|
Object.entries(value).map(([name, aggregate2]) => {
|
|
1200
|
-
if (!
|
|
1332
|
+
if (!chunkVYODYUEL_cjs.isRecord(aggregate2)) return [name, aggregate2];
|
|
1201
1333
|
const evaluation = aggregate2.evaluation;
|
|
1202
1334
|
const ttfb = aggregate2.ttfb;
|
|
1203
1335
|
return [
|
|
1204
1336
|
name,
|
|
1205
1337
|
{
|
|
1206
1338
|
...aggregate2,
|
|
1207
|
-
ttfb:
|
|
1208
|
-
evaluation:
|
|
1339
|
+
ttfb: chunkVYODYUEL_cjs.isRecord(ttfb) ? { ...ttfb, otherP50: null } : ttfb,
|
|
1340
|
+
evaluation: chunkVYODYUEL_cjs.isRecord(evaluation) && Array.isArray(evaluation.checks) ? {
|
|
1209
1341
|
...evaluation,
|
|
1210
1342
|
checks: evaluation.checks.map(
|
|
1211
|
-
(check2) =>
|
|
1343
|
+
(check2) => chunkVYODYUEL_cjs.isRecord(check2) ? { ...check2, usage: null } : check2
|
|
1212
1344
|
)
|
|
1213
1345
|
} : evaluation,
|
|
1214
1346
|
histogram: null,
|
|
@@ -1226,22 +1358,22 @@ function migrateRunReportV1(document) {
|
|
|
1226
1358
|
};
|
|
1227
1359
|
}
|
|
1228
1360
|
function withoutCustomOptions(config) {
|
|
1229
|
-
if (!
|
|
1361
|
+
if (!chunkVYODYUEL_cjs.isRecord(config) || !chunkVYODYUEL_cjs.isRecord(config.checks)) return config;
|
|
1230
1362
|
const drop = (value) => {
|
|
1231
|
-
if (!
|
|
1363
|
+
if (!chunkVYODYUEL_cjs.isRecord(value)) return value;
|
|
1232
1364
|
const { custom: _removed, ...rest } = value;
|
|
1233
1365
|
return rest;
|
|
1234
1366
|
};
|
|
1235
1367
|
const checks = Object.fromEntries(
|
|
1236
1368
|
Object.entries(config.checks).map(([group, rules]) => {
|
|
1237
|
-
if (!
|
|
1369
|
+
if (!chunkVYODYUEL_cjs.isRecord(rules)) return [group, rules];
|
|
1238
1370
|
if (group === "errors") return [group, { ...rules, limit: drop(rules.limit) }];
|
|
1239
1371
|
return [
|
|
1240
1372
|
group,
|
|
1241
1373
|
Object.fromEntries(
|
|
1242
1374
|
Object.entries(rules).map(([name, rule]) => {
|
|
1243
1375
|
if (group === "slowShare" && name === "t") return [name, drop(rule)];
|
|
1244
|
-
if (!
|
|
1376
|
+
if (!chunkVYODYUEL_cjs.isRecord(rule) || !Object.hasOwn(rule, "limit")) return [name, rule];
|
|
1245
1377
|
return [name, { ...rule, limit: drop(rule.limit) }];
|
|
1246
1378
|
})
|
|
1247
1379
|
)
|
|
@@ -1251,18 +1383,18 @@ function withoutCustomOptions(config) {
|
|
|
1251
1383
|
return { ...config, checks };
|
|
1252
1384
|
}
|
|
1253
1385
|
function withStepOptions(config) {
|
|
1254
|
-
if (!
|
|
1386
|
+
if (!chunkVYODYUEL_cjs.isRecord(config)) return config;
|
|
1255
1387
|
const out = { ...config };
|
|
1256
|
-
if (
|
|
1257
|
-
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) };
|
|
1258
1390
|
}
|
|
1259
|
-
if (
|
|
1260
|
-
const defaults =
|
|
1261
|
-
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;
|
|
1262
1394
|
out.checks = Object.fromEntries(
|
|
1263
1395
|
Object.entries(config.checks).map(([group, rules]) => {
|
|
1264
1396
|
const groupDefaults = defaults[group];
|
|
1265
|
-
if (!
|
|
1397
|
+
if (!chunkVYODYUEL_cjs.isRecord(rules) || !chunkVYODYUEL_cjs.isRecord(groupDefaults)) return [group, rules];
|
|
1266
1398
|
if (group === "errors") {
|
|
1267
1399
|
return [group, { ...rules, limit: withStep(rules.limit, groupDefaults.limit) }];
|
|
1268
1400
|
}
|
|
@@ -1273,7 +1405,7 @@ function withStepOptions(config) {
|
|
|
1273
1405
|
const ruleDefaults = groupDefaults[name];
|
|
1274
1406
|
if (group === "slowShare" && name === "t")
|
|
1275
1407
|
return [name, withStep(rule, ruleDefaults)];
|
|
1276
|
-
if (!
|
|
1408
|
+
if (!chunkVYODYUEL_cjs.isRecord(rule) || !chunkVYODYUEL_cjs.isRecord(ruleDefaults)) return [name, rule];
|
|
1277
1409
|
if (!Object.hasOwn(rule, "limit")) return [name, rule];
|
|
1278
1410
|
return [name, { ...rule, limit: withStep(rule.limit, ruleDefaults.limit) }];
|
|
1279
1411
|
})
|
|
@@ -1285,21 +1417,21 @@ function withStepOptions(config) {
|
|
|
1285
1417
|
return out;
|
|
1286
1418
|
}
|
|
1287
1419
|
function withPassesOption(config) {
|
|
1288
|
-
if (!
|
|
1420
|
+
if (!chunkVYODYUEL_cjs.isRecord(config) || !chunkVYODYUEL_cjs.isRecord(config.run)) return config;
|
|
1289
1421
|
const { repeat, ...run } = config.run;
|
|
1290
1422
|
return repeat === void 0 ? config : { ...config, run: { ...run, passes: repeat } };
|
|
1291
1423
|
}
|
|
1292
1424
|
function withGateAndPresetOptions(config) {
|
|
1293
|
-
if (!
|
|
1425
|
+
if (!chunkVYODYUEL_cjs.isRecord(config)) return config;
|
|
1294
1426
|
const out = { ...config };
|
|
1295
|
-
if (
|
|
1427
|
+
if (chunkVYODYUEL_cjs.isRecord(config.gate)) {
|
|
1296
1428
|
const { warnOnly: _warnOnly, ...gate } = config.gate;
|
|
1297
1429
|
out.gate = gate;
|
|
1298
1430
|
}
|
|
1299
|
-
if (
|
|
1431
|
+
if (chunkVYODYUEL_cjs.isRecord(config.thresholds) && !Object.hasOwn(config.thresholds, "preset")) {
|
|
1300
1432
|
out.thresholds = { preset: "normal", ...config.thresholds };
|
|
1301
1433
|
}
|
|
1302
|
-
if (
|
|
1434
|
+
if (chunkVYODYUEL_cjs.isRecord(config.run) && !Object.hasOwn(config.run, "grep")) {
|
|
1303
1435
|
out.run = { ...config.run, grep: null };
|
|
1304
1436
|
}
|
|
1305
1437
|
return out;
|
|
@@ -1307,7 +1439,7 @@ function withGateAndPresetOptions(config) {
|
|
|
1307
1439
|
function migrateRunReportV2(document) {
|
|
1308
1440
|
const { custom: _custom, ...rest } = document;
|
|
1309
1441
|
const evaluation = document.evaluation;
|
|
1310
|
-
const counts =
|
|
1442
|
+
const counts = chunkVYODYUEL_cjs.isRecord(evaluation) ? evaluation.counts : void 0;
|
|
1311
1443
|
const files = document.thresholdFiles;
|
|
1312
1444
|
return {
|
|
1313
1445
|
...rest,
|
|
@@ -1318,14 +1450,14 @@ function migrateRunReportV2(document) {
|
|
|
1318
1450
|
config: withGateAndPresetOptions(
|
|
1319
1451
|
withPassesOption(withStepOptions(withoutCustomOptions(document.config)))
|
|
1320
1452
|
),
|
|
1321
|
-
evaluation:
|
|
1453
|
+
evaluation: chunkVYODYUEL_cjs.isRecord(evaluation) && chunkVYODYUEL_cjs.isRecord(counts) ? {
|
|
1322
1454
|
...evaluation,
|
|
1323
1455
|
counts: {
|
|
1324
1456
|
...Object.fromEntries(Object.entries(counts).filter(([k]) => k !== "custom")),
|
|
1325
1457
|
step: Object.fromEntries(Object.keys(counts.api ?? {}).map((name) => [name, 0]))
|
|
1326
1458
|
}
|
|
1327
1459
|
} : evaluation,
|
|
1328
|
-
thresholdFiles: Array.isArray(files) ? files.filter((file) => !(
|
|
1460
|
+
thresholdFiles: Array.isArray(files) ? files.filter((file) => !(chunkVYODYUEL_cjs.isRecord(file) && file.kind === "custom")) : files
|
|
1329
1461
|
};
|
|
1330
1462
|
}
|
|
1331
1463
|
function sum(values) {
|
|
@@ -1337,17 +1469,17 @@ function checkRunReport(document, sink) {
|
|
|
1337
1469
|
for (const [name, aggregate2] of Object.entries(map)) {
|
|
1338
1470
|
const histogram3 = aggregate2.histogram;
|
|
1339
1471
|
if (histogram3 === null) continue;
|
|
1340
|
-
const pointer =
|
|
1472
|
+
const pointer = chunkVYODYUEL_cjs.child(chunkVYODYUEL_cjs.child(`/${kind2}`, name), "histogram");
|
|
1341
1473
|
const { edges, counts } = histogram3;
|
|
1342
1474
|
if (edges.some((edge, i) => i > 0 && edge <= (edges[i - 1] ?? 0))) {
|
|
1343
|
-
sink.add(
|
|
1475
|
+
sink.add(chunkVYODYUEL_cjs.child(pointer, "edges"), "must be strictly ascending");
|
|
1344
1476
|
}
|
|
1345
1477
|
if (counts.length !== edges.length - 1) {
|
|
1346
|
-
sink.add(
|
|
1478
|
+
sink.add(chunkVYODYUEL_cjs.child(pointer, "counts"), "must have one item fewer than edges");
|
|
1347
1479
|
}
|
|
1348
1480
|
const retained = aggregate2.samples.durations.length;
|
|
1349
1481
|
if (sum(counts) !== retained) {
|
|
1350
|
-
sink.add(
|
|
1482
|
+
sink.add(chunkVYODYUEL_cjs.child(pointer, "counts"), "must sum to the number of samples.durations");
|
|
1351
1483
|
}
|
|
1352
1484
|
}
|
|
1353
1485
|
}
|
|
@@ -1369,20 +1501,94 @@ function checkRunReport(document, sink) {
|
|
|
1369
1501
|
}
|
|
1370
1502
|
function migrateRunReportV3(document) {
|
|
1371
1503
|
const config = document.config;
|
|
1372
|
-
if (!
|
|
1504
|
+
if (!chunkVYODYUEL_cjs.isRecord(config) || !chunkVYODYUEL_cjs.isRecord(config.run)) return document;
|
|
1373
1505
|
const { projects: _projects, ...run } = config.run;
|
|
1374
|
-
const measure =
|
|
1375
|
-
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;
|
|
1376
1508
|
return {
|
|
1377
1509
|
...document,
|
|
1378
1510
|
config: { ...config, run: { ...run, overrideSlowMo: false }, measure, report }
|
|
1379
1511
|
};
|
|
1380
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
|
+
}
|
|
1381
1582
|
var RUN_REPORT_FORMAT = {
|
|
1382
1583
|
name: "run report",
|
|
1383
1584
|
schemaFile: "run-report.schema.json",
|
|
1384
1585
|
current: SCHEMA_VERSIONS.runReport,
|
|
1385
|
-
migrations: {
|
|
1586
|
+
migrations: {
|
|
1587
|
+
1: migrateRunReportV1,
|
|
1588
|
+
2: migrateRunReportV2,
|
|
1589
|
+
3: migrateRunReportV3,
|
|
1590
|
+
4: migrateRunReportV4
|
|
1591
|
+
},
|
|
1386
1592
|
schema: runReport,
|
|
1387
1593
|
extraChecks: checkRunReport
|
|
1388
1594
|
};
|
|
@@ -1391,13 +1597,14 @@ var THRESHOLDS_FORMAT = {
|
|
|
1391
1597
|
schemaFile: "thresholds.schema.json",
|
|
1392
1598
|
current: SCHEMA_VERSIONS.thresholds,
|
|
1393
1599
|
// v1 → v2 changes no content (02-REQ-33): a v1 file of kind custom fails validation after it.
|
|
1394
|
-
|
|
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 },
|
|
1395
1602
|
schema: thresholdsFile,
|
|
1396
1603
|
extraChecks(document, sink) {
|
|
1397
1604
|
const entries2 = document.entries;
|
|
1398
1605
|
for (const [name, entry] of Object.entries(entries2)) {
|
|
1399
1606
|
if (typeof entry.until === "string" && !isCalendarDate(entry.until)) {
|
|
1400
|
-
sink.add(
|
|
1607
|
+
sink.add(chunkVYODYUEL_cjs.child(chunkVYODYUEL_cjs.child("/entries", name), "until"), "must be an existing calendar date");
|
|
1401
1608
|
}
|
|
1402
1609
|
}
|
|
1403
1610
|
}
|
|
@@ -1439,7 +1646,7 @@ function thresholdsFileName(prefix, kind2, env) {
|
|
|
1439
1646
|
function thresholdsFilePaths(location) {
|
|
1440
1647
|
const dir = resolvePath(location.configDir, location.dir);
|
|
1441
1648
|
const path = (kind2) => resolvePath(dir, thresholdsFileName(location.filePrefix, kind2, location.env));
|
|
1442
|
-
return Object.fromEntries(
|
|
1649
|
+
return Object.fromEntries(chunkVXGTC6DB_cjs.KINDS.map((kind2) => [kind2, path(kind2)]));
|
|
1443
1650
|
}
|
|
1444
1651
|
async function loadFile(location, kind2) {
|
|
1445
1652
|
const absolute = thresholdsFilePaths(location)[kind2];
|
|
@@ -1487,8 +1694,49 @@ async function loadFile(location, kind2) {
|
|
|
1487
1694
|
};
|
|
1488
1695
|
}
|
|
1489
1696
|
async function loadThresholds(location) {
|
|
1490
|
-
const files = await Promise.all(
|
|
1491
|
-
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
|
+
};
|
|
1492
1740
|
}
|
|
1493
1741
|
|
|
1494
1742
|
// src/core/evaluate/files.ts
|
|
@@ -1504,7 +1752,7 @@ function envlessPath(path, env) {
|
|
|
1504
1752
|
return path.endsWith(suffix) ? `${path.slice(0, -suffix.length)}.json` : path;
|
|
1505
1753
|
}
|
|
1506
1754
|
function missingFileWarning(file, env) {
|
|
1507
|
-
const derive = `Derive thresholds with \`${
|
|
1755
|
+
const derive = `Derive thresholds with \`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\`${env === null ? "" : ` (environment "${env}")`}.`;
|
|
1508
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.` : "";
|
|
1509
1757
|
return {
|
|
1510
1758
|
code: "THRESHOLDS_FILE_MISSING",
|
|
@@ -1516,11 +1764,11 @@ function emptyFileWarning(path, kind2, env) {
|
|
|
1516
1764
|
return {
|
|
1517
1765
|
code: "THRESHOLDS_FILE_EMPTY",
|
|
1518
1766
|
message: `Thresholds file ${path} has no entries; ${KIND_NOUN[kind2]} keys are evaluated with default thresholds.`,
|
|
1519
|
-
hint: `Derive thresholds with \`${
|
|
1767
|
+
hint: `Derive thresholds with \`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\`${env === null ? "" : ` (environment "${env}")`}.`
|
|
1520
1768
|
};
|
|
1521
1769
|
}
|
|
1522
1770
|
var MAX_KEYS_IN_MESSAGE = 3;
|
|
1523
|
-
function keysOnDefaultsWarning(path, kind2, keys, env) {
|
|
1771
|
+
function keysOnDefaultsWarning(path, kind2, keys, env, operationKeys = false) {
|
|
1524
1772
|
const one = keys.length === 1;
|
|
1525
1773
|
const named = keys.slice(0, MAX_KEYS_IN_MESSAGE).join(", ");
|
|
1526
1774
|
const rest = keys.length - MAX_KEYS_IN_MESSAGE;
|
|
@@ -1528,9 +1776,10 @@ function keysOnDefaultsWarning(path, kind2, keys, env) {
|
|
|
1528
1776
|
return {
|
|
1529
1777
|
code: "THRESHOLDS_KEYS_ON_DEFAULTS",
|
|
1530
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}.`,
|
|
1531
|
-
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.`
|
|
1532
1780
|
};
|
|
1533
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.`;
|
|
1534
1783
|
function majorMinor(version2) {
|
|
1535
1784
|
return version2.split(".").slice(0, 2).join(".");
|
|
1536
1785
|
}
|
|
@@ -1547,6 +1796,7 @@ function sourceDifferences(generated, source) {
|
|
|
1547
1796
|
const diffs = [];
|
|
1548
1797
|
let timing = false;
|
|
1549
1798
|
let keys = false;
|
|
1799
|
+
let cold2 = false;
|
|
1550
1800
|
if (!sameList(generated.browsers, source.browsers)) {
|
|
1551
1801
|
diffs.push(`browsers ${listText(generated.browsers)} / ${listText(source.browsers)}`);
|
|
1552
1802
|
timing = true;
|
|
@@ -1568,8 +1818,13 @@ function sourceDifferences(generated, source) {
|
|
|
1568
1818
|
diffs.push(`normalization ${generated.normalization} / ${source.normalization}`);
|
|
1569
1819
|
keys = true;
|
|
1570
1820
|
}
|
|
1571
|
-
|
|
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 };
|
|
1572
1826
|
}
|
|
1827
|
+
var COLD_SAMPLES_HINT = `Another measure.coldSamples changes which samples are timed: derive thresholds again with \`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\`.`;
|
|
1573
1828
|
function generatedWarnings(path, generated, cfg, env, source) {
|
|
1574
1829
|
const issues = [];
|
|
1575
1830
|
const level = cfg.checks.time.percentile.level;
|
|
@@ -1577,7 +1832,7 @@ function generatedWarnings(path, generated, cfg, env, source) {
|
|
|
1577
1832
|
issues.push({
|
|
1578
1833
|
code: "EVAL_PERCENTILE_MISMATCH",
|
|
1579
1834
|
message: `Thresholds in ${path} were derived for ${generated.evaluatedPercentile}, but this run evaluates ${level}; the percentile limits are compared with ${level}.`,
|
|
1580
|
-
hint: `Derive thresholds again with \`${
|
|
1835
|
+
hint: `Derive thresholds again with \`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\` after changing checks.time.percentile.level.`
|
|
1581
1836
|
});
|
|
1582
1837
|
}
|
|
1583
1838
|
if (generated.env !== env) {
|
|
@@ -1588,7 +1843,7 @@ function generatedWarnings(path, generated, cfg, env, source) {
|
|
|
1588
1843
|
hint: "The file was probably copied or renamed by hand; derive thresholds for this environment."
|
|
1589
1844
|
});
|
|
1590
1845
|
}
|
|
1591
|
-
const { diffs, timing, keys } = sourceDifferences(generated, source);
|
|
1846
|
+
const { diffs, timing, keys, cold: cold2 } = sourceDifferences(generated, source);
|
|
1592
1847
|
if (diffs.length > 0) {
|
|
1593
1848
|
const hints = [];
|
|
1594
1849
|
if (timing) {
|
|
@@ -1598,9 +1853,10 @@ function generatedWarnings(path, generated, cfg, env, source) {
|
|
|
1598
1853
|
}
|
|
1599
1854
|
if (keys) {
|
|
1600
1855
|
hints.push(
|
|
1601
|
-
|
|
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."
|
|
1602
1857
|
);
|
|
1603
1858
|
}
|
|
1859
|
+
if (cold2) hints.push(COLD_SAMPLES_HINT);
|
|
1604
1860
|
issues.push({
|
|
1605
1861
|
code: "THRESHOLDS_SOURCE_MISMATCH",
|
|
1606
1862
|
message: `Thresholds in ${path} come from a run with other conditions (thresholds / this run): ${diffs.join("; ")}.`,
|
|
@@ -1609,18 +1865,22 @@ function generatedWarnings(path, generated, cfg, env, source) {
|
|
|
1609
1865
|
}
|
|
1610
1866
|
return issues;
|
|
1611
1867
|
}
|
|
1612
|
-
function unseenWarning(path, unseen) {
|
|
1868
|
+
function unseenWarning(path, unseen, operationKeys = false) {
|
|
1613
1869
|
return {
|
|
1614
1870
|
code: "THRESHOLDS_UNSEEN_ENTRIES",
|
|
1615
1871
|
message: `${plural(unseen.length, "entry", "entries")} in ${path} ${unseen.length === 1 ? "was" : "were"} not seen in this run.`,
|
|
1616
|
-
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}\`.`
|
|
1617
1873
|
};
|
|
1618
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
|
+
}
|
|
1619
1879
|
function outdatedWarning(path, from, current) {
|
|
1620
1880
|
return {
|
|
1621
1881
|
code: "THRESHOLDS_FILE_OUTDATED",
|
|
1622
1882
|
message: `Thresholds file ${path} has format version ${from}; it was read after migration to version ${current}.`,
|
|
1623
|
-
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.`
|
|
1624
1884
|
};
|
|
1625
1885
|
}
|
|
1626
1886
|
function fileInfo(file, unseenKeys) {
|
|
@@ -1634,6 +1894,9 @@ function fileInfo(file, unseenKeys) {
|
|
|
1634
1894
|
}
|
|
1635
1895
|
|
|
1636
1896
|
// src/core/evaluate/limits.ts
|
|
1897
|
+
function defaultNonSuccess(checks, kind2) {
|
|
1898
|
+
return kind2 === "api" ? checks.nonSuccess.limit.api : null;
|
|
1899
|
+
}
|
|
1637
1900
|
function defaultLimits(checks, kind2) {
|
|
1638
1901
|
return {
|
|
1639
1902
|
t: null,
|
|
@@ -1642,7 +1905,8 @@ function defaultLimits(checks, kind2) {
|
|
|
1642
1905
|
p99: checks.time.p99.limit[kind2],
|
|
1643
1906
|
minApdex: null,
|
|
1644
1907
|
maxWilson: null,
|
|
1645
|
-
maxErrorRate: checks.errors.limit[kind2]
|
|
1908
|
+
maxErrorRate: checks.errors.limit[kind2],
|
|
1909
|
+
maxNonSuccessRate: defaultNonSuccess(checks, kind2)
|
|
1646
1910
|
};
|
|
1647
1911
|
}
|
|
1648
1912
|
function entryLimits(entry, checks, kind2) {
|
|
@@ -1655,7 +1919,9 @@ function entryLimits(entry, checks, kind2) {
|
|
|
1655
1919
|
p99: entry.p99 ?? defaults.p99,
|
|
1656
1920
|
minApdex: t === null ? null : entry.minApdex === void 0 ? checks.slowShare.apdex.limit[kind2] : entry.minApdex,
|
|
1657
1921
|
maxWilson: t === null ? null : entry.maxWilson === void 0 ? checks.slowShare.wilson.limit[kind2] : entry.maxWilson,
|
|
1658
|
-
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
|
|
1659
1925
|
};
|
|
1660
1926
|
}
|
|
1661
1927
|
|
|
@@ -1735,29 +2001,6 @@ function hashHex(input) {
|
|
|
1735
2001
|
return hash53(input, FIXED_HASH_SEED).toString(16).padStart(14, "0");
|
|
1736
2002
|
}
|
|
1737
2003
|
|
|
1738
|
-
// src/core/stats/classification.ts
|
|
1739
|
-
var ABORT_TEXTS = new Set(chunkLEIBG5A4_cjs.ABORT_FAILURE_TEXTS);
|
|
1740
|
-
function requestStatusLabel(sample) {
|
|
1741
|
-
const { status } = sample;
|
|
1742
|
-
if (typeof status === "number") return String(status);
|
|
1743
|
-
if (status === "FAILED" && sample.failureText !== void 0 && ABORT_TEXTS.has(sample.failureText)) {
|
|
1744
|
-
return "ABORTED";
|
|
1745
|
-
}
|
|
1746
|
-
return status;
|
|
1747
|
-
}
|
|
1748
|
-
var STATUS_CLASS = /^([1-9])xx$/u;
|
|
1749
|
-
var HTTP_CODE = /^[1-9]\d\d$/u;
|
|
1750
|
-
function compileStatusMatcher(patterns) {
|
|
1751
|
-
const classes = /* @__PURE__ */ new Set();
|
|
1752
|
-
const exact = /* @__PURE__ */ new Set();
|
|
1753
|
-
for (const pattern of patterns) {
|
|
1754
|
-
const match = STATUS_CLASS.exec(pattern);
|
|
1755
|
-
if (match?.[1] !== void 0) classes.add(match[1]);
|
|
1756
|
-
else exact.add(pattern);
|
|
1757
|
-
}
|
|
1758
|
-
return (label) => exact.has(label) || HTTP_CODE.test(label) && classes.has(label.charAt(0));
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
2004
|
// src/core/stats/identity.ts
|
|
1762
2005
|
function testIdentity(project, file, title2) {
|
|
1763
2006
|
return `${project}\0${file}\0${title2}`;
|
|
@@ -2122,7 +2365,7 @@ function costOf(test) {
|
|
|
2122
2365
|
const topKeys = keys.map((key2) => {
|
|
2123
2366
|
const index = test.keys.get(key2) ?? -1;
|
|
2124
2367
|
return { key: key2, count: test.counts[index] ?? 0, tenths: test.sums[index] ?? 0 };
|
|
2125
|
-
}).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 }));
|
|
2126
2369
|
return {
|
|
2127
2370
|
title: test.title,
|
|
2128
2371
|
project: test.project,
|
|
@@ -2167,6 +2410,10 @@ function waterfallOf(meta, tenths, requests) {
|
|
|
2167
2410
|
// src/core/stats/aggregator.ts
|
|
2168
2411
|
var SLOWEST = 3;
|
|
2169
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;
|
|
2170
2417
|
function compareText4(a, b) {
|
|
2171
2418
|
return a < b ? -1 : a > b ? 1 : 0;
|
|
2172
2419
|
}
|
|
@@ -2183,6 +2430,17 @@ var KeyState = class {
|
|
|
2183
2430
|
kind;
|
|
2184
2431
|
count = 0;
|
|
2185
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();
|
|
2186
2444
|
errorCount = 0;
|
|
2187
2445
|
fromFailedTests = 0;
|
|
2188
2446
|
browser = 0;
|
|
@@ -2248,13 +2506,27 @@ var Aggregator = class {
|
|
|
2248
2506
|
withoutBrowserTiming = 0;
|
|
2249
2507
|
keysWithoutBrowserTiming = /* @__PURE__ */ new Set();
|
|
2250
2508
|
testBreakdown = new TestBreakdownBuilder();
|
|
2509
|
+
/** Keys for STATS_COLD_SLOW (08-REQ-44), filled by finalize(). */
|
|
2510
|
+
coldSlow = [];
|
|
2251
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;
|
|
2252
2514
|
constructor(opts) {
|
|
2253
2515
|
this.opts = opts;
|
|
2254
2516
|
this.isSuccess = compileStatusMatcher(opts.successStatuses);
|
|
2255
2517
|
this.isError = compileStatusMatcher(opts.errors.statuses);
|
|
2256
2518
|
this.percentiles = percentileNames(opts.evaluatedPercentile);
|
|
2257
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
|
+
}
|
|
2258
2530
|
/**
|
|
2259
2531
|
* Adds a request sample under `key`. `origin` and `label` come from the KeyResult (07); null
|
|
2260
2532
|
* when the URL could not be parsed (07-REQ-23), then the sample is not counted in origins.
|
|
@@ -2280,6 +2552,12 @@ var Aggregator = class {
|
|
|
2280
2552
|
else state.browser += 1;
|
|
2281
2553
|
const successful = typeof sample.status === "number" && this.isSuccess(statusLabel);
|
|
2282
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
|
+
}
|
|
2283
2561
|
if (successful && sample.timeSource === "node" && !apiCall) {
|
|
2284
2562
|
this.withoutBrowserTiming += 1;
|
|
2285
2563
|
this.keysWithoutBrowserTiming.add(key2);
|
|
@@ -2375,17 +2653,26 @@ var Aggregator = class {
|
|
|
2375
2653
|
return state;
|
|
2376
2654
|
}
|
|
2377
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) {
|
|
2378
2670
|
const tenths = toTenths(time.duration);
|
|
2379
2671
|
state.successCount += 1;
|
|
2380
2672
|
state.sumTenths += tenths;
|
|
2381
2673
|
if (tenths < state.minTenths) state.minTenths = tenths;
|
|
2382
2674
|
if (tenths > state.maxTenths) state.maxTenths = tenths;
|
|
2383
|
-
|
|
2384
|
-
if (r2 === void 0) {
|
|
2385
|
-
r2 = this.resultIds.length;
|
|
2386
|
-
this.resultIds.push(test.resultId);
|
|
2387
|
-
this.resultIndex.set(test.resultId, r2);
|
|
2388
|
-
}
|
|
2675
|
+
const r2 = this.resultIndexOf(test.resultId);
|
|
2389
2676
|
const id = sampleId(test.resultId, state.kind, ordinal);
|
|
2390
2677
|
const priority = hash53(`${key2}\0${id}`, this.opts.advanced.seed);
|
|
2391
2678
|
state.sample.add(priority, tenths, time.ttfb === null ? -1 : toTenths(time.ttfb), r2, ordinal);
|
|
@@ -2398,11 +2685,77 @@ var Aggregator = class {
|
|
|
2398
2685
|
...time.url === void 0 ? {} : { url: time.url }
|
|
2399
2686
|
});
|
|
2400
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
|
+
}
|
|
2401
2754
|
build(states) {
|
|
2402
2755
|
const result2 = {};
|
|
2403
2756
|
for (const key2 of [...states.keys()].sort(compareText4)) {
|
|
2404
2757
|
const state = states.get(key2);
|
|
2405
|
-
if (state !== void 0) result2[key2] = this.aggregate(state);
|
|
2758
|
+
if (state !== void 0) result2[key2] = this.aggregate(state, key2);
|
|
2406
2759
|
}
|
|
2407
2760
|
return result2;
|
|
2408
2761
|
}
|
|
@@ -2412,14 +2765,15 @@ var Aggregator = class {
|
|
|
2412
2765
|
const state = this.steps.get(key2);
|
|
2413
2766
|
if (state === void 0) continue;
|
|
2414
2767
|
result2[key2] = {
|
|
2415
|
-
...this.aggregate(state),
|
|
2768
|
+
...this.aggregate(state, key2),
|
|
2416
2769
|
location: state.location,
|
|
2417
2770
|
stepErrorsFromFailedTests: state.stepErrorsFromFailedTests
|
|
2418
2771
|
};
|
|
2419
2772
|
}
|
|
2420
2773
|
return result2;
|
|
2421
2774
|
}
|
|
2422
|
-
aggregate(state) {
|
|
2775
|
+
aggregate(state, key2) {
|
|
2776
|
+
const cold2 = this.settleCold(state, key2);
|
|
2423
2777
|
const durations = state.sample.durations().map((t) => t / 10);
|
|
2424
2778
|
const ttfbs = state.sample.ttfbs().map((t) => t / 10);
|
|
2425
2779
|
const others = state.sample.othersThanTtfb().map((t) => t / 10);
|
|
@@ -2449,13 +2803,7 @@ var Aggregator = class {
|
|
|
2449
2803
|
slowest: state.slowest.map((s) => ({
|
|
2450
2804
|
duration: s.tenths / 10,
|
|
2451
2805
|
startedAt: new Date(s.startedAt).toISOString(),
|
|
2452
|
-
test:
|
|
2453
|
-
title: s.test.title,
|
|
2454
|
-
project: s.test.project,
|
|
2455
|
-
file: s.test.file,
|
|
2456
|
-
line: s.test.line,
|
|
2457
|
-
repeatEachIndex: s.test.repeatEachIndex
|
|
2458
|
-
},
|
|
2806
|
+
test: testRefOf(s.test),
|
|
2459
2807
|
...s.url === void 0 ? {} : { url: s.url }
|
|
2460
2808
|
})),
|
|
2461
2809
|
topTests: [...state.tests.values()].map(({ title: title2, project, file, line, sampleCount }) => ({
|
|
@@ -2470,9 +2818,24 @@ var Aggregator = class {
|
|
|
2470
2818
|
sampled: state.successCount > this.opts.advanced.maxSamplesPerKey
|
|
2471
2819
|
},
|
|
2472
2820
|
// Bins of the retained durations; null exactly when stats is null (08-REQ-34).
|
|
2473
|
-
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)
|
|
2474
2825
|
};
|
|
2475
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
|
+
}
|
|
2476
2839
|
issues() {
|
|
2477
2840
|
const issues = [];
|
|
2478
2841
|
const plural5 = (n, word) => `${n} ${word}${n === 1 ? "" : "s"}`;
|
|
@@ -2500,9 +2863,32 @@ var Aggregator = class {
|
|
|
2500
2863
|
hint: "Measure one browser engine per run: select projects of one engine with --project in the measurement command."
|
|
2501
2864
|
});
|
|
2502
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
|
+
}
|
|
2503
2877
|
return issues;
|
|
2504
2878
|
}
|
|
2505
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
|
+
}
|
|
2506
2892
|
function addKeyedRequest(aggregator, keyOf, sample, browserName) {
|
|
2507
2893
|
const result2 = keyOf(sample);
|
|
2508
2894
|
if (result2.ok) {
|
|
@@ -2511,9 +2897,14 @@ function addKeyedRequest(aggregator, keyOf, sample, browserName) {
|
|
|
2511
2897
|
return result2;
|
|
2512
2898
|
}
|
|
2513
2899
|
function addKeyedApiRequest(aggregator, keyOf, sample) {
|
|
2514
|
-
const result2 = keyOf({
|
|
2900
|
+
const result2 = keyOf({
|
|
2901
|
+
method: sample.method,
|
|
2902
|
+
url: sample.url,
|
|
2903
|
+
resourceType: "request",
|
|
2904
|
+
operation: sample.operation ?? null
|
|
2905
|
+
});
|
|
2515
2906
|
if (!result2.ok) return result2;
|
|
2516
|
-
const key2 = `${
|
|
2907
|
+
const key2 = `${chunkVXGTC6DB_cjs.REQUEST_KEY_PREFIX}${result2.key}`;
|
|
2517
2908
|
const request = {
|
|
2518
2909
|
method: sample.method,
|
|
2519
2910
|
url: sample.url,
|
|
@@ -2578,7 +2969,7 @@ function timeCheck(rule, actual, limit, m) {
|
|
|
2578
2969
|
return { rule, n: m, actual, observed: null, limit, passed: !(actual > limit) };
|
|
2579
2970
|
}
|
|
2580
2971
|
function runRules(stats2, limits, cfg) {
|
|
2581
|
-
const { time, slowShare, errors } = cfg.checks;
|
|
2972
|
+
const { time, slowShare, errors, nonSuccess } = cfg.checks;
|
|
2582
2973
|
const n = stats2.successCount;
|
|
2583
2974
|
const bigN = stats2.count;
|
|
2584
2975
|
const durations = [...stats2.samples.durations].sort((a, b) => a - b);
|
|
@@ -2663,6 +3054,25 @@ function runRules(stats2, limits, cfg) {
|
|
|
2663
3054
|
passed: !(actual > limits.maxErrorRate)
|
|
2664
3055
|
};
|
|
2665
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
|
+
}
|
|
2666
3076
|
}
|
|
2667
3077
|
];
|
|
2668
3078
|
const hardLimitFactor = cfg.gate.hardLimitFactor;
|
|
@@ -2684,6 +3094,81 @@ function sourceForKind(source, kind2) {
|
|
|
2684
3094
|
return kind2 === "step" ? { ...source, normalization: source.stepNormalization ?? "" } : source;
|
|
2685
3095
|
}
|
|
2686
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
|
+
|
|
2687
3172
|
// src/core/evaluate/evaluate.ts
|
|
2688
3173
|
function allowedViolations(tolerance, evaluated) {
|
|
2689
3174
|
if (typeof tolerance === "number") return tolerance;
|
|
@@ -2694,7 +3179,7 @@ function allowedViolations(tolerance, evaluated) {
|
|
|
2694
3179
|
const scaledPercent = Number(match[1]) * scale + (decimals === "" ? 0 : Number(decimals));
|
|
2695
3180
|
return Math.floor(scaledPercent * evaluated / (100 * scale));
|
|
2696
3181
|
}
|
|
2697
|
-
function evaluateKey(key2, stats2, kind2, thresholds, cfg, runDay) {
|
|
3182
|
+
function evaluateKey(key2, stats2, kind2, thresholds, cfg, runDay, run) {
|
|
2698
3183
|
const file = thresholds[kind2];
|
|
2699
3184
|
if (file.status === "invalid") {
|
|
2700
3185
|
return {
|
|
@@ -2703,7 +3188,8 @@ function evaluateKey(key2, stats2, kind2, thresholds, cfg, runDay) {
|
|
|
2703
3188
|
thresholdSource: "default",
|
|
2704
3189
|
limits: defaultLimits(cfg.checks, kind2),
|
|
2705
3190
|
checks: [],
|
|
2706
|
-
muted: null
|
|
3191
|
+
muted: null,
|
|
3192
|
+
workload: null
|
|
2707
3193
|
};
|
|
2708
3194
|
}
|
|
2709
3195
|
const entries2 = file.status === "loaded" ? file.file.entries : {};
|
|
@@ -2716,7 +3202,8 @@ function evaluateKey(key2, stats2, kind2, thresholds, cfg, runDay) {
|
|
|
2716
3202
|
thresholdSource: entry === void 0 ? "default" : "file",
|
|
2717
3203
|
limits,
|
|
2718
3204
|
checks,
|
|
2719
|
-
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)
|
|
2720
3207
|
};
|
|
2721
3208
|
}
|
|
2722
3209
|
function qualifies(evaluation, gate) {
|
|
@@ -2724,7 +3211,7 @@ function qualifies(evaluation, gate) {
|
|
|
2724
3211
|
return !isMuteActive(evaluation.muted);
|
|
2725
3212
|
}
|
|
2726
3213
|
function applyGate(perKey, gate) {
|
|
2727
|
-
const all =
|
|
3214
|
+
const all = chunkVXGTC6DB_cjs.KINDS.flatMap((kind2) => Object.values(perKey[kind2]));
|
|
2728
3215
|
const qualified = all.filter(
|
|
2729
3216
|
(e) => qualifies(e, gate) && e.checks.some((check2) => !check2.passed)
|
|
2730
3217
|
);
|
|
@@ -2774,7 +3261,7 @@ function evaluationStatus2(perKey, thresholds, fatalToolError, kinds) {
|
|
|
2774
3261
|
if (fatalToolError || kinds.some((kind2) => thresholds[kind2].status === "invalid")) {
|
|
2775
3262
|
return "error";
|
|
2776
3263
|
}
|
|
2777
|
-
const checks =
|
|
3264
|
+
const checks = chunkVXGTC6DB_cjs.KINDS.flatMap((kind2) => Object.values(perKey[kind2])).flatMap((e) => e.checks);
|
|
2778
3265
|
if (checks.some((c) => c.blocking)) return "failed";
|
|
2779
3266
|
if (checks.some((c) => !c.passed)) return "warned";
|
|
2780
3267
|
return "passed";
|
|
@@ -2786,11 +3273,16 @@ function evaluate(aggregates, thresholds, cfg, opts) {
|
|
|
2786
3273
|
step: aggregates.steps ?? {}
|
|
2787
3274
|
};
|
|
2788
3275
|
const perKey = { api: {}, step: {} };
|
|
2789
|
-
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
|
+
};
|
|
2790
3282
|
for (const key2 of Object.keys(byKind[kind2]).sort(compareText)) {
|
|
2791
3283
|
const stats2 = byKind[kind2][key2];
|
|
2792
3284
|
if (stats2 !== void 0) {
|
|
2793
|
-
perKey[kind2][key2] = evaluateKey(key2, stats2, kind2, thresholds, cfg, runDay);
|
|
3285
|
+
perKey[kind2][key2] = evaluateKey(key2, stats2, kind2, thresholds, cfg, runDay, run);
|
|
2794
3286
|
}
|
|
2795
3287
|
}
|
|
2796
3288
|
}
|
|
@@ -2799,7 +3291,7 @@ function evaluate(aggregates, thresholds, cfg, opts) {
|
|
|
2799
3291
|
const toolErrors = [];
|
|
2800
3292
|
const thresholdFiles = [];
|
|
2801
3293
|
const unseenCount = { api: 0, step: 0 };
|
|
2802
|
-
const activeKinds =
|
|
3294
|
+
const activeKinds = chunkVXGTC6DB_cjs.KINDS.filter(
|
|
2803
3295
|
(kind2) => kind2 === "step" ? cfg.measure.steps.enabled : cfg.measure.api
|
|
2804
3296
|
);
|
|
2805
3297
|
for (const kind2 of activeKinds) {
|
|
@@ -2832,14 +3324,35 @@ function evaluate(aggregates, thresholds, cfg, opts) {
|
|
|
2832
3324
|
)
|
|
2833
3325
|
);
|
|
2834
3326
|
}
|
|
3327
|
+
const operationKeys = operationKeysChanged(
|
|
3328
|
+
kind2,
|
|
3329
|
+
file.file.generated,
|
|
3330
|
+
sourceForKind(opts.source, kind2),
|
|
3331
|
+
Object.keys(byKind[kind2])
|
|
3332
|
+
);
|
|
2835
3333
|
unseen = Object.keys(file.file.entries).filter((key2) => !Object.hasOwn(byKind[kind2], key2)).sort(compareText);
|
|
2836
|
-
if (unseen.length > 0) warnings.push(unseenWarning(file.path, unseen));
|
|
3334
|
+
if (unseen.length > 0) warnings.push(unseenWarning(file.path, unseen, operationKeys));
|
|
2837
3335
|
if (opts.mode === "test" && Object.keys(file.file.entries).length > 0) {
|
|
2838
|
-
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);
|
|
2839
3339
|
if (onDefaults.length > 0) {
|
|
2840
|
-
warnings.push(
|
|
3340
|
+
warnings.push(
|
|
3341
|
+
keysOnDefaultsWarning(file.path, kind2, onDefaults, opts.env, operationKeys)
|
|
3342
|
+
);
|
|
2841
3343
|
}
|
|
2842
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
|
+
}
|
|
2843
3356
|
}
|
|
2844
3357
|
unseenCount[kind2] = unseen.length;
|
|
2845
3358
|
thresholdFiles.push(fileInfo(file, unseen));
|
|
@@ -2848,14 +3361,14 @@ function evaluate(aggregates, thresholds, cfg, opts) {
|
|
|
2848
3361
|
api: countKind(perKey.api, unseenCount.api),
|
|
2849
3362
|
step: countKind(perKey.step, unseenCount.step)
|
|
2850
3363
|
};
|
|
2851
|
-
if (
|
|
3364
|
+
if (chunkVXGTC6DB_cjs.KINDS.every((kind2) => Object.keys(byKind[kind2]).length === 0)) {
|
|
2852
3365
|
warnings.push({
|
|
2853
3366
|
code: "EVAL_NO_SAMPLES",
|
|
2854
3367
|
message: "The run recorded no samples, so nothing was evaluated.",
|
|
2855
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."
|
|
2856
3369
|
});
|
|
2857
3370
|
}
|
|
2858
|
-
const notEvaluated =
|
|
3371
|
+
const notEvaluated = chunkVXGTC6DB_cjs.KINDS.reduce((sum3, kind2) => sum3 + counts[kind2].fileEntriesNotEvaluated, 0);
|
|
2859
3372
|
if (notEvaluated > 0) {
|
|
2860
3373
|
warnings.push({
|
|
2861
3374
|
code: "THRESHOLDS_ENTRIES_NOT_EVALUATED",
|
|
@@ -2863,7 +3376,7 @@ function evaluate(aggregates, thresholds, cfg, opts) {
|
|
|
2863
3376
|
hint: `Run more passes (run.passes or PW_PERF_PASSES), or accept that the endpoint is called rarely.`
|
|
2864
3377
|
});
|
|
2865
3378
|
}
|
|
2866
|
-
const mutedKeys =
|
|
3379
|
+
const mutedKeys = chunkVXGTC6DB_cjs.KINDS.flatMap(
|
|
2867
3380
|
(kind2) => Object.entries(perKey[kind2]).flatMap(
|
|
2868
3381
|
([key2, e]) => e.muted === null ? [] : [{ kind: kind2, key: key2, muted: e.muted }]
|
|
2869
3382
|
)
|
|
@@ -2885,7 +3398,7 @@ function percent(share2) {
|
|
|
2885
3398
|
return `${Math.round(share2 * 1e3) / 10}%`;
|
|
2886
3399
|
}
|
|
2887
3400
|
function assessRun(input, gate) {
|
|
2888
|
-
const { tests, maxFailures
|
|
3401
|
+
const { tests, maxFailures } = input;
|
|
2889
3402
|
const warnings = [];
|
|
2890
3403
|
const toolErrors = [];
|
|
2891
3404
|
const executions = tests.expected + tests.unexpected + tests.flaky;
|
|
@@ -2913,13 +3426,6 @@ function assessRun(input, gate) {
|
|
|
2913
3426
|
hint: "Raise the global timeout or maxFailures for perf runs, or measure a smaller subset of tests."
|
|
2914
3427
|
});
|
|
2915
3428
|
}
|
|
2916
|
-
if (sharded) {
|
|
2917
|
-
toolErrors.push({
|
|
2918
|
-
code: "RUN_SHARDED",
|
|
2919
|
-
message: "The perf-mode run is sharded (--shard): each machine would evaluate only part of the keys.",
|
|
2920
|
-
hint: "Run perf mode on one machine without --shard."
|
|
2921
|
-
});
|
|
2922
|
-
}
|
|
2923
3429
|
return { warnings, toolErrors };
|
|
2924
3430
|
}
|
|
2925
3431
|
function buildOutcome(report, paths) {
|
|
@@ -2952,7 +3458,9 @@ function parseKey(key2) {
|
|
|
2952
3458
|
const head = key2.slice(0, slash);
|
|
2953
3459
|
if (head.slice(space + 1).includes("?")) return null;
|
|
2954
3460
|
const rest = key2.slice(slash + 1);
|
|
2955
|
-
const
|
|
3461
|
+
const hash = rest.indexOf("#");
|
|
3462
|
+
const question = rest.indexOf("?");
|
|
3463
|
+
const mark = hash >= 0 && (question < 0 || hash < question) ? hash : question;
|
|
2956
3464
|
const path = mark < 0 ? rest : rest.slice(0, mark);
|
|
2957
3465
|
return {
|
|
2958
3466
|
head,
|
|
@@ -2995,6 +3503,14 @@ function detectKeyExplosion(endpointKeys) {
|
|
|
2995
3503
|
return issues;
|
|
2996
3504
|
}
|
|
2997
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
|
+
|
|
2998
3514
|
// src/core/normalize/patterns.ts
|
|
2999
3515
|
var ID_PATTERNS = {
|
|
3000
3516
|
number: /^[0-9]+$/,
|
|
@@ -3099,17 +3615,17 @@ function truncateKey(key2) {
|
|
|
3099
3615
|
function originLabels(origins, baseOrigins) {
|
|
3100
3616
|
const exact = /* @__PURE__ */ new Map();
|
|
3101
3617
|
for (const [origin, label] of Object.entries(origins)) {
|
|
3102
|
-
if (
|
|
3618
|
+
if (chunkVYODYUEL_cjs.isHostPattern(origin)) continue;
|
|
3103
3619
|
const canonical = canonicalOrigin(origin);
|
|
3104
3620
|
if (canonical !== null) exact.set(canonical, label);
|
|
3105
3621
|
}
|
|
3106
|
-
const patterns =
|
|
3622
|
+
const patterns = chunkVYODYUEL_cjs.compileHostPatterns(origins);
|
|
3107
3623
|
const base = new Set(canonicalOrigins(baseOrigins));
|
|
3108
3624
|
const memo = /* @__PURE__ */ new Map();
|
|
3109
3625
|
return (url) => {
|
|
3110
3626
|
const known = memo.get(url.origin);
|
|
3111
3627
|
if (known !== void 0) return known;
|
|
3112
|
-
const label = exact.get(url.origin) ??
|
|
3628
|
+
const label = exact.get(url.origin) ?? chunkVYODYUEL_cjs.matchingPattern(patterns, url)?.label ?? (base.has(url.origin) ? "" : null);
|
|
3113
3629
|
memo.set(url.origin, label);
|
|
3114
3630
|
return label;
|
|
3115
3631
|
};
|
|
@@ -3128,10 +3644,16 @@ function createKeyBuilder(cfg, ctx) {
|
|
|
3128
3644
|
const url = parseHttpUrl(sample.url);
|
|
3129
3645
|
const issues = [];
|
|
3130
3646
|
let key2;
|
|
3647
|
+
const operation2 = sample.operation === void 0 || sample.operation === null || sample.operation.length === 0 ? void 0 : sample.operation;
|
|
3131
3648
|
if (keyBuilder !== void 0) {
|
|
3132
3649
|
let built;
|
|
3133
3650
|
try {
|
|
3134
|
-
built = keyBuilder({
|
|
3651
|
+
built = keyBuilder({
|
|
3652
|
+
method,
|
|
3653
|
+
url: sample.url,
|
|
3654
|
+
resourceType: sample.resourceType,
|
|
3655
|
+
operation: operation2 ?? null
|
|
3656
|
+
});
|
|
3135
3657
|
} catch (error) {
|
|
3136
3658
|
issues.push({
|
|
3137
3659
|
code: "NORMALIZE_KEY_BUILDER_THREW",
|
|
@@ -3159,8 +3681,14 @@ function createKeyBuilder(cfg, ctx) {
|
|
|
3159
3681
|
return { ok: false, issues };
|
|
3160
3682
|
}
|
|
3161
3683
|
const label = labelOf(url) ?? url.host;
|
|
3162
|
-
|
|
3163
|
-
|
|
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
|
+
}
|
|
3164
3692
|
}
|
|
3165
3693
|
const truncated = truncateKey(key2);
|
|
3166
3694
|
if (truncated !== key2) {
|
|
@@ -3191,13 +3719,14 @@ function measuredBaseOrigins(projects) {
|
|
|
3191
3719
|
return canonicalOrigins(origins);
|
|
3192
3720
|
}
|
|
3193
3721
|
function normalizationFingerprint(cfg, ctx) {
|
|
3194
|
-
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 };
|
|
3195
3724
|
const keys = {
|
|
3196
3725
|
...rest,
|
|
3197
|
-
extraIdPatterns: extraIdPatterns.map(
|
|
3198
|
-
|
|
3199
|
-
)
|
|
3200
|
-
|
|
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) }))
|
|
3201
3730
|
};
|
|
3202
3731
|
return hashHex(
|
|
3203
3732
|
stringifyStable({
|
|
@@ -3239,7 +3768,8 @@ var RULE_ORDER = [
|
|
|
3239
3768
|
"p99",
|
|
3240
3769
|
"apdex",
|
|
3241
3770
|
"wilson",
|
|
3242
|
-
"errors"
|
|
3771
|
+
"errors",
|
|
3772
|
+
"nonSuccess"
|
|
3243
3773
|
];
|
|
3244
3774
|
function compareText5(a, b) {
|
|
3245
3775
|
return a < b ? -1 : a > b ? 1 : 0;
|
|
@@ -3360,7 +3890,7 @@ var RULES = [
|
|
|
3360
3890
|
return { code: "HINT_MEDIAN_ONLY", params: { n: median.n } };
|
|
3361
3891
|
},
|
|
3362
3892
|
({ evaluation: { result: result2, muted } }) => result2 === "fail" && muted !== null && !muted.expired ? { code: "HINT_MUTED", params: {} } : null,
|
|
3363
|
-
({ count:
|
|
3893
|
+
({ count: count4, fromFailedTests }) => count4 > 0 && fromFailedTests * 2 >= count4 ? { code: "HINT_FAILED_TESTS", params: { share: roundRatio(fromFailedTests / count4) } } : null,
|
|
3364
3894
|
({ evaluation: { result: result2, checks } }) => {
|
|
3365
3895
|
if (result2 !== "pass") return null;
|
|
3366
3896
|
const headroom = keyHeadroom(checks);
|
|
@@ -3448,6 +3978,11 @@ function buildAggregate(stats2, evaluated, rawUrls, hintOptions) {
|
|
|
3448
3978
|
durations: stats2.samples.durations.map(roundMs).sort((a, b) => a - b),
|
|
3449
3979
|
sampled: stats2.samples.sampled
|
|
3450
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
|
+
})),
|
|
3451
3986
|
evaluation,
|
|
3452
3987
|
// Edges are constants of the scale, not rounded (08-REQ-34).
|
|
3453
3988
|
histogram: stats2.histogram === null ? null : {
|
|
@@ -3509,8 +4044,8 @@ function buildRunReport(input) {
|
|
|
3509
4044
|
const rawUrls = input.config.report?.rawUrls === true;
|
|
3510
4045
|
const kindOrder = { api: 0, step: 1 };
|
|
3511
4046
|
const hintOptions = {
|
|
3512
|
-
errorStatuses: input.config.checks?.errors?.statuses ??
|
|
3513
|
-
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
|
|
3514
4049
|
};
|
|
3515
4050
|
const endpoints = buildAggregates(
|
|
3516
4051
|
"api",
|
|
@@ -3536,6 +4071,7 @@ function buildRunReport(input) {
|
|
|
3536
4071
|
host: { ...meta.host },
|
|
3537
4072
|
playwright: { ...meta.playwright },
|
|
3538
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),
|
|
3539
4075
|
runConditions: structuredClone(input.runConditions),
|
|
3540
4076
|
tests: { ...input.tests },
|
|
3541
4077
|
evaluation: {
|
|
@@ -3568,7 +4104,8 @@ var RULE_ORDER2 = [
|
|
|
3568
4104
|
"p99",
|
|
3569
4105
|
"apdex",
|
|
3570
4106
|
"wilson",
|
|
3571
|
-
"errors"
|
|
4107
|
+
"errors",
|
|
4108
|
+
"nonSuccess"
|
|
3572
4109
|
];
|
|
3573
4110
|
var SUITES = [
|
|
3574
4111
|
{ kind: "api", name: "pw-perf endpoints", classname: "pw-perf.endpoints" },
|
|
@@ -3629,11 +4166,13 @@ function failedChecks(evaluation) {
|
|
|
3629
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)
|
|
3630
4167
|
);
|
|
3631
4168
|
}
|
|
3632
|
-
|
|
4169
|
+
var NON_SUCCESS_STATUSES = 3;
|
|
4170
|
+
function checkLine(check2, evaluation, ctx, aggregate2) {
|
|
3633
4171
|
const rule = check2.rule === "percentile" ? ctx.level : check2.rule;
|
|
3634
4172
|
const sign = check2.rule === "apdex" ? "<" : ">";
|
|
3635
4173
|
const source = evaluation.thresholdSource === "file" ? "thresholds file" : "default thresholds";
|
|
3636
|
-
|
|
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}`;
|
|
3637
4176
|
if (check2.hardLimitExceeded) line += ", HARD limit";
|
|
3638
4177
|
if (evaluation.muted?.expired === true) line += `, muting expired on ${evaluation.muted.until}`;
|
|
3639
4178
|
return line;
|
|
@@ -3641,10 +4180,14 @@ function checkLine(check2, evaluation, ctx) {
|
|
|
3641
4180
|
function share(value) {
|
|
3642
4181
|
return value.toFixed(3);
|
|
3643
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
|
+
}
|
|
3644
4187
|
function violationBody(key2, aggregate2, checks, ctx) {
|
|
3645
4188
|
const evaluation = aggregate2.evaluation;
|
|
3646
4189
|
const lines = checks.map(
|
|
3647
|
-
(c) => `${checkLine(c, evaluation, ctx)} (${c.blocking ? "blocking" : "not blocking"})`
|
|
4190
|
+
(c) => `${checkLine(c, evaluation, ctx, aggregate2)} (${c.blocking ? "blocking" : "not blocking"})`
|
|
3648
4191
|
);
|
|
3649
4192
|
const l = evaluation.limits;
|
|
3650
4193
|
let limits = `Limits: median ${formatMs(l.median)}, ${ctx.level} ${formatMs(l.percentile)}, p99 ${formatMs(l.p99)}, errors <= ${share(l.maxErrorRate)}`;
|
|
@@ -3653,6 +4196,7 @@ function violationBody(key2, aggregate2, checks, ctx) {
|
|
|
3653
4196
|
if (l.minApdex !== null) limits += `, apdex >= ${share(l.minApdex)}`;
|
|
3654
4197
|
if (l.maxWilson !== null) limits += `, wilson <= ${share(l.maxWilson)}`;
|
|
3655
4198
|
}
|
|
4199
|
+
if (l.maxNonSuccessRate !== null) limits += `, nonSuccess <= ${share(l.maxNonSuccessRate)}`;
|
|
3656
4200
|
lines.push(limits);
|
|
3657
4201
|
lines.push(`Samples: ${String(aggregate2.count)}, errors ${String(aggregate2.errorCount)}`);
|
|
3658
4202
|
const slowest = aggregate2.slowest[0];
|
|
@@ -3667,16 +4211,16 @@ function violationBody(key2, aggregate2, checks, ctx) {
|
|
|
3667
4211
|
}
|
|
3668
4212
|
function notBlockingReason(evaluation, report) {
|
|
3669
4213
|
const gate = report.config.gate;
|
|
3670
|
-
const defaultThresholds = gate?.defaultThresholds ??
|
|
4214
|
+
const defaultThresholds = gate?.defaultThresholds ?? chunkVYODYUEL_cjs.DEFAULT_CONFIG.gate.defaultThresholds;
|
|
3671
4215
|
if (evaluation.thresholdSource === "default" && defaultThresholds === "warn") {
|
|
3672
4216
|
return "default thresholds only warn (gate.defaultThresholds: warn)";
|
|
3673
4217
|
}
|
|
3674
4218
|
if (!report.evaluation.gateEnabled) return "the gate is off";
|
|
3675
|
-
return `within gate.tolerance (${String(gate?.tolerance ??
|
|
4219
|
+
return `within gate.tolerance (${String(gate?.tolerance ?? chunkVYODYUEL_cjs.DEFAULT_CONFIG.gate.tolerance)})`;
|
|
3676
4220
|
}
|
|
3677
4221
|
function mildestRule(report) {
|
|
3678
4222
|
const checks = report.config.checks;
|
|
3679
|
-
const d =
|
|
4223
|
+
const d = chunkVYODYUEL_cjs.DEFAULT_CONFIG.checks;
|
|
3680
4224
|
const rules = [
|
|
3681
4225
|
{
|
|
3682
4226
|
rule: "median",
|
|
@@ -3735,7 +4279,23 @@ function notEvaluatedMessage(kind2, aggregate2, report) {
|
|
|
3735
4279
|
}
|
|
3736
4280
|
}
|
|
3737
4281
|
function levelOf(report) {
|
|
3738
|
-
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;
|
|
3739
4299
|
}
|
|
3740
4300
|
function keyCase(kind2, classname, key2, aggregate2, ctx) {
|
|
3741
4301
|
const evaluation = aggregate2.evaluation;
|
|
@@ -3755,11 +4315,11 @@ function keyCase(kind2, classname, key2, aggregate2, ctx) {
|
|
|
3755
4315
|
if (blocking !== void 0) {
|
|
3756
4316
|
children.push({
|
|
3757
4317
|
tag: "failure",
|
|
3758
|
-
attrs: { type: blocking.rule, message: checkLine(blocking, evaluation, ctx) },
|
|
4318
|
+
attrs: { type: blocking.rule, message: checkLine(blocking, evaluation, ctx, aggregate2) },
|
|
3759
4319
|
text: body.join("\n")
|
|
3760
4320
|
});
|
|
3761
4321
|
} else if (muted !== null && isMuteActive2(evaluation)) {
|
|
3762
|
-
const exceeded = first2 === void 0 ? "" : `; ${checkLine(first2, evaluation, ctx)}`;
|
|
4322
|
+
const exceeded = first2 === void 0 ? "" : `; ${checkLine(first2, evaluation, ctx, aggregate2)}`;
|
|
3763
4323
|
children.push({
|
|
3764
4324
|
tag: "skipped",
|
|
3765
4325
|
attrs: { message: `muted until ${muted.until}: ${muted.note}${exceeded}` },
|
|
@@ -3772,6 +4332,12 @@ function keyCase(kind2, classname, key2, aggregate2, ctx) {
|
|
|
3772
4332
|
} else if (muted !== null && isMuteActive2(evaluation)) {
|
|
3773
4333
|
children.push({ tag: "system-out", text: `muted until ${muted.until}: ${muted.note}` });
|
|
3774
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
|
+
}
|
|
3775
4341
|
return {
|
|
3776
4342
|
classname,
|
|
3777
4343
|
name: key2,
|
|
@@ -3864,7 +4430,10 @@ function buildJunitXml(report) {
|
|
|
3864
4430
|
const ctx = {
|
|
3865
4431
|
report,
|
|
3866
4432
|
level: levelOf(report),
|
|
3867
|
-
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
|
+
)
|
|
3868
4437
|
};
|
|
3869
4438
|
const ci = report.ci;
|
|
3870
4439
|
const suites = [
|
|
@@ -3880,8 +4449,8 @@ function buildJunitXml(report) {
|
|
|
3880
4449
|
["pw-perf.evaluation", report.evaluation.status],
|
|
3881
4450
|
["pw-perf.exitCode", String(exitCode)],
|
|
3882
4451
|
["pw-perf.passes", `${String(report.passes.completed)}/${String(report.passes.planned)}`],
|
|
3883
|
-
// Number of merged shards (17-REQ-17); 0
|
|
3884
|
-
["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)],
|
|
3885
4454
|
["pw-perf.commit", ci?.commit ?? ""],
|
|
3886
4455
|
["pw-perf.branch", ci?.branch ?? ""],
|
|
3887
4456
|
["pw-perf.buildUrl", ci?.buildUrl ?? ""]
|
|
@@ -3984,6 +4553,19 @@ function modeCommand(mode2, ctx) {
|
|
|
3984
4553
|
}
|
|
3985
4554
|
return perfCommand(mode2, ctx.env, plainCommand(pm) + tail(mode2, ctx, false), ctx.platform);
|
|
3986
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
|
+
}
|
|
3987
4569
|
function nextHint(input) {
|
|
3988
4570
|
const { report, commands, written } = input;
|
|
3989
4571
|
if (report.toolErrors.length > 0) return null;
|
|
@@ -4003,7 +4585,8 @@ function nextHint(input) {
|
|
|
4003
4585
|
return `derive thresholds: ${commands.thresholds}`;
|
|
4004
4586
|
}
|
|
4005
4587
|
if (report.evaluation.status === "failed") {
|
|
4006
|
-
|
|
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}`;
|
|
4007
4590
|
}
|
|
4008
4591
|
return null;
|
|
4009
4592
|
}
|
|
@@ -4691,7 +5274,7 @@ function clamp(x, min, max) {
|
|
|
4691
5274
|
return Math.min(max, Math.max(min, x));
|
|
4692
5275
|
}
|
|
4693
5276
|
function derivationSettings2(cfg, kind2) {
|
|
4694
|
-
const { time, slowShare, errors } = cfg.checks;
|
|
5277
|
+
const { time, slowShare, errors, nonSuccess } = cfg.checks;
|
|
4695
5278
|
return structuredClone({
|
|
4696
5279
|
t: slowShare.t[kind2],
|
|
4697
5280
|
smallSampleN: cfg.thresholds.smallSampleN,
|
|
@@ -4701,10 +5284,20 @@ function derivationSettings2(cfg, kind2) {
|
|
|
4701
5284
|
p99: time.p99.margin,
|
|
4702
5285
|
apdex: slowShare.apdex.margin,
|
|
4703
5286
|
wilson: slowShare.wilson.margin,
|
|
4704
|
-
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 } : {}
|
|
4705
5290
|
}
|
|
4706
5291
|
});
|
|
4707
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
|
+
}
|
|
4708
5301
|
function deriveEntry(stats2, kind2, cfg) {
|
|
4709
5302
|
const level = cfg.checks.time.percentile.level;
|
|
4710
5303
|
const source = withPercentile(stats2, level).stats;
|
|
@@ -4714,7 +5307,7 @@ function deriveEntry(stats2, kind2, cfg) {
|
|
|
4714
5307
|
if (value === void 0) throw new Error(`deriveEntry: aggregate has no percentile "${name}"`);
|
|
4715
5308
|
return value;
|
|
4716
5309
|
};
|
|
4717
|
-
const { time, slowShare, errors } = cfg.checks;
|
|
5310
|
+
const { time, slowShare, errors, nonSuccess } = cfg.checks;
|
|
4718
5311
|
const T = slowShare.t[kind2];
|
|
4719
5312
|
const n = stats2.successCount;
|
|
4720
5313
|
const small = n < cfg.thresholds.smallSampleN;
|
|
@@ -4763,14 +5356,8 @@ function deriveEntry(stats2, kind2, cfg) {
|
|
|
4763
5356
|
);
|
|
4764
5357
|
}
|
|
4765
5358
|
const bigN = stats2.count;
|
|
4766
|
-
const
|
|
4767
|
-
const
|
|
4768
|
-
const em = errors.margin;
|
|
4769
|
-
const maxErrorRate = ceilTo(
|
|
4770
|
-
Math.min(1, Math.max(e * em.factor + em.add, em.min, eLow + ERR_SELF_GAP)),
|
|
4771
|
-
3
|
|
4772
|
-
);
|
|
4773
|
-
return {
|
|
5359
|
+
const maxErrorRate = rateLimit(stats2.errorCount, bigN, errors.margin);
|
|
5360
|
+
const entry = {
|
|
4774
5361
|
t,
|
|
4775
5362
|
median,
|
|
4776
5363
|
percentile: percentileLimit,
|
|
@@ -4779,6 +5366,10 @@ function deriveEntry(stats2, kind2, cfg) {
|
|
|
4779
5366
|
maxWilson,
|
|
4780
5367
|
maxErrorRate
|
|
4781
5368
|
};
|
|
5369
|
+
if (kind2 === "api" && stats2.nonSuccessCount !== null) {
|
|
5370
|
+
entry.maxNonSuccessRate = rateLimit(stats2.nonSuccessCount, bigN, nonSuccess.margin);
|
|
5371
|
+
}
|
|
5372
|
+
return entry;
|
|
4782
5373
|
}
|
|
4783
5374
|
|
|
4784
5375
|
// src/core/thresholds/consistency.ts
|
|
@@ -4799,7 +5390,8 @@ function allRulesOn(checks) {
|
|
|
4799
5390
|
apdex: on(checks.slowShare.apdex),
|
|
4800
5391
|
wilson: on(checks.slowShare.wilson)
|
|
4801
5392
|
},
|
|
4802
|
-
errors: on(checks.errors)
|
|
5393
|
+
errors: on(checks.errors),
|
|
5394
|
+
nonSuccess: on(checks.nonSuccess)
|
|
4803
5395
|
};
|
|
4804
5396
|
}
|
|
4805
5397
|
function entrySelfConsistent(entry, aggregate2, kind2, cfg) {
|
|
@@ -4816,7 +5408,7 @@ function entrySelfConsistent(entry, aggregate2, kind2, cfg) {
|
|
|
4816
5408
|
var MS_LIMITS = /* @__PURE__ */ new Set(["t", "median", "percentile", "p99"]);
|
|
4817
5409
|
var TIME_LIMITS = ["median", "percentile", "p99"];
|
|
4818
5410
|
function isComplete(entry) {
|
|
4819
|
-
return
|
|
5411
|
+
return chunkVXGTC6DB_cjs.LIMIT_NAMES.every((name) => entry[name] !== void 0);
|
|
4820
5412
|
}
|
|
4821
5413
|
function limitsOf(entry) {
|
|
4822
5414
|
return {
|
|
@@ -4826,16 +5418,18 @@ function limitsOf(entry) {
|
|
|
4826
5418
|
p99: entry.p99 ?? null,
|
|
4827
5419
|
minApdex: entry.minApdex ?? null,
|
|
4828
5420
|
maxWilson: entry.maxWilson ?? null,
|
|
4829
|
-
maxErrorRate: entry.maxErrorRate ?? null
|
|
5421
|
+
maxErrorRate: entry.maxErrorRate ?? null,
|
|
5422
|
+
maxNonSuccessRate: entry.maxNonSuccessRate ?? null
|
|
4830
5423
|
};
|
|
4831
5424
|
}
|
|
4832
5425
|
function atMost(a, b) {
|
|
4833
5426
|
return Math.round(a * 1e6) <= Math.round(b * 1e6);
|
|
4834
5427
|
}
|
|
4835
5428
|
function withinHysteresis(before, after, hysteresis) {
|
|
4836
|
-
return
|
|
5429
|
+
return chunkVXGTC6DB_cjs.DIFF_LIMIT_NAMES.every((name) => {
|
|
4837
5430
|
const a = before[name];
|
|
4838
5431
|
const b = after[name];
|
|
5432
|
+
if (a === void 0 || b === void 0) return name === "maxNonSuccessRate";
|
|
4839
5433
|
if (a === null || b === null) return a === b;
|
|
4840
5434
|
const allowed = MS_LIMITS.has(name) ? hysteresis.relative * a : hysteresis.ratio;
|
|
4841
5435
|
return atMost(Math.abs(b - a), allowed);
|
|
@@ -4859,7 +5453,7 @@ function loosenedMuch(before, after, loosenWarnRelative) {
|
|
|
4859
5453
|
}
|
|
4860
5454
|
|
|
4861
5455
|
// src/core/thresholds/derive.ts
|
|
4862
|
-
var
|
|
5456
|
+
var KIND_NOUN3 = { api: "endpoint", step: "step" };
|
|
4863
5457
|
function aggregatesOf(report, kind2) {
|
|
4864
5458
|
const byKind = {
|
|
4865
5459
|
api: report.endpoints,
|
|
@@ -4867,6 +5461,9 @@ function aggregatesOf(report, kind2) {
|
|
|
4867
5461
|
};
|
|
4868
5462
|
return byKind[kind2];
|
|
4869
5463
|
}
|
|
5464
|
+
function coldSamplesOf(report) {
|
|
5465
|
+
return report.config.measure?.coldSamples ?? chunkVYODYUEL_cjs.DEFAULT_CONFIG.measure.coldSamples;
|
|
5466
|
+
}
|
|
4870
5467
|
function reportSource(report) {
|
|
4871
5468
|
const browsers = report.runConditions.projects.filter((p) => p.role === "measured" && p.browserName !== null).map((p) => p.browserName ?? "");
|
|
4872
5469
|
const { platform, arch, ci, cpuCount, cpuModel } = report.host;
|
|
@@ -4875,7 +5472,8 @@ function reportSource(report) {
|
|
|
4875
5472
|
playwrightVersion: report.playwright.version,
|
|
4876
5473
|
host: { platform, arch, ci, cpuCount, cpuModel },
|
|
4877
5474
|
normalization: report.normalization,
|
|
4878
|
-
stepNormalization: report.stepNormalization
|
|
5475
|
+
stepNormalization: report.stepNormalization,
|
|
5476
|
+
coldSamples: coldSamplesOf(report)
|
|
4879
5477
|
};
|
|
4880
5478
|
}
|
|
4881
5479
|
function refusal(report, cfg, existing) {
|
|
@@ -4892,11 +5490,11 @@ function refusal(report, cfg, existing) {
|
|
|
4892
5490
|
{
|
|
4893
5491
|
code: "THRESHOLDS_SOURCE_INCOMPLETE",
|
|
4894
5492
|
message: `The source report is incomplete or untrustworthy (${incomplete.join("; ")}); no thresholds file was written.`,
|
|
4895
|
-
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.`
|
|
4896
5494
|
}
|
|
4897
5495
|
];
|
|
4898
5496
|
}
|
|
4899
|
-
if (
|
|
5497
|
+
if (chunkVXGTC6DB_cjs.KINDS.every((kind2) => Object.keys(aggregatesOf(report, kind2)).length === 0)) {
|
|
4900
5498
|
return [
|
|
4901
5499
|
{
|
|
4902
5500
|
code: "THRESHOLDS_EMPTY_REPORT",
|
|
@@ -4905,7 +5503,7 @@ function refusal(report, cfg, existing) {
|
|
|
4905
5503
|
}
|
|
4906
5504
|
];
|
|
4907
5505
|
}
|
|
4908
|
-
const derivable =
|
|
5506
|
+
const derivable = chunkVXGTC6DB_cjs.KINDS.some(
|
|
4909
5507
|
(kind2) => Object.values(aggregatesOf(report, kind2)).some((stats2) => isDerivable(stats2, cfg.checks))
|
|
4910
5508
|
);
|
|
4911
5509
|
if (!derivable) {
|
|
@@ -4917,7 +5515,7 @@ function refusal(report, cfg, existing) {
|
|
|
4917
5515
|
}
|
|
4918
5516
|
];
|
|
4919
5517
|
}
|
|
4920
|
-
const invalid =
|
|
5518
|
+
const invalid = chunkVXGTC6DB_cjs.KINDS.flatMap((kind2) => {
|
|
4921
5519
|
const file = existing[kind2];
|
|
4922
5520
|
return file.status === "invalid" ? file.issues.map(schemaIssueToIssue) : [];
|
|
4923
5521
|
});
|
|
@@ -4930,7 +5528,7 @@ function generatedBlock(report, cfg, kind2, opts) {
|
|
|
4930
5528
|
0
|
|
4931
5529
|
);
|
|
4932
5530
|
return {
|
|
4933
|
-
tool: { name:
|
|
5531
|
+
tool: { name: chunkVXGTC6DB_cjs.PACKAGE_NAME, version: opts.toolVersion },
|
|
4934
5532
|
env: opts.env,
|
|
4935
5533
|
sourceRunId: report.runId,
|
|
4936
5534
|
sourceRunStartedAt: report.startedAt,
|
|
@@ -4941,11 +5539,21 @@ function generatedBlock(report, cfg, kind2, opts) {
|
|
|
4941
5539
|
playwrightVersion: source.playwrightVersion,
|
|
4942
5540
|
host: source.host,
|
|
4943
5541
|
// The step file carries the step fingerprint (10-REQ-22, 06-REQ-25).
|
|
4944
|
-
normalization: kind2 === "step" ? report.stepNormalization ?? "" : source.normalization
|
|
5542
|
+
normalization: kind2 === "step" ? report.stepNormalization ?? "" : source.normalization,
|
|
5543
|
+
coldSamples: coldSamplesOf(report),
|
|
5544
|
+
sourcePasses: report.passes.completed
|
|
4945
5545
|
};
|
|
4946
5546
|
}
|
|
4947
5547
|
function generatedChanged(before, after) {
|
|
4948
|
-
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
|
+
};
|
|
4949
5557
|
}
|
|
4950
5558
|
function humanFields(entry) {
|
|
4951
5559
|
const fields = {};
|
|
@@ -4969,7 +5577,7 @@ function deriveKind(report, cfg, file, opts) {
|
|
|
4969
5577
|
if (keys.length > 0) {
|
|
4970
5578
|
warnings.push({
|
|
4971
5579
|
code: "THRESHOLDS_KIND_SKIPPED",
|
|
4972
|
-
message: `No ${
|
|
5580
|
+
message: `No ${KIND_NOUN3[kind2]} key has at least ${minDeriveSamples(cfg.checks)} successful samples; ${file.path} was not written.`,
|
|
4973
5581
|
hint: `Run more passes (run.passes.thresholds or PW_PERF_PASSES).`
|
|
4974
5582
|
});
|
|
4975
5583
|
}
|
|
@@ -4987,7 +5595,8 @@ function deriveKind(report, cfg, file, opts) {
|
|
|
4987
5595
|
const {
|
|
4988
5596
|
diffs,
|
|
4989
5597
|
timing,
|
|
4990
|
-
keys: keysDiffer
|
|
5598
|
+
keys: keysDiffer,
|
|
5599
|
+
cold: cold2
|
|
4991
5600
|
} = sourceDifferences(loaded.file.generated, sourceForKind(reportSource(report), kind2));
|
|
4992
5601
|
if (diffs.length > 0) {
|
|
4993
5602
|
const hints = [];
|
|
@@ -4998,9 +5607,10 @@ function deriveKind(report, cfg, file, opts) {
|
|
|
4998
5607
|
}
|
|
4999
5608
|
if (keysDiffer) {
|
|
5000
5609
|
hints.push(
|
|
5001
|
-
`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}\`.`
|
|
5002
5611
|
);
|
|
5003
5612
|
}
|
|
5613
|
+
if (cold2) hints.push(COLD_SAMPLES_HINT);
|
|
5004
5614
|
warnings.push({
|
|
5005
5615
|
code: "THRESHOLDS_SOURCE_MISMATCH",
|
|
5006
5616
|
message: `Thresholds in ${loaded.path} were derived under other conditions than the source report (file / source report): ${diffs.join("; ")}.`,
|
|
@@ -5009,6 +5619,12 @@ function deriveKind(report, cfg, file, opts) {
|
|
|
5009
5619
|
}
|
|
5010
5620
|
}
|
|
5011
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
|
+
});
|
|
5012
5628
|
const entries2 = {};
|
|
5013
5629
|
let much = 0;
|
|
5014
5630
|
for (const key2 of Object.keys(before).sort(compareText)) {
|
|
@@ -5029,16 +5645,21 @@ function deriveKind(report, cfg, file, opts) {
|
|
|
5029
5645
|
}
|
|
5030
5646
|
const fresh = deriveEntry(stats2, kind2, cfg);
|
|
5031
5647
|
if (withinHysteresis(old, fresh, cfg.thresholds.hysteresis) && entrySelfConsistent(old, stats2, kind2, cfg)) {
|
|
5032
|
-
|
|
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;
|
|
5033
5654
|
continue;
|
|
5034
5655
|
}
|
|
5035
|
-
entries2[key2] = { ...fresh, ...humanFields(old) };
|
|
5656
|
+
entries2[key2] = { ...fresh, source: sourceBlock(stats2, kindCount, passes), ...humanFields(old) };
|
|
5036
5657
|
if (loosenedMuch(old, fresh, cfg.thresholds.loosenWarnRelative)) much += 1;
|
|
5037
5658
|
}
|
|
5038
5659
|
for (const key2 of derivable) {
|
|
5039
5660
|
const stats2 = aggregates[key2];
|
|
5040
5661
|
if (Object.hasOwn(before, key2) || stats2 === void 0) continue;
|
|
5041
|
-
entries2[key2] =
|
|
5662
|
+
entries2[key2] = derived(stats2);
|
|
5042
5663
|
}
|
|
5043
5664
|
const generated = generatedBlock(report, cfg, kind2, opts);
|
|
5044
5665
|
const content = {
|
|
@@ -5057,7 +5678,7 @@ function deriveKind(report, cfg, file, opts) {
|
|
|
5057
5678
|
};
|
|
5058
5679
|
}
|
|
5059
5680
|
function deriveThresholds(report, cfg, existing, opts) {
|
|
5060
|
-
for (const kind2 of
|
|
5681
|
+
for (const kind2 of chunkVXGTC6DB_cjs.KINDS) {
|
|
5061
5682
|
const found = existing[kind2].kind;
|
|
5062
5683
|
if (found !== kind2) {
|
|
5063
5684
|
throw new Error(`deriveThresholds: existing.${kind2} has kind "${found}"`);
|
|
@@ -5085,12 +5706,12 @@ function deriveThresholds(report, cfg, existing, opts) {
|
|
|
5085
5706
|
warnings.push({
|
|
5086
5707
|
code: "THRESHOLDS_SOURCE_TEST_MODE",
|
|
5087
5708
|
message: "The source report comes from test mode, which runs fewer repetitions than a thresholds run.",
|
|
5088
|
-
hint: `Prefer a report of a thresholds run (\`${
|
|
5709
|
+
hint: `Prefer a report of a thresholds run (\`${chunkVXGTC6DB_cjs.THRESHOLDS_COMMAND}\`) as the source.`
|
|
5089
5710
|
});
|
|
5090
5711
|
}
|
|
5091
5712
|
const files = [];
|
|
5092
5713
|
let much = 0;
|
|
5093
|
-
for (const kind2 of
|
|
5714
|
+
for (const kind2 of chunkVXGTC6DB_cjs.KINDS) {
|
|
5094
5715
|
const file = existing[kind2];
|
|
5095
5716
|
if (file.status === "invalid") throw new Error("deriveThresholds: unreachable invalid file");
|
|
5096
5717
|
if ((kind2 !== "api" || !cfg.measure.api) && file.status === "missing") {
|
|
@@ -5117,7 +5738,8 @@ function limitChanges(before, after, loosenWarnRelative) {
|
|
|
5117
5738
|
const a = limitsOf(before);
|
|
5118
5739
|
const b = limitsOf(after);
|
|
5119
5740
|
const changes = [];
|
|
5120
|
-
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;
|
|
5121
5743
|
const direction = changeDirection(limit, a[limit], b[limit]);
|
|
5122
5744
|
if (direction === null) continue;
|
|
5123
5745
|
const change = { limit, before: a[limit], after: b[limit], direction };
|
|
@@ -5152,6 +5774,7 @@ function keptKey(key2, before, after, stats2, kind2, cfg) {
|
|
|
5152
5774
|
}
|
|
5153
5775
|
if (!isDerivable(stats2, cfg.checks)) return skipped(key2, stats2, cfg);
|
|
5154
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;
|
|
5155
5778
|
if (changes.length > 0) {
|
|
5156
5779
|
const looser = changes.some((c) => c.direction === "looser");
|
|
5157
5780
|
const stricter = changes.some((c) => c.direction === "stricter");
|
|
@@ -5159,9 +5782,15 @@ function keptKey(key2, before, after, stats2, kind2, cfg) {
|
|
|
5159
5782
|
return { key: key2, category, changes };
|
|
5160
5783
|
}
|
|
5161
5784
|
const fresh = cfg.thresholds.update === "all" ? deriveEntry(stats2, kind2, cfg) : null;
|
|
5162
|
-
const old = limitsOf(
|
|
5163
|
-
const kept = fresh !== null &&
|
|
5164
|
-
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
|
+
};
|
|
5165
5794
|
}
|
|
5166
5795
|
function diffThresholds(before, after, report, cfg) {
|
|
5167
5796
|
const kind2 = after.kind;
|
|
@@ -5193,7 +5822,7 @@ function diffThresholds(before, after, report, cfg) {
|
|
|
5193
5822
|
if (muting !== null) diff.muted = { until: muting.until, expired: muting.expired };
|
|
5194
5823
|
diffs.push(diff);
|
|
5195
5824
|
}
|
|
5196
|
-
const counts = Object.fromEntries(
|
|
5825
|
+
const counts = Object.fromEntries(chunkVXGTC6DB_cjs.DIFF_CATEGORIES.map((c) => [c, 0]));
|
|
5197
5826
|
for (const diff of diffs) counts[diff.category] += 1;
|
|
5198
5827
|
return {
|
|
5199
5828
|
kind: kind2,
|
|
@@ -5219,15 +5848,15 @@ function formatThresholdsDiffMarkdown(diffs, paths) {
|
|
|
5219
5848
|
"",
|
|
5220
5849
|
`## ${cell(path)} (${diff.fileStatus === "not-written" ? "not written" : diff.fileStatus})`,
|
|
5221
5850
|
"",
|
|
5222
|
-
|
|
5851
|
+
chunkVXGTC6DB_cjs.diffCountsText(diff)
|
|
5223
5852
|
);
|
|
5224
|
-
const listed = diff.keys.filter((k) =>
|
|
5853
|
+
const listed = diff.keys.filter((k) => chunkVXGTC6DB_cjs.LISTED_CATEGORIES.has(k.category));
|
|
5225
5854
|
if (listed.length > 0) {
|
|
5226
5855
|
lines.push("", "| | Key | Before | After |", "|---|---|---|---|");
|
|
5227
5856
|
for (const k of listed) {
|
|
5228
|
-
const before =
|
|
5229
|
-
const after =
|
|
5230
|
-
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)} |`);
|
|
5231
5860
|
}
|
|
5232
5861
|
}
|
|
5233
5862
|
const skipped2 = diff.keys.filter((k) => k.category === "skipped" && k.samples !== void 0);
|
|
@@ -5235,7 +5864,7 @@ function formatThresholdsDiffMarkdown(diffs, paths) {
|
|
|
5235
5864
|
lines.push("", "Skipped (no entry derived):", "");
|
|
5236
5865
|
for (const k of skipped2) {
|
|
5237
5866
|
if (k.samples !== void 0)
|
|
5238
|
-
lines.push(`- ${code(k.key)}: ${
|
|
5867
|
+
lines.push(`- ${code(k.key)}: ${chunkVXGTC6DB_cjs.skippedReasonText(k.samples)}`);
|
|
5239
5868
|
}
|
|
5240
5869
|
}
|
|
5241
5870
|
const expired = diff.keys.filter((k) => k.muted?.expired === true);
|
|
@@ -5611,11 +6240,12 @@ var RULE_ORDER3 = [
|
|
|
5611
6240
|
"p99",
|
|
5612
6241
|
"apdex",
|
|
5613
6242
|
"wilson",
|
|
5614
|
-
"errors"
|
|
6243
|
+
"errors",
|
|
6244
|
+
"nonSuccess"
|
|
5615
6245
|
];
|
|
5616
6246
|
function violations(report) {
|
|
5617
6247
|
const list2 = [];
|
|
5618
|
-
for (const kind2 of
|
|
6248
|
+
for (const kind2 of chunkVXGTC6DB_cjs.KINDS) {
|
|
5619
6249
|
const aggregates = aggregatesOf2(report, kind2);
|
|
5620
6250
|
for (const [key2, aggregate2] of Object.entries(aggregates)) {
|
|
5621
6251
|
for (const check2 of aggregate2.evaluation.checks) {
|
|
@@ -5626,7 +6256,7 @@ function violations(report) {
|
|
|
5626
6256
|
}
|
|
5627
6257
|
}
|
|
5628
6258
|
return list2.sort(
|
|
5629
|
-
(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)
|
|
5630
6260
|
);
|
|
5631
6261
|
}
|
|
5632
6262
|
function isMuted(evaluation) {
|
|
@@ -5639,6 +6269,12 @@ function header(report, paint2) {
|
|
|
5639
6269
|
if (t.flaky > 0) details.push(`${t.flaky} flaky`);
|
|
5640
6270
|
if (t.skipped > 0) details.push(`${t.skipped} skipped`);
|
|
5641
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
|
+
}
|
|
5642
6278
|
if (report.env !== null) parts.push(`env: ${report.env}`);
|
|
5643
6279
|
parts.push(`${plural2(executions, "test")} (${details.join(", ")})`);
|
|
5644
6280
|
const ci = report.ci;
|
|
@@ -5686,7 +6322,7 @@ function issueBox(level, issues, limit, opts) {
|
|
|
5686
6322
|
}
|
|
5687
6323
|
function counterLines(report, opts) {
|
|
5688
6324
|
const counts = report.evaluation.counts;
|
|
5689
|
-
const shown =
|
|
6325
|
+
const shown = chunkVXGTC6DB_cjs.KINDS.filter(
|
|
5690
6326
|
(kind2) => ALWAYS_SHOWN.has(kind2) || counts[kind2].keys > 0 || counts[kind2].unseenThresholdEntries > 0
|
|
5691
6327
|
);
|
|
5692
6328
|
const percentileOff = report.config.checks?.time?.percentile?.enabled === false;
|
|
@@ -5710,7 +6346,7 @@ function counterLines(report, opts) {
|
|
|
5710
6346
|
function mutedLines(report, paint2) {
|
|
5711
6347
|
const lines = [];
|
|
5712
6348
|
const indent = " ".repeat("Muted: ".length);
|
|
5713
|
-
for (const kind2 of
|
|
6349
|
+
for (const kind2 of chunkVXGTC6DB_cjs.KINDS) {
|
|
5714
6350
|
const aggregates = aggregatesOf2(report, kind2);
|
|
5715
6351
|
for (const key2 of Object.keys(aggregates).sort(compareText7)) {
|
|
5716
6352
|
const muted = aggregates[key2]?.evaluation.muted;
|
|
@@ -5724,7 +6360,7 @@ function mutedLines(report, paint2) {
|
|
|
5724
6360
|
function keysOnDefaults(report) {
|
|
5725
6361
|
if (report.mode !== "test") return [];
|
|
5726
6362
|
const list2 = [];
|
|
5727
|
-
for (const kind2 of
|
|
6363
|
+
for (const kind2 of chunkVXGTC6DB_cjs.KINDS) {
|
|
5728
6364
|
const file = report.thresholdFiles.find((f) => f.kind === kind2);
|
|
5729
6365
|
if (file?.status !== "loaded") continue;
|
|
5730
6366
|
const aggregates = Object.entries(aggregatesOf2(report, kind2));
|
|
@@ -5733,13 +6369,14 @@ function keysOnDefaults(report) {
|
|
|
5733
6369
|
for (const [key2, aggregate2] of aggregates) {
|
|
5734
6370
|
const e = aggregate2.evaluation;
|
|
5735
6371
|
if (e.thresholdSource !== "default" || e.result === "not-evaluated") continue;
|
|
6372
|
+
if (aggregate2.successCount === 0) continue;
|
|
5736
6373
|
const failed = e.checks.filter((c) => !c.passed);
|
|
5737
6374
|
const rank = failed.some((c) => c.blocking) ? 2 : failed.length > 0 ? 1 : 0;
|
|
5738
6375
|
list2.push({ kind: kind2, key: key2, aggregate: aggregate2, rank });
|
|
5739
6376
|
}
|
|
5740
6377
|
}
|
|
5741
6378
|
return list2.sort(
|
|
5742
|
-
(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)
|
|
5743
6380
|
);
|
|
5744
6381
|
}
|
|
5745
6382
|
function defaultKeyLines(report, opts, m, paint2) {
|
|
@@ -5813,11 +6450,24 @@ function tableLines(report, list2, opts, m, paint2) {
|
|
|
5813
6450
|
formatActual(v.check),
|
|
5814
6451
|
formatLimit(v.check),
|
|
5815
6452
|
overText(v.check),
|
|
5816
|
-
|
|
6453
|
+
samplesCell(v.check, v.evaluation),
|
|
5817
6454
|
v.evaluation.thresholdSource,
|
|
5818
6455
|
[v.check.hardLimitExceeded ? "HARD" : "", isMuted(v.evaluation) ? "MUTED" : ""].filter((f) => f !== "").join(" ")
|
|
5819
6456
|
],
|
|
5820
|
-
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
|
+
} : {}
|
|
5821
6471
|
}));
|
|
5822
6472
|
const lines = table(columns, rows, opts);
|
|
5823
6473
|
if (list2.length > shown.length) {
|
|
@@ -5826,6 +6476,38 @@ function tableLines(report, list2, opts, m, paint2) {
|
|
|
5826
6476
|
}
|
|
5827
6477
|
return lines;
|
|
5828
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
|
+
}
|
|
5829
6511
|
function slowestLines(report, list2) {
|
|
5830
6512
|
const seen = /* @__PURE__ */ new Set();
|
|
5831
6513
|
const lines = [];
|
|
@@ -5848,8 +6530,7 @@ function errorCauses(report) {
|
|
|
5848
6530
|
const t = report.tests;
|
|
5849
6531
|
const named = {
|
|
5850
6532
|
TESTS_FAILED_TOO_MANY: `too many failed tests (${t.unexpected} of ${t.expected + t.unexpected + t.flaky} executions)`,
|
|
5851
|
-
RUN_INCOMPLETE: "the run did not complete"
|
|
5852
|
-
RUN_SHARDED: "the run is sharded"
|
|
6533
|
+
RUN_INCOMPLETE: "the run did not complete"
|
|
5853
6534
|
};
|
|
5854
6535
|
const causes = [];
|
|
5855
6536
|
let other = 0;
|
|
@@ -5863,8 +6544,8 @@ function errorCauses(report) {
|
|
|
5863
6544
|
}
|
|
5864
6545
|
function resultLines(report, opts, m) {
|
|
5865
6546
|
const counts = report.evaluation.counts;
|
|
5866
|
-
const sum3 = (field3) =>
|
|
5867
|
-
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(
|
|
5868
6549
|
(total, kind2) => total + Object.values(aggregatesOf2(report, kind2)).reduce(
|
|
5869
6550
|
(n, a) => n + a.evaluation.checks.filter((c) => !c.passed && (!blocking || c.blocking)).length,
|
|
5870
6551
|
0
|
|
@@ -5929,13 +6610,61 @@ function resolvePath2(base, path) {
|
|
|
5929
6610
|
const b = toSlash(base);
|
|
5930
6611
|
return rootOf(b) + segments(`${b}/${p}`).join("/");
|
|
5931
6612
|
}
|
|
5932
|
-
function reportLine(report, html2, paint2) {
|
|
6613
|
+
function reportLine(report, html2, paint2, reportDir) {
|
|
5933
6614
|
const options = report.config.report;
|
|
5934
|
-
if (options?.dir === void 0) return [];
|
|
5935
|
-
const dir = resolvePath2(report.configDir, options.
|
|
5936
|
-
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";
|
|
5937
6618
|
return [`${paint2("Report:", "bold")} ${dir}/${file}`];
|
|
5938
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
|
+
}
|
|
5939
6668
|
function formatSummary(report, opts) {
|
|
5940
6669
|
const paint2 = painter(opts.color);
|
|
5941
6670
|
const frame = { width: opts.width, color: opts.color, ascii: opts.ascii ?? false };
|
|
@@ -5952,11 +6681,16 @@ function formatSummary(report, opts) {
|
|
|
5952
6681
|
lines.push(...defaultKeyLines(report, frame, m, paint2));
|
|
5953
6682
|
if (list2.length > 0) {
|
|
5954
6683
|
lines.push(...tableLines(report, list2, frame, m, paint2));
|
|
6684
|
+
lines.push(...workloadLines(report, paint2));
|
|
5955
6685
|
const slowest = slowestLines(report, list2);
|
|
5956
6686
|
if (slowest.length > 0) lines.push(...slowest);
|
|
5957
6687
|
lines.push("");
|
|
5958
6688
|
}
|
|
5959
|
-
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
|
+
);
|
|
5960
6694
|
return `${lines.join("\n")}
|
|
5961
6695
|
`;
|
|
5962
6696
|
}
|
|
@@ -5969,9 +6703,11 @@ function formatCheckSummary(s, opts) {
|
|
|
5969
6703
|
const lines = [];
|
|
5970
6704
|
lines.push("\u2500".repeat(Math.max(20, opts.width)));
|
|
5971
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`;
|
|
5972
6708
|
lines.push(
|
|
5973
6709
|
paint2(
|
|
5974
|
-
`${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`,
|
|
5975
6711
|
"bold"
|
|
5976
6712
|
),
|
|
5977
6713
|
""
|
|
@@ -5981,7 +6717,7 @@ function formatCheckSummary(s, opts) {
|
|
|
5981
6717
|
if (p.role === "measured") {
|
|
5982
6718
|
const browser = p.requestOnly === true ? " (no browser)" : p.browserName === null ? "" : ` (${p.browserName})`;
|
|
5983
6719
|
lines.push(
|
|
5984
|
-
` 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")}`
|
|
5985
6721
|
);
|
|
5986
6722
|
} else {
|
|
5987
6723
|
lines.push(` dependency ${p.name} \xB7 runs once, not measured`);
|
|
@@ -6022,7 +6758,7 @@ function formatCheckSummary(s, opts) {
|
|
|
6022
6758
|
lines.push("", `${paint2("Estimate:", "bold")} ${s.estimate}`, "");
|
|
6023
6759
|
const m = marks(frame.ascii);
|
|
6024
6760
|
lines.push(
|
|
6025
|
-
...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)
|
|
6026
6762
|
);
|
|
6027
6763
|
return `${lines.join("\n")}
|
|
6028
6764
|
`;
|
|
@@ -6054,7 +6790,15 @@ function formatStartBanner(input, opts) {
|
|
|
6054
6790
|
}
|
|
6055
6791
|
if (input.estimate !== null) rows.push(["Estimate", input.estimate]);
|
|
6056
6792
|
rows.push(["Report", input.report ?? "no files are written"]);
|
|
6057
|
-
|
|
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
|
+
}
|
|
6058
6802
|
const icon2 = opts.ascii ? "" : "\u23F3 ";
|
|
6059
6803
|
const lines = table(
|
|
6060
6804
|
[
|
|
@@ -6066,7 +6810,7 @@ function formatStartBanner(input, opts) {
|
|
|
6066
6810
|
...opts,
|
|
6067
6811
|
border: "cyan",
|
|
6068
6812
|
header: false,
|
|
6069
|
-
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)}`}`
|
|
6070
6814
|
}
|
|
6071
6815
|
);
|
|
6072
6816
|
return `${lines.join("\n")}
|
|
@@ -6090,9 +6834,9 @@ function markerStyle(marker) {
|
|
|
6090
6834
|
}
|
|
6091
6835
|
function fileLines(diff, path, opts, paint2) {
|
|
6092
6836
|
const lines = [`Thresholds: ${path} (${fileStatusText(diff)})`];
|
|
6093
|
-
const listed = diff.keys.filter((k) =>
|
|
6837
|
+
const listed = diff.keys.filter((k) => chunkVXGTC6DB_cjs.LISTED_CATEGORIES.has(k.category));
|
|
6094
6838
|
const expired = diff.keys.filter((k) => k.muted?.expired === true);
|
|
6095
|
-
if (diff.fileStatus !== "unchanged") lines.push(` ${
|
|
6839
|
+
if (diff.fileStatus !== "unchanged") lines.push(` ${chunkVXGTC6DB_cjs.diffCountsText(diff)}`);
|
|
6096
6840
|
const tableOpts = { width: opts.width, color: opts.color, ascii: opts.ascii === true };
|
|
6097
6841
|
const shown = listed.slice(0, MAX_DIFF_ROWS);
|
|
6098
6842
|
if (shown.length > 0) {
|
|
@@ -6105,9 +6849,9 @@ function fileLines(diff, path, opts, paint2) {
|
|
|
6105
6849
|
{ header: "change" }
|
|
6106
6850
|
],
|
|
6107
6851
|
shown.map((k) => {
|
|
6108
|
-
const marker =
|
|
6852
|
+
const marker = chunkVXGTC6DB_cjs.diffMarker(k);
|
|
6109
6853
|
return {
|
|
6110
|
-
cells: [marker, k.key,
|
|
6854
|
+
cells: [marker, k.key, chunkVXGTC6DB_cjs.diffChangeText(k, diff.level, " ") + mutedSuffix(k)],
|
|
6111
6855
|
cellStyles: [markerStyle(marker)]
|
|
6112
6856
|
};
|
|
6113
6857
|
}),
|
|
@@ -6126,7 +6870,7 @@ function fileLines(diff, path, opts, paint2) {
|
|
|
6126
6870
|
...table(
|
|
6127
6871
|
[{ header: "skipped", flex: true, minWidth: MIN_KEY_WIDTH2 }, { header: "reason" }],
|
|
6128
6872
|
skippedShown.map((k) => ({
|
|
6129
|
-
cells: [k.key, k.samples === void 0 ? "" :
|
|
6873
|
+
cells: [k.key, k.samples === void 0 ? "" : chunkVXGTC6DB_cjs.skippedReasonText(k.samples)]
|
|
6130
6874
|
})),
|
|
6131
6875
|
tableOpts
|
|
6132
6876
|
)
|
|
@@ -6327,11 +7071,11 @@ function usageText(usage, failed, long = false, over) {
|
|
|
6327
7071
|
var METHODS = /* @__PURE__ */ new Set(["GET", "POST", "PUT", "PATCH", "DELETE"]);
|
|
6328
7072
|
var STEP_SEPARATOR2 = " \u203A ";
|
|
6329
7073
|
function endpointSource(key2) {
|
|
6330
|
-
return
|
|
7074
|
+
return chunkVXGTC6DB_cjs.isRequestKey(key2) ? "request" : "browser";
|
|
6331
7075
|
}
|
|
6332
7076
|
function splitEndpoint(key2) {
|
|
6333
|
-
const request =
|
|
6334
|
-
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;
|
|
6335
7079
|
const space = text2.indexOf(" ");
|
|
6336
7080
|
if (space <= 0) return { method: "", origin: "", path: text2, request };
|
|
6337
7081
|
const method = text2.slice(0, space);
|
|
@@ -6425,7 +7169,8 @@ var RULE_ORDER4 = [
|
|
|
6425
7169
|
"p99",
|
|
6426
7170
|
"apdex",
|
|
6427
7171
|
"wilson",
|
|
6428
|
-
"errors"
|
|
7172
|
+
"errors",
|
|
7173
|
+
"nonSuccess"
|
|
6429
7174
|
];
|
|
6430
7175
|
function decidingCheck(checks) {
|
|
6431
7176
|
const failed = [...checks].filter((c) => !c.passed).sort((a, b) => RULE_ORDER4.indexOf(a.rule) - RULE_ORDER4.indexOf(b.rule));
|
|
@@ -6470,8 +7215,8 @@ function keyLink(ctx, kind2, key2, max = KEY_COLUMN_MAX, full = false) {
|
|
|
6470
7215
|
}
|
|
6471
7216
|
|
|
6472
7217
|
// src/html/generated/assets.ts
|
|
6473
|
-
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}}';
|
|
6474
|
-
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=";
|
|
6475
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);})();';
|
|
6476
7221
|
var SCRIPT_SHA256 = "Jda/ayo/X8RNPoTXXep2nOa041MPnyTQ/N6biJU+P6k=";
|
|
6477
7222
|
|
|
@@ -6670,8 +7415,8 @@ function histogramSvg(input) {
|
|
|
6670
7415
|
}
|
|
6671
7416
|
const outline = (from, to) => {
|
|
6672
7417
|
let previous = base;
|
|
6673
|
-
const steps = counts.slice(from, to).map((
|
|
6674
|
-
const y = r(base - H_BARS *
|
|
7418
|
+
const steps = counts.slice(from, to).map((count4) => {
|
|
7419
|
+
const y = r(base - H_BARS * count4 / most);
|
|
6675
7420
|
const step = y === previous ? "" : `V${y}`;
|
|
6676
7421
|
previous = y;
|
|
6677
7422
|
return `${step}h${r(width)}`;
|
|
@@ -6800,6 +7545,8 @@ function ruleLabel(rule, level) {
|
|
|
6800
7545
|
return "slow share";
|
|
6801
7546
|
case "errors":
|
|
6802
7547
|
return "error rate";
|
|
7548
|
+
case "nonSuccess":
|
|
7549
|
+
return "non-success share";
|
|
6803
7550
|
default:
|
|
6804
7551
|
return rule;
|
|
6805
7552
|
}
|
|
@@ -6896,7 +7643,8 @@ function usageClass(usage, failed) {
|
|
|
6896
7643
|
var SHARE_RULES2 = /* @__PURE__ */ new Set([
|
|
6897
7644
|
"apdex",
|
|
6898
7645
|
"wilson",
|
|
6899
|
-
"errors"
|
|
7646
|
+
"errors",
|
|
7647
|
+
"nonSuccess"
|
|
6900
7648
|
]);
|
|
6901
7649
|
function overOf(check2) {
|
|
6902
7650
|
if (check2.passed) return void 0;
|
|
@@ -6912,7 +7660,7 @@ function usageMeter(check2, long = false) {
|
|
|
6912
7660
|
}
|
|
6913
7661
|
function checkValue(check2, value) {
|
|
6914
7662
|
if (TIME_RULES4.has(check2.rule)) return formatMs2(value);
|
|
6915
|
-
return check2.rule === "errors" ? formatPercent(value) : formatRatio(value);
|
|
7663
|
+
return check2.rule === "errors" || check2.rule === "nonSuccess" ? formatPercent(value) : formatRatio(value);
|
|
6916
7664
|
}
|
|
6917
7665
|
function lowestMinSamples(report, level) {
|
|
6918
7666
|
const checks = report.config.checks;
|
|
@@ -7137,13 +7885,92 @@ function statusesPart(ctx, kind2, key2, agg) {
|
|
|
7137
7885
|
html`<p class="facts">${facts2}</p>`
|
|
7138
7886
|
);
|
|
7139
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
|
+
}
|
|
7140
7960
|
function keyDetails(ctx, kind2, key2, agg) {
|
|
7141
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);
|
|
7142
7965
|
return join4(
|
|
7143
7966
|
html`<div class="kd">`,
|
|
7144
7967
|
keyHeader(ctx, kind2, key2, agg),
|
|
7145
|
-
|
|
7968
|
+
texts.length === 0 ? null : html`<ul class="hints">${texts.map((t) => html`<li>${icon("bulb")}${t}</li>`)}</ul>`,
|
|
7146
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),
|
|
7147
7974
|
distribution(ctx, agg),
|
|
7148
7975
|
checksTable(ctx, kind2, agg),
|
|
7149
7976
|
kind2 === "api" ? ttfbSplit(agg) : null,
|
|
@@ -7191,7 +8018,7 @@ function headroomCell(ctx, agg) {
|
|
|
7191
8018
|
if (top === void 0) return html`<td class="z">${DASH}</td>`;
|
|
7192
8019
|
return html`<td>${usageMeter(top)}</td>`;
|
|
7193
8020
|
}
|
|
7194
|
-
function
|
|
8021
|
+
function samplesCell2(ctx, kind2, agg) {
|
|
7195
8022
|
const note = notTimedNote(ctx, kind2, agg);
|
|
7196
8023
|
return html`<td class="num">${agg.successCount} / ${agg.count}${note === null ? null : html`<small class="why">${note}</small>`}</td>`;
|
|
7197
8024
|
}
|
|
@@ -7210,7 +8037,7 @@ function keyRow(ctx, kind2, key2, agg, columns, ttfb) {
|
|
|
7210
8037
|
reason === null ? null : html`<small class="why">${reason}</small>`,
|
|
7211
8038
|
html`</td>`,
|
|
7212
8039
|
headroomCell(ctx, agg),
|
|
7213
|
-
|
|
8040
|
+
samplesCell2(ctx, kind2, agg),
|
|
7214
8041
|
agg.errorCount === 0 ? html`<td class="num"></td>` : html`<td class="num e">${agg.errorCount}</td>`,
|
|
7215
8042
|
timeCell(s?.percentiles["p50"]),
|
|
7216
8043
|
s === null ? timeCell(void 0) : limitCell(
|
|
@@ -7629,7 +8456,18 @@ function rankings(ctx) {
|
|
|
7629
8456
|
return byKindThenKey(a, b);
|
|
7630
8457
|
};
|
|
7631
8458
|
const errorTone = (e) => e.agg.evaluation.result === "fail" ? "bad" : e.agg.errorCount > 0 ? "warn" : "";
|
|
7632
|
-
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);
|
|
7633
8471
|
const list2 = [
|
|
7634
8472
|
{
|
|
7635
8473
|
id: "slowest",
|
|
@@ -7653,13 +8491,16 @@ function rankings(ctx) {
|
|
|
7653
8491
|
},
|
|
7654
8492
|
{
|
|
7655
8493
|
id: "errors",
|
|
7656
|
-
|
|
7657
|
-
|
|
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" },
|
|
7658
8499
|
empty: "No errors in this run",
|
|
7659
|
-
entries: all.filter((e) => e
|
|
7660
|
-
size:
|
|
7661
|
-
tone:
|
|
7662
|
-
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}`
|
|
7663
8504
|
}
|
|
7664
8505
|
];
|
|
7665
8506
|
if (!ctx.migrated) {
|
|
@@ -7678,6 +8519,20 @@ function rankings(ctx) {
|
|
|
7678
8519
|
}
|
|
7679
8520
|
});
|
|
7680
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
|
+
}
|
|
7681
8536
|
return list2;
|
|
7682
8537
|
}
|
|
7683
8538
|
function emptySmall(text2, name = "ok") {
|
|
@@ -7904,12 +8759,12 @@ function generatedSource(file) {
|
|
|
7904
8759
|
const tool2 = field2(generated, "tool");
|
|
7905
8760
|
const run = textOf(field2(generated, "sourceRunId"));
|
|
7906
8761
|
const at2 = textOf(field2(generated, "sourceRunStartedAt"));
|
|
7907
|
-
const
|
|
8762
|
+
const count4 = field2(generated, "sourceSampleCount");
|
|
7908
8763
|
return [
|
|
7909
8764
|
`generated by ${textOf(field2(tool2, "name")) ?? "unknown"} v${textOf(field2(tool2, "version")) ?? "?"}`,
|
|
7910
8765
|
run === null ? "" : ` from run ${run}`,
|
|
7911
8766
|
at2 === null ? "" : ` (${formatDate(at2)})`,
|
|
7912
|
-
typeof
|
|
8767
|
+
typeof count4 === "number" ? `, ${plural3(count4, "sample")}` : ""
|
|
7913
8768
|
].join("");
|
|
7914
8769
|
}
|
|
7915
8770
|
function sourceCell(file) {
|
|
@@ -7995,6 +8850,36 @@ function configurationSection(report) {
|
|
|
7995
8850
|
html`<pre><code>${stableJson(report.config, " ")}</code></pre></details></section>`
|
|
7996
8851
|
);
|
|
7997
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
|
+
}
|
|
7998
8883
|
function runTab(report) {
|
|
7999
8884
|
return join4(
|
|
8000
8885
|
html`<div class="grid2"><div>`,
|
|
@@ -8003,6 +8888,7 @@ function runTab(report) {
|
|
|
8003
8888
|
originsSection(report),
|
|
8004
8889
|
conditionsSection(report),
|
|
8005
8890
|
html`</div></div>`,
|
|
8891
|
+
shardsSection(report),
|
|
8006
8892
|
thresholdsSection(report),
|
|
8007
8893
|
configurationSection(report)
|
|
8008
8894
|
);
|
|
@@ -8103,10 +8989,18 @@ function testsTab(ctx) {
|
|
|
8103
8989
|
}
|
|
8104
8990
|
|
|
8105
8991
|
// src/html/render.ts
|
|
8106
|
-
var DOCS_URL = `${
|
|
8992
|
+
var DOCS_URL = `${chunkVXGTC6DB_cjs.REPOSITORY_URL}#readme`;
|
|
8107
8993
|
function chip2(name, content) {
|
|
8108
8994
|
return html`<span class="chip">${icon(name)}${content}</span>`;
|
|
8109
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
|
+
}
|
|
8110
9004
|
function header2(report) {
|
|
8111
9005
|
const ci = report.ci;
|
|
8112
9006
|
return join4(
|
|
@@ -8117,6 +9011,7 @@ function header2(report) {
|
|
|
8117
9011
|
html`<div class="meta" role="group" aria-label="Run details" tabindex="0">`,
|
|
8118
9012
|
report.env === null ? null : chip2("env", html`env <b>${report.env}</b>`),
|
|
8119
9013
|
chip2("play", html`mode <b>${report.mode}</b>`),
|
|
9014
|
+
shardsChip(report),
|
|
8120
9015
|
chip2("clock", html`<b>${formatDate(report.startedAt).slice(0, -4)}</b> UTC`),
|
|
8121
9016
|
ci === null || ci.branch === null && ci.commit === null ? null : chip2(
|
|
8122
9017
|
"branch",
|
|
@@ -8231,7 +9126,7 @@ function keyDialog() {
|
|
|
8231
9126
|
);
|
|
8232
9127
|
}
|
|
8233
9128
|
function footer(report) {
|
|
8234
|
-
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>`;
|
|
8235
9130
|
}
|
|
8236
9131
|
var CONTENT_SECURITY_POLICY = `default-src 'none'; script-src 'sha256-${SCRIPT_SHA256}'; style-src 'sha256-${STYLES_SHA256}'; img-src data:`;
|
|
8237
9132
|
function renderHtmlReport(report) {
|
|
@@ -8242,7 +9137,7 @@ function renderHtmlReport(report) {
|
|
|
8242
9137
|
html`<meta http-equiv="Content-Security-Policy" content="${CONTENT_SECURITY_POLICY}">`,
|
|
8243
9138
|
html`<meta name="viewport" content="width=device-width, initial-scale=1">`,
|
|
8244
9139
|
html`<meta name="color-scheme" content="light dark">`,
|
|
8245
|
-
html`<meta name="generator" content="${`${
|
|
9140
|
+
html`<meta name="generator" content="${`${chunkVXGTC6DB_cjs.PACKAGE_NAME} ${report.tool.version}`}">`,
|
|
8246
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>`,
|
|
8247
9142
|
html`<style>${trustedHtml(STYLES)}</style></head>`
|
|
8248
9143
|
);
|
|
@@ -8413,12 +9308,17 @@ var JournalAggregator = class extends Aggregator {
|
|
|
8413
9308
|
super.endResult(meta);
|
|
8414
9309
|
this.journal?.push(["e", meta]);
|
|
8415
9310
|
}
|
|
9311
|
+
startSegment() {
|
|
9312
|
+
super.startSegment();
|
|
9313
|
+
this.journal?.push(["p"]);
|
|
9314
|
+
}
|
|
8416
9315
|
};
|
|
8417
9316
|
function replayEntries(aggregator, entries2) {
|
|
8418
9317
|
for (const entry of entries2) {
|
|
8419
9318
|
if (entry[0] === "r") aggregator.addRequest(entry[1], entry[2], entry[3], entry[4], entry[5]);
|
|
8420
9319
|
else if (entry[0] === "s") aggregator.addStep(entry[1]);
|
|
8421
|
-
else aggregator.endResult(entry[1]);
|
|
9320
|
+
else if (entry[0] === "e") aggregator.endResult(entry[1]);
|
|
9321
|
+
else aggregator.startSegment();
|
|
8422
9322
|
}
|
|
8423
9323
|
}
|
|
8424
9324
|
function isRecord2(value) {
|
|
@@ -8552,7 +9452,7 @@ function cleanReportDir(io, input) {
|
|
|
8552
9452
|
if (refusal2 !== null) {
|
|
8553
9453
|
return warning(
|
|
8554
9454
|
`it ${refusal2}`,
|
|
8555
|
-
`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.`
|
|
8556
9456
|
);
|
|
8557
9457
|
}
|
|
8558
9458
|
try {
|
|
@@ -8566,6 +9466,63 @@ function cleanReportDir(io, input) {
|
|
|
8566
9466
|
return null;
|
|
8567
9467
|
}
|
|
8568
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
|
+
|
|
8569
9526
|
// src/reporter/samples.ts
|
|
8570
9527
|
function testTitle(test) {
|
|
8571
9528
|
const titles = [test.title];
|
|
@@ -8594,7 +9551,7 @@ function testMeta(test, result2, file) {
|
|
|
8594
9551
|
};
|
|
8595
9552
|
}
|
|
8596
9553
|
function sampleAttachments(result2) {
|
|
8597
|
-
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"));
|
|
8598
9555
|
}
|
|
8599
9556
|
function hasTraceOrVideo(result2) {
|
|
8600
9557
|
return result2.attachments.some((a) => a.name === "trace" || a.name === "video");
|
|
@@ -8603,6 +9560,9 @@ function hasTraceOrVideo(result2) {
|
|
|
8603
9560
|
// src/reporter/session.ts
|
|
8604
9561
|
var PENDING_TOP_KEYS = 5;
|
|
8605
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;
|
|
8606
9566
|
function runSettings(registered, env, packageVersion) {
|
|
8607
9567
|
if (registered !== void 0) {
|
|
8608
9568
|
return {
|
|
@@ -8618,10 +9578,10 @@ function runSettings(registered, env, packageVersion) {
|
|
|
8618
9578
|
perfConfigPassed: registered.perfConfigPassed ?? true
|
|
8619
9579
|
};
|
|
8620
9580
|
}
|
|
8621
|
-
const read2 =
|
|
9581
|
+
const read2 = chunkVXGTC6DB_cjs.readModeState(env);
|
|
8622
9582
|
if (read2.ok && read2.value === null) return null;
|
|
8623
9583
|
const mode2 = read2.ok && read2.value !== null ? read2.value : { mode: "test" };
|
|
8624
|
-
const resolved =
|
|
9584
|
+
const resolved = chunkVYODYUEL_cjs.resolveConfig(void 0, {
|
|
8625
9585
|
mode: mode2.mode === "check" ? "test" : mode2.mode,
|
|
8626
9586
|
...mode2.mode === "check" ? {} : mode2.pass !== void 0 ? { passes: mode2.pass.total } : mode2.passes === void 0 ? {} : { passes: mode2.passes },
|
|
8627
9587
|
...mode2.env === void 0 ? {} : { env: mode2.env },
|
|
@@ -8641,7 +9601,7 @@ function runSettings(registered, env, packageVersion) {
|
|
|
8641
9601
|
replacedReporters: []
|
|
8642
9602
|
},
|
|
8643
9603
|
registered: false,
|
|
8644
|
-
warnings: [
|
|
9604
|
+
warnings: [chunkVXGTC6DB_cjs.notWrappedWarning()],
|
|
8645
9605
|
toolErrors: read2.ok ? [] : read2.issues
|
|
8646
9606
|
};
|
|
8647
9607
|
}
|
|
@@ -8714,6 +9674,17 @@ var RunSession = class {
|
|
|
8714
9674
|
/** Measured projects with browser samples; the others with requests are request only (02-REQ-42). */
|
|
8715
9675
|
projectsWithBrowserRequests = /* @__PURE__ */ new Set();
|
|
8716
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;
|
|
8717
9688
|
constructor(host, settings, options = {}) {
|
|
8718
9689
|
this.host = host;
|
|
8719
9690
|
this.settings = settings;
|
|
@@ -8721,7 +9692,7 @@ var RunSession = class {
|
|
|
8721
9692
|
this.warnings = [...settings.warnings];
|
|
8722
9693
|
this.toolErrors = [...settings.toolErrors];
|
|
8723
9694
|
this.startedAt = host.now();
|
|
8724
|
-
this.runId = settings.mode.runId ??
|
|
9695
|
+
this.runId = settings.mode.runId ?? chunkVXGTC6DB_cjs.generateRunId(this.startedAt, host.random);
|
|
8725
9696
|
this.configDir = host.cwd;
|
|
8726
9697
|
this.conditions = { workers: 1, projects: [], overriddenSettings: [] };
|
|
8727
9698
|
const keys = settings.config.keys;
|
|
@@ -8729,6 +9700,12 @@ var RunSession = class {
|
|
|
8729
9700
|
this.aggregator = this.createAggregator();
|
|
8730
9701
|
this.keyOf = createKeyBuilder(keys, { baseOrigins: [] });
|
|
8731
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;
|
|
8732
9709
|
}
|
|
8733
9710
|
/** Mode of the run report; a check aggregates like a measurement run (04-REQ-48). */
|
|
8734
9711
|
get mode() {
|
|
@@ -8757,11 +9734,13 @@ var RunSession = class {
|
|
|
8757
9734
|
measuredProjects: this.measured,
|
|
8758
9735
|
dependencyProjects: this.dependencyOnly,
|
|
8759
9736
|
evaluatedPercentile: cfg.checks.time.percentile.level,
|
|
8760
|
-
rawUrls: cfg.report.rawUrls
|
|
9737
|
+
rawUrls: cfg.report.rawUrls,
|
|
9738
|
+
coldSamples: cfg.measure.coldSamples,
|
|
9739
|
+
minSamples: cfg.checks.time.median.minSamples
|
|
8761
9740
|
});
|
|
8762
9741
|
}
|
|
8763
9742
|
info(line) {
|
|
8764
|
-
this.host.stdout.write(`${
|
|
9743
|
+
this.host.stdout.write(`${chunkVXGTC6DB_cjs.PACKAGE_NAME}: ${line}
|
|
8765
9744
|
`);
|
|
8766
9745
|
}
|
|
8767
9746
|
/** A hook threw: the error goes to the report and the outcome file (01-REQ-16). */
|
|
@@ -8777,9 +9756,11 @@ var RunSession = class {
|
|
|
8777
9756
|
projects: fullConfig.projects.filter((p) => inRun.has(p.name))
|
|
8778
9757
|
};
|
|
8779
9758
|
this.configLike = config;
|
|
9759
|
+
this.configFile = config.configFile;
|
|
9760
|
+
this.shard = config.shard === null ? null : { ...config.shard };
|
|
8780
9761
|
this.startedAt = this.host.now();
|
|
8781
9762
|
if (this.settings.mode.runId === void 0) {
|
|
8782
|
-
this.runId =
|
|
9763
|
+
this.runId = chunkVXGTC6DB_cjs.generateRunId(this.startedAt, this.host.random);
|
|
8783
9764
|
}
|
|
8784
9765
|
const io = this.host.io;
|
|
8785
9766
|
this.configDir = config.configFile === void 0 ? config.rootDir : io.directoryOf(config.configFile);
|
|
@@ -8825,25 +9806,19 @@ var RunSession = class {
|
|
|
8825
9806
|
}
|
|
8826
9807
|
const duplicate = duplicateBaseUrlLabels(this.conditions, config, keys);
|
|
8827
9808
|
if (duplicate !== null) this.warnings.push(duplicate);
|
|
8828
|
-
const empty = emptyBaseUrlWarning(this.conditions, config);
|
|
9809
|
+
const empty = emptyBaseUrlWarning(this.conditions, config, this.baseUrlHint("test"));
|
|
8829
9810
|
if (empty !== null) this.warnings.push(empty);
|
|
8830
9811
|
if (this.settings.registered && this.settings.perfConfigPassed === false) {
|
|
8831
9812
|
const notPassed = configFileNotPassedWarning(io.listDirSync(this.configDir));
|
|
8832
9813
|
if (notPassed !== null) this.warnings.push(notPassed);
|
|
8833
9814
|
}
|
|
8834
|
-
if (this.settings.registered && this.measured.size === 0) {
|
|
9815
|
+
if (this.settings.registered && this.measured.size === 0 && inRun.size > 0) {
|
|
8835
9816
|
this.toolErrors.push(noMeasuredProjectError(inRun));
|
|
8836
9817
|
}
|
|
8837
|
-
if (config.shard !== null) {
|
|
8838
|
-
this.toolErrors.push({
|
|
8839
|
-
code: "RUN_SHARDED",
|
|
8840
|
-
message: `The perf-mode run is sharded (--shard ${config.shard.current}/${config.shard.total}): each machine would evaluate only part of the keys.`,
|
|
8841
|
-
hint: "Run perf mode on one machine without --shard."
|
|
8842
|
-
});
|
|
8843
|
-
}
|
|
8844
9818
|
this.beginWarnings = this.warnings.length;
|
|
8845
9819
|
this.beginToolErrors = this.toolErrors.length;
|
|
8846
|
-
|
|
9820
|
+
this.passTests = measuredTestCount(suite.allTests(), this.measured);
|
|
9821
|
+
if (this.passes > 1 || this.sharded) this.aggregator.journal = [];
|
|
8847
9822
|
if (this.passIndex > 1) {
|
|
8848
9823
|
this.info(`pass ${String(this.passIndex)}/${String(this.passes)} (perf mode "${this.mode}")`);
|
|
8849
9824
|
return;
|
|
@@ -8855,6 +9830,7 @@ var RunSession = class {
|
|
|
8855
9830
|
/** report.dir as an absolute path. */
|
|
8856
9831
|
reportDir() {
|
|
8857
9832
|
const io = this.host.io;
|
|
9833
|
+
if (this.merging !== null) return io.resolvePath(this.host.cwd, MERGE_DIR);
|
|
8858
9834
|
return io.resolvePath(this.configDir, this.settings.config.report.dir);
|
|
8859
9835
|
}
|
|
8860
9836
|
/** Removes pass-<k>.json files of an earlier run (02-REQ-36). */
|
|
@@ -8882,8 +9858,9 @@ var RunSession = class {
|
|
|
8882
9858
|
const cfg = this.settings.config;
|
|
8883
9859
|
const io = this.host.io;
|
|
8884
9860
|
const tests = measuredTestCount(suite.allTests(), this.measured);
|
|
8885
|
-
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";
|
|
8886
9862
|
const { width, color } = this.terminal();
|
|
9863
|
+
const lastMs = this.check ? null : this.lastMsPerTest();
|
|
8887
9864
|
return formatStartBanner(
|
|
8888
9865
|
{
|
|
8889
9866
|
packageName: "pw-perf",
|
|
@@ -8892,11 +9869,14 @@ var RunSession = class {
|
|
|
8892
9869
|
dependencies: this.conditions.projects.filter((p) => p.role !== "measured").map((p) => p.name),
|
|
8893
9870
|
tests,
|
|
8894
9871
|
passes: this.passes,
|
|
8895
|
-
maxTests: this.settings.mode.maxTests ??
|
|
8896
|
-
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,
|
|
8897
9877
|
report: this.check ? null : io.relativeSlashPath(this.host.cwd, io.resolvePath(this.reportDir(), file)),
|
|
8898
9878
|
// run.grep already selects the measured subset (04-REQ-65, 04-D-51).
|
|
8899
|
-
tip: cfg.run.grep === null &&
|
|
9879
|
+
tip: cfg.run.grep === null && chunkVXGTC6DB_cjs.testFilters(chunkVXGTC6DB_cjs.testArgsFromArgv(this.host.argv)).length === 0
|
|
8900
9880
|
},
|
|
8901
9881
|
{ width, color, ascii: asciiTerminal(this.host.env) }
|
|
8902
9882
|
);
|
|
@@ -8954,7 +9934,7 @@ var RunSession = class {
|
|
|
8954
9934
|
if (bodies.length > 1) {
|
|
8955
9935
|
this.warnings.push({
|
|
8956
9936
|
code: "ATTACHMENT_DUPLICATE",
|
|
8957
|
-
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.`,
|
|
8958
9938
|
hint: "Apply withPerfFixtures() once per test object."
|
|
8959
9939
|
});
|
|
8960
9940
|
}
|
|
@@ -9067,19 +10047,20 @@ var RunSession = class {
|
|
|
9067
10047
|
}
|
|
9068
10048
|
source() {
|
|
9069
10049
|
const browsers = this.conditions.projects.filter((p) => p.role === "measured" && p.browserName !== null).map((p) => p.browserName);
|
|
9070
|
-
const { nodeVersion: _, ...host } = this.
|
|
10050
|
+
const { nodeVersion: _, ...host } = this.hostInfo;
|
|
9071
10051
|
return {
|
|
9072
10052
|
browsers: [...new Set(browsers)].sort(),
|
|
9073
10053
|
playwrightVersion: this.playwrightVersion,
|
|
9074
10054
|
host,
|
|
9075
10055
|
normalization: this.normalization,
|
|
9076
|
-
stepNormalization: this.steps.fingerprint()
|
|
10056
|
+
stepNormalization: this.steps.fingerprint(),
|
|
10057
|
+
coldSamples: this.settings.config.measure.coldSamples
|
|
9077
10058
|
};
|
|
9078
10059
|
}
|
|
9079
10060
|
reportInput(status, finishedAt, aggregates, evaluation, warnings, toolErrors) {
|
|
9080
10061
|
return {
|
|
9081
10062
|
meta: {
|
|
9082
|
-
tool: { name:
|
|
10063
|
+
tool: { name: chunkVXGTC6DB_cjs.PACKAGE_NAME, version: this.settings.packageVersion },
|
|
9083
10064
|
runId: this.runId,
|
|
9084
10065
|
mode: this.mode,
|
|
9085
10066
|
startedAt: this.startedAt.toISOString(),
|
|
@@ -9087,8 +10068,8 @@ var RunSession = class {
|
|
|
9087
10068
|
env: this.settings.config.run.env,
|
|
9088
10069
|
configDir: this.configDir,
|
|
9089
10070
|
...this.suite === null ? {} : { suite: this.suite },
|
|
9090
|
-
ci: this.
|
|
9091
|
-
host: this.
|
|
10071
|
+
ci: this.ciInfo,
|
|
10072
|
+
host: this.hostInfo,
|
|
9092
10073
|
playwright: { version: this.playwrightVersion }
|
|
9093
10074
|
},
|
|
9094
10075
|
config: this.settings.snapshot,
|
|
@@ -9106,12 +10087,34 @@ var RunSession = class {
|
|
|
9106
10087
|
)
|
|
9107
10088
|
},
|
|
9108
10089
|
tests: this.testsResult(status),
|
|
10090
|
+
shards: this.shardsField(),
|
|
9109
10091
|
aggregates,
|
|
9110
10092
|
evaluation,
|
|
9111
10093
|
warnings,
|
|
9112
10094
|
toolErrors
|
|
9113
10095
|
};
|
|
9114
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
|
+
}
|
|
9115
10118
|
terminal() {
|
|
9116
10119
|
const out = this.host.stdout;
|
|
9117
10120
|
return {
|
|
@@ -9125,24 +10128,28 @@ var RunSession = class {
|
|
|
9125
10128
|
*/
|
|
9126
10129
|
async end(result2) {
|
|
9127
10130
|
if (this.passIndex > 1) return this.endLaterPass(result2);
|
|
9128
|
-
|
|
10131
|
+
const emptyShard = this.sharded && !this.host.argv.includes("--list");
|
|
10132
|
+
if (this.testsStarted === 0 && !emptyShard) return void 0;
|
|
9129
10133
|
if (this.check) return this.endCheck(result2);
|
|
9130
10134
|
let status = result2.status;
|
|
9131
10135
|
let outcome;
|
|
9132
10136
|
try {
|
|
9133
10137
|
if (this.passes > 1) status = await this.runPasses(result2);
|
|
9134
|
-
outcome = await this.finish({ status });
|
|
10138
|
+
outcome = this.sharded ? await this.finishShard({ status }) : await this.finish({ status });
|
|
9135
10139
|
} catch (error) {
|
|
9136
10140
|
this.recordInternalError("onEnd", error);
|
|
9137
10141
|
outcome = this.fallbackOutcome({ status });
|
|
10142
|
+
if (this.sharded) outcome.evaluation.gateEnabled = false;
|
|
9138
10143
|
for (const issue2 of outcome.toolErrors) {
|
|
9139
|
-
this.host.stderr.write(`${
|
|
10144
|
+
this.host.stderr.write(`${chunkVXGTC6DB_cjs.PACKAGE_NAME}: ${issue2.code}: ${issue2.message}
|
|
9140
10145
|
`);
|
|
9141
10146
|
}
|
|
9142
10147
|
}
|
|
9143
10148
|
const written = await this.writeOutcome(outcome);
|
|
9144
10149
|
if (written !== null) {
|
|
9145
|
-
this.host.stdout.write(
|
|
10150
|
+
this.host.stdout.write(
|
|
10151
|
+
this.sharded ? shardOutcomeLine(outcome, written) : outcomeLine(outcome, written)
|
|
10152
|
+
);
|
|
9146
10153
|
}
|
|
9147
10154
|
if (this.next !== null) {
|
|
9148
10155
|
this.host.stdout.write(nextLine(this.next, this.terminal().color));
|
|
@@ -9189,12 +10196,12 @@ var RunSession = class {
|
|
|
9189
10196
|
await this.host.io.writeJsonStable(path, file);
|
|
9190
10197
|
} catch (error) {
|
|
9191
10198
|
this.host.stderr.write(
|
|
9192
|
-
`${
|
|
10199
|
+
`${chunkVXGTC6DB_cjs.PACKAGE_NAME}: ${label}: the pass file could not be written to ${path}: ${error instanceof Error ? error.message : String(error)}
|
|
9193
10200
|
`
|
|
9194
10201
|
);
|
|
9195
10202
|
return void 0;
|
|
9196
10203
|
}
|
|
9197
|
-
const samples = file.entries.filter((e) => e[0]
|
|
10204
|
+
const samples = file.entries.filter((e) => e[0] === "r" || e[0] === "s").length;
|
|
9198
10205
|
this.info(`${label} done: ${plural4(this.testsStarted, "test")}, ${plural4(samples, "sample")}.`);
|
|
9199
10206
|
return void 0;
|
|
9200
10207
|
}
|
|
@@ -9210,7 +10217,7 @@ var RunSession = class {
|
|
|
9210
10217
|
await io.writeJsonStable(this.passPath(1), this.passFile(status, this.host.now()));
|
|
9211
10218
|
} catch {
|
|
9212
10219
|
}
|
|
9213
|
-
this.aggregator.journal = null;
|
|
10220
|
+
if (!this.sharded) this.aggregator.journal = null;
|
|
9214
10221
|
const total = this.passes;
|
|
9215
10222
|
const info = io.readPackageInfo(this.host.cwd);
|
|
9216
10223
|
const passInput = {
|
|
@@ -9219,8 +10226,8 @@ var RunSession = class {
|
|
|
9219
10226
|
env: this.scriptEnv(info.scripts),
|
|
9220
10227
|
scripts: info.scripts
|
|
9221
10228
|
};
|
|
9222
|
-
const command =
|
|
9223
|
-
const shape =
|
|
10229
|
+
const command = chunkVXGTC6DB_cjs.passCommand(passInput);
|
|
10230
|
+
const shape = chunkVXGTC6DB_cjs.runShape(passInput);
|
|
9224
10231
|
const pm = packageManager({
|
|
9225
10232
|
userAgent: this.host.env["npm_config_user_agent"] ?? null,
|
|
9226
10233
|
lockFiles: info.lockFiles
|
|
@@ -9231,7 +10238,7 @@ var RunSession = class {
|
|
|
9231
10238
|
this.info(`${label}: ${shown}`);
|
|
9232
10239
|
const env = {
|
|
9233
10240
|
...this.host.env,
|
|
9234
|
-
...
|
|
10241
|
+
...chunkVXGTC6DB_cjs.writeModeState({ ...this.settings.mode, runId: this.runId, pass: { index, total } })
|
|
9235
10242
|
};
|
|
9236
10243
|
const exit = await this.host.runPass(command, env);
|
|
9237
10244
|
if (exit.error !== void 0) {
|
|
@@ -9273,6 +10280,7 @@ var RunSession = class {
|
|
|
9273
10280
|
});
|
|
9274
10281
|
continue;
|
|
9275
10282
|
}
|
|
10283
|
+
this.aggregator.startSegment();
|
|
9276
10284
|
this.mergePass(parsed.value);
|
|
9277
10285
|
status = worseStatus(status, parsed.value.status);
|
|
9278
10286
|
}
|
|
@@ -9280,6 +10288,11 @@ var RunSession = class {
|
|
|
9280
10288
|
}
|
|
9281
10289
|
/** Adds the data of a later pass to this run (04-REQ-64). */
|
|
9282
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) {
|
|
9283
10296
|
replayEntries(this.aggregator, file.entries);
|
|
9284
10297
|
for (const name of ["expected", "unexpected", "flaky", "skipped"]) {
|
|
9285
10298
|
this.mergedTests[name] += file.tests[name];
|
|
@@ -9297,12 +10310,11 @@ var RunSession = class {
|
|
|
9297
10310
|
}
|
|
9298
10311
|
this.warnings.push(...file.warnings);
|
|
9299
10312
|
this.toolErrors.push(...file.toolErrors);
|
|
9300
|
-
this.completedPasses += 1;
|
|
9301
10313
|
}
|
|
9302
10314
|
async finish(result2) {
|
|
9303
10315
|
const cfg = this.settings.config;
|
|
9304
10316
|
const io = this.host.io;
|
|
9305
|
-
const finishedAt = this.host.now();
|
|
10317
|
+
const finishedAt = this.merging?.finishedAt ?? this.host.now();
|
|
9306
10318
|
const warnings = [...this.warnings, ...this.runWarnings()];
|
|
9307
10319
|
const toolErrors = [...this.toolErrors];
|
|
9308
10320
|
const aggregates = this.aggregator.finalize();
|
|
@@ -9314,12 +10326,24 @@ var RunSession = class {
|
|
|
9314
10326
|
const pending = this.pendingWarning();
|
|
9315
10327
|
if (pending !== null) warnings.push(pending);
|
|
9316
10328
|
const tests = this.testsResult(result2.status);
|
|
9317
|
-
const assessment = assessRun(
|
|
9318
|
-
{ tests, maxFailures: this.maxFailures, sharded: false },
|
|
9319
|
-
cfg.gate
|
|
9320
|
-
);
|
|
10329
|
+
const assessment = assessRun({ tests, maxFailures: this.maxFailures }, cfg.gate);
|
|
9321
10330
|
warnings.push(...assessment.warnings);
|
|
9322
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
|
+
}
|
|
9323
10347
|
const location = {
|
|
9324
10348
|
configDir: this.configDir,
|
|
9325
10349
|
dir: cfg.thresholds.dir,
|
|
@@ -9334,7 +10358,9 @@ var RunSession = class {
|
|
|
9334
10358
|
env: cfg.run.env,
|
|
9335
10359
|
fatalToolError: this.fatal,
|
|
9336
10360
|
source: this.source(),
|
|
9337
|
-
startedAt: this.startedAt.toISOString()
|
|
10361
|
+
startedAt: this.startedAt.toISOString(),
|
|
10362
|
+
passes: this.completedPasses,
|
|
10363
|
+
workers: this.conditions.workers
|
|
9338
10364
|
});
|
|
9339
10365
|
warnings.push(...evaluation.warnings);
|
|
9340
10366
|
toolErrors.push(...evaluation.toolErrors);
|
|
@@ -9342,7 +10368,7 @@ var RunSession = class {
|
|
|
9342
10368
|
this.reportInput(result2.status, finishedAt, aggregates, evaluation, warnings, toolErrors)
|
|
9343
10369
|
);
|
|
9344
10370
|
let report = build();
|
|
9345
|
-
const reportDir =
|
|
10371
|
+
const reportDir = this.reportDir();
|
|
9346
10372
|
const paths = {
|
|
9347
10373
|
reportJson: null,
|
|
9348
10374
|
reportHtml: null,
|
|
@@ -9404,7 +10430,8 @@ var RunSession = class {
|
|
|
9404
10430
|
width,
|
|
9405
10431
|
color,
|
|
9406
10432
|
ascii: asciiTerminal(this.host.env),
|
|
9407
|
-
html: paths.reportHtml !== null
|
|
10433
|
+
html: paths.reportHtml !== null,
|
|
10434
|
+
reportDir
|
|
9408
10435
|
})
|
|
9409
10436
|
);
|
|
9410
10437
|
const noSteps = this.steps.noStepsLine(Object.keys(aggregates.steps));
|
|
@@ -9417,7 +10444,7 @@ var RunSession = class {
|
|
|
9417
10444
|
width,
|
|
9418
10445
|
color,
|
|
9419
10446
|
prune: this.pruned,
|
|
9420
|
-
subset:
|
|
10447
|
+
subset: this.testFilterArgs().length > 0,
|
|
9421
10448
|
// Absolute, like the Report line of the summary (10, chapter 9.1; 09-REQ-30).
|
|
9422
10449
|
diffPath: paths.thresholdsDiff,
|
|
9423
10450
|
temporary,
|
|
@@ -9433,6 +10460,206 @@ var RunSession = class {
|
|
|
9433
10460
|
});
|
|
9434
10461
|
return buildOutcome(report, paths);
|
|
9435
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
|
+
}
|
|
9436
10663
|
countCheck(test, result2, measured) {
|
|
9437
10664
|
const c = this.checkRun;
|
|
9438
10665
|
const duration = result2.duration ?? 0;
|
|
@@ -9467,7 +10694,7 @@ var RunSession = class {
|
|
|
9467
10694
|
if (this.settings.mode.runId !== void 0) {
|
|
9468
10695
|
try {
|
|
9469
10696
|
this.host.io.removeFileSync(
|
|
9470
|
-
this.host.io.tempPath(
|
|
10697
|
+
this.host.io.tempPath(chunkVXGTC6DB_cjs.checkStateFileName(this.settings.mode.runId))
|
|
9471
10698
|
);
|
|
9472
10699
|
} catch {
|
|
9473
10700
|
}
|
|
@@ -9482,7 +10709,7 @@ var RunSession = class {
|
|
|
9482
10709
|
const aggregates = this.aggregator.finalize();
|
|
9483
10710
|
const tests = this.testsResult(result2.status);
|
|
9484
10711
|
const assessment = assessRun(
|
|
9485
|
-
{ tests, maxFailures: this.maxFailures
|
|
10712
|
+
{ tests, maxFailures: this.maxFailures },
|
|
9486
10713
|
{ maxFailedTestShare: 1 }
|
|
9487
10714
|
);
|
|
9488
10715
|
const toolErrors = [...this.toolErrors, ...assessment.toolErrors];
|
|
@@ -9505,7 +10732,7 @@ var RunSession = class {
|
|
|
9505
10732
|
warnings.push({
|
|
9506
10733
|
code: "CONFIG_BASEURL_EMPTY",
|
|
9507
10734
|
message: `Measured ${unset.length === 1 ? "project" : "projects"} ${unset.join(", ")} ${unset.length === 1 ? "has" : "have"} no use.baseURL.`,
|
|
9508
|
-
hint: "
|
|
10735
|
+
hint: this.baseUrlHint("check")
|
|
9509
10736
|
});
|
|
9510
10737
|
}
|
|
9511
10738
|
const keys = cfg.keys;
|
|
@@ -9529,12 +10756,12 @@ var RunSession = class {
|
|
|
9529
10756
|
[...new Set(candidates)].filter((o) => !coveredByOrigins(keys.origins, o)).map((origin) => ({ origin, base: baseSet.has(origin) }))
|
|
9530
10757
|
);
|
|
9531
10758
|
if (random !== null) warnings.push(random);
|
|
9532
|
-
const patterns =
|
|
10759
|
+
const patterns = chunkVYODYUEL_cjs.compileHostPatterns(keys.origins);
|
|
9533
10760
|
const exact = new Set(
|
|
9534
|
-
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] : [])
|
|
9535
10762
|
);
|
|
9536
10763
|
const origins = [...aggregates.origins].sort((a, b) => b.requestCount - a.requestCount || (a.origin < b.origin ? -1 : 1)).map((o) => {
|
|
9537
|
-
const pattern = URL.canParse(o.origin) ?
|
|
10764
|
+
const pattern = URL.canParse(o.origin) ? chunkVYODYUEL_cjs.matchingPattern(patterns, new URL(o.origin)) : null;
|
|
9538
10765
|
const source = exact.has(o.origin) ? "keys.origins" : pattern !== null ? `keys.origins pattern ${pattern.canonical}` : baseSet.has(o.origin) ? "baseURL" : "host";
|
|
9539
10766
|
return { origin: o.origin, label: o.label, requests: o.requestCount, source };
|
|
9540
10767
|
});
|
|
@@ -9620,7 +10847,8 @@ var RunSession = class {
|
|
|
9620
10847
|
passesThresholds: cfg.run.passes.thresholds,
|
|
9621
10848
|
meanMs,
|
|
9622
10849
|
setupMs: c.setupMs
|
|
9623
|
-
})
|
|
10850
|
+
}),
|
|
10851
|
+
shard: this.shard
|
|
9624
10852
|
},
|
|
9625
10853
|
{ width, color, ascii: asciiTerminal(this.host.env) }
|
|
9626
10854
|
)
|
|
@@ -9641,7 +10869,7 @@ var RunSession = class {
|
|
|
9641
10869
|
/** The words the run added to the test command, as for the next pass (09-REQ-32, 04-REQ-63). */
|
|
9642
10870
|
runArgs() {
|
|
9643
10871
|
const { scripts } = this.host.io.readPackageInfo(this.host.cwd);
|
|
9644
|
-
const shape =
|
|
10872
|
+
const shape = chunkVXGTC6DB_cjs.runShape({
|
|
9645
10873
|
execPath: this.host.execPath,
|
|
9646
10874
|
argv: this.host.argv,
|
|
9647
10875
|
env: this.scriptEnv(scripts),
|
|
@@ -9655,7 +10883,7 @@ var RunSession = class {
|
|
|
9655
10883
|
* `npx` (04-REQ-63 point 2); the process table is read at most once per run.
|
|
9656
10884
|
*/
|
|
9657
10885
|
scriptEnv(scripts) {
|
|
9658
|
-
this.scriptEnvCache ??=
|
|
10886
|
+
this.scriptEnvCache ??= chunkVXGTC6DB_cjs.scriptEnv({
|
|
9659
10887
|
env: this.host.env,
|
|
9660
10888
|
scripts,
|
|
9661
10889
|
pid: this.host.pid,
|
|
@@ -9675,6 +10903,17 @@ var RunSession = class {
|
|
|
9675
10903
|
const dir = io.relativeSlashPath(io.resolvePath(this.host.cwd, from), this.host.cwd);
|
|
9676
10904
|
return dir === "." || dir === ".." || dir.startsWith("../") || /^([A-Za-z]:)?\//u.test(dir) ? null : dir;
|
|
9677
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
|
+
}
|
|
9678
10917
|
/** Commands of the project for each mode, for the Next: hint (09-REQ-32). */
|
|
9679
10918
|
commands() {
|
|
9680
10919
|
const info = this.host.io.readPackageInfo(this.configDir);
|
|
@@ -9692,7 +10931,8 @@ var RunSession = class {
|
|
|
9692
10931
|
};
|
|
9693
10932
|
return {
|
|
9694
10933
|
test: suggestCommand("test", ctx),
|
|
9695
|
-
|
|
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,
|
|
9696
10936
|
check: suggestCommand("check", ctx)
|
|
9697
10937
|
};
|
|
9698
10938
|
}
|
|
@@ -9745,7 +10985,7 @@ var RunSession = class {
|
|
|
9745
10985
|
}
|
|
9746
10986
|
warnings.push(...derived.value.warnings);
|
|
9747
10987
|
const absolute = io.thresholdsFilePaths(location);
|
|
9748
|
-
const reportDir =
|
|
10988
|
+
const reportDir = this.reportDir();
|
|
9749
10989
|
let writeFailed = false;
|
|
9750
10990
|
for (const file of derived.value.files) {
|
|
9751
10991
|
if (file.content === null || !file.changed) continue;
|
|
@@ -9836,7 +11076,7 @@ var RunSession = class {
|
|
|
9836
11076
|
*/
|
|
9837
11077
|
prune(warnings) {
|
|
9838
11078
|
if (this.settings.mode.prune !== true) return false;
|
|
9839
|
-
const filters =
|
|
11079
|
+
const filters = this.testFilterArgs();
|
|
9840
11080
|
if (filters.length > 0) {
|
|
9841
11081
|
warnings.push({
|
|
9842
11082
|
code: "RUN_PRUNE_SKIPPED",
|
|
@@ -9848,13 +11088,21 @@ var RunSession = class {
|
|
|
9848
11088
|
this.pruned = true;
|
|
9849
11089
|
return true;
|
|
9850
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
|
+
}
|
|
9851
11102
|
/** <report.dir>/outcome.json (02-REQ-27, 04-REQ-62). */
|
|
9852
11103
|
outcomePath() {
|
|
9853
11104
|
const io = this.host.io;
|
|
9854
|
-
return io.resolvePath(
|
|
9855
|
-
io.resolvePath(this.configDir, this.settings.config.report.dir),
|
|
9856
|
-
"outcome.json"
|
|
9857
|
-
);
|
|
11105
|
+
return io.resolvePath(this.reportDir(), "outcome.json");
|
|
9858
11106
|
}
|
|
9859
11107
|
/** Last step of onEnd (02-REQ-27); returns the path written, or null. */
|
|
9860
11108
|
async writeOutcome(outcome) {
|
|
@@ -9864,7 +11112,7 @@ var RunSession = class {
|
|
|
9864
11112
|
return file;
|
|
9865
11113
|
} catch (error) {
|
|
9866
11114
|
this.host.stderr.write(
|
|
9867
|
-
`${
|
|
11115
|
+
`${chunkVXGTC6DB_cjs.PACKAGE_NAME}: OUTCOME_WRITE_FAILED: the outcome file could not be written to ${file}: ${error instanceof Error ? error.message : String(error)}
|
|
9868
11116
|
`
|
|
9869
11117
|
);
|
|
9870
11118
|
return null;
|
|
@@ -9873,7 +11121,7 @@ var RunSession = class {
|
|
|
9873
11121
|
};
|
|
9874
11122
|
function configFileNotPassedWarning(entries2) {
|
|
9875
11123
|
const names2 = new Set(entries2);
|
|
9876
|
-
const file =
|
|
11124
|
+
const file = chunkVXGTC6DB_cjs.CONFIG_FILE_EXTENSIONS.map((ext) => `${chunkVXGTC6DB_cjs.CONFIG_FILE_BASENAME}${ext}`).find(
|
|
9877
11125
|
(name) => names2.has(name)
|
|
9878
11126
|
);
|
|
9879
11127
|
if (file === void 0) return null;
|
|
@@ -9883,7 +11131,8 @@ function configFileNotPassedWarning(entries2) {
|
|
|
9883
11131
|
hint: "Import it in the Playwright config and pass it as the second argument: withPerf(config, perfConfig)."
|
|
9884
11132
|
};
|
|
9885
11133
|
}
|
|
9886
|
-
|
|
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) {
|
|
9887
11136
|
const names2 = conditions.projects.flatMap((p, i) => {
|
|
9888
11137
|
if (p.role !== "measured") return [];
|
|
9889
11138
|
const baseURL = config.projects[i]?.use.baseURL;
|
|
@@ -9901,50 +11150,11 @@ function emptyBaseUrlWarning(conditions, config) {
|
|
|
9901
11150
|
return {
|
|
9902
11151
|
code: "CONFIG_BASEURL_EMPTY",
|
|
9903
11152
|
message: `Measured ${names2.length === 1 ? "project" : "projects"} ${names2.join(", ")} ${names2.length === 1 ? "has" : "have"} an empty use.baseURL.`,
|
|
9904
|
-
hint:
|
|
11153
|
+
hint: hint2
|
|
9905
11154
|
};
|
|
9906
11155
|
}
|
|
9907
11156
|
|
|
9908
11157
|
// src/reporter/perf-reporter.ts
|
|
9909
|
-
function processHost() {
|
|
9910
|
-
const env = process.env;
|
|
9911
|
-
return {
|
|
9912
|
-
env,
|
|
9913
|
-
io: {
|
|
9914
|
-
loadThresholds,
|
|
9915
|
-
thresholdsFilePaths,
|
|
9916
|
-
writeJsonStable,
|
|
9917
|
-
writeTextAtomic,
|
|
9918
|
-
resolvePath,
|
|
9919
|
-
directoryOf,
|
|
9920
|
-
relativeSlashPath,
|
|
9921
|
-
removeFileSync,
|
|
9922
|
-
readPackageInfo,
|
|
9923
|
-
readSuite,
|
|
9924
|
-
tempPath,
|
|
9925
|
-
readTextFile,
|
|
9926
|
-
readTextFileSync,
|
|
9927
|
-
listDirSync,
|
|
9928
|
-
isDirectorySync,
|
|
9929
|
-
realPathSync,
|
|
9930
|
-
homeDir,
|
|
9931
|
-
scanDirSync,
|
|
9932
|
-
emptyDirSync
|
|
9933
|
-
},
|
|
9934
|
-
stdout: process.stdout,
|
|
9935
|
-
stderr: process.stderr,
|
|
9936
|
-
cwd: process.cwd(),
|
|
9937
|
-
argv: process.argv,
|
|
9938
|
-
now: () => /* @__PURE__ */ new Date(),
|
|
9939
|
-
random: Math.random,
|
|
9940
|
-
ci: readCiInfo(env),
|
|
9941
|
-
host: readHostInfo(env),
|
|
9942
|
-
execPath: process.execPath,
|
|
9943
|
-
pid: process.pid,
|
|
9944
|
-
processTable: readProcessTable,
|
|
9945
|
-
runPass: (command, passEnv) => runPass(command, passEnv, process.cwd())
|
|
9946
|
-
};
|
|
9947
|
-
}
|
|
9948
11158
|
var PerfReporter = class {
|
|
9949
11159
|
/** Reporter options from the Playwright config; none are defined yet. */
|
|
9950
11160
|
options;
|
|
@@ -9956,7 +11166,7 @@ var PerfReporter = class {
|
|
|
9956
11166
|
let startError;
|
|
9957
11167
|
try {
|
|
9958
11168
|
const host = processHost();
|
|
9959
|
-
const settings = runSettings(
|
|
11169
|
+
const settings = runSettings(chunkVXGTC6DB_cjs.getRegistered(), host.env, chunkVXGTC6DB_cjs.version);
|
|
9960
11170
|
session = settings === null ? null : new RunSession(host, settings);
|
|
9961
11171
|
} catch (error) {
|
|
9962
11172
|
startError = error;
|