@mark1russell7/harness 0.16.7 → 0.16.8
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/README.md +13 -0
- package/build/{cell-FMlgjqVq.d.ts → cell-CYOKWfwg.d.ts} +46 -1
- package/build/image-YlflAajQ.js.map +1 -1
- package/build/index.d.ts +51 -2
- package/build/index.js +188 -53
- package/build/index.js.map +1 -1
- package/build/schema.d.ts +1 -1
- package/image/Dockerfile +1 -1
- package/image/native/src/bin/egress.rs +540 -0
- package/package.json +3 -3
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as MiddleboxExpectation, A as HopPlace, At as RunPart, B as LineCount, Bt as StageBand, C as FaultPlace, Ct as RouterHop, D as GroupRole, Dt as RunDrill, E as GroupPrediction, Et as RunBackup, F as ImageSource, Ft as SentinelEvent, G as LoadStream, Gt as WsProbe, H as LoadBand, Ht as Target, I as Jitter, It as SentinelStage, J as MemoryOomTask, Jt as latestEndOf, K as MemoryLimits, Kt as environmentProblems, L as Kafka, Lt as Shipped, M as HopWrite, Mt as RunRoute, N as HostSysctl, Nt as RunStream, O as Hop, Ot as RunFabric, P as HttpProbe, Pt as RunTopology, Q as MiddleboxEvent, R as KafkaPause, Rt as ShippedImage, S as Fault, St as RequestPrediction, T as GroupPlace, Tt as Run, U as LoadPlan, Ut as Topology, V as LineMatch, Vt as Subject, W as LoadPrediction, Wt as Toxic, X as MemoryStep, Y as MemoryPrediction, Z as MemoryThrottlePrediction, _ as EgressBurst, _t as Recovers, a as ClientCapability, at as PausePrediction, b as Fabric, bt as ReplicaSetStage, c as ClusterClientAt, ct as Prediction, d as CountBand, dt as ProxyTime, et as MiddleboxForm, f as DeliveryPrediction, ft as QueueBand, g as DriverStep, gt as Reconnects, h as DriverBand, ht as QueuePrediction, i as Client, it as PauseBand, j as HopSignal, jt as RunPause, k as HopEvent, kt as RunGroup, l as ClusterStage, lt as ProbeEvent, m as DrillRoom, mt as QueueEnd, n as CLIENT_CAPABILITIES, nt as Outcomes, o as ClientImage, ot as PinnedImage, p as Drill, pt as QueueConnection, q as MemoryOomPrediction, qt as isHopPlace, r as Cell, rt as Pair, s as Cluster, st as PortsPrediction, t as BuildImage, tt as Observer, u as ConntrackPrediction, ut as ProxyHop, v as EgressPacketLaw, vt as Reference, w as Group, wt as RttRange, x as FabricManifest, xt as Replies, y as EgressPrediction, yt as ReplicaSet, z as KernelRecord, zt as Stage } from "./cell-CYOKWfwg.js";
|
|
2
2
|
import { Quantity } from "@mark1russell7/quantity";
|
|
3
3
|
import { DiskFault, LoadMeasure, Schedule } from "@mark1russell7/rigor-chaos";
|
|
4
4
|
import { StartedTestContainer } from "testcontainers";
|
|
@@ -462,6 +462,50 @@ export declare const stepBand: (expected: MemoryThrottlePrediction, usage: numbe
|
|
|
462
462
|
* step charged two batches.
|
|
463
463
|
*/
|
|
464
464
|
export declare const measureMemory: (run: Run, expected: MemoryPrediction) => Measured;
|
|
465
|
+
/** This record is one datagram of an egress run, as the egress client wrote it. */
|
|
466
|
+
interface EgressPacketReading {
|
|
467
|
+
/** This count is the key of the datagram: its place in the order of the sends, from 0. */
|
|
468
|
+
readonly key: number;
|
|
469
|
+
/** This count is the place of its burst, from 0. */
|
|
470
|
+
readonly burst: number;
|
|
471
|
+
/**
|
|
472
|
+
* This word is the end of the datagram. `sent` has a stamp of its departure. `dropped` is a send
|
|
473
|
+
* that gave ENOBUFS. `unread` is a send that the qdisc took, with no stamp of its departure.
|
|
474
|
+
*/
|
|
475
|
+
readonly outcome: "sent" | "dropped" | "unread";
|
|
476
|
+
/** This time is the arrival of the datagram in the qdisc after the first arrival of its burst. */
|
|
477
|
+
readonly arrived: Quantity;
|
|
478
|
+
/** This time is the departure of the datagram after the first arrival of its burst, or null. */
|
|
479
|
+
readonly left: Quantity | null;
|
|
480
|
+
}
|
|
481
|
+
/** This record is what a run of an egress cell measured. */
|
|
482
|
+
interface EgressReading {
|
|
483
|
+
/** This name is the kind of the root qdisc that `tc` read back. */
|
|
484
|
+
readonly kind: string;
|
|
485
|
+
readonly packets: readonly EgressPacketReading[];
|
|
486
|
+
/** These times are the spread of the arrivals of each burst. */
|
|
487
|
+
readonly spreads: readonly Quantity[];
|
|
488
|
+
/** These times are the first arrival of each burst after the first arrival of the run. */
|
|
489
|
+
readonly starts: readonly Quantity[];
|
|
490
|
+
/** These counts are the rise of the counts of the root qdisc in the run. */
|
|
491
|
+
readonly counts: {
|
|
492
|
+
readonly packets: number;
|
|
493
|
+
readonly drops: number;
|
|
494
|
+
};
|
|
495
|
+
/** This time is the step of CLOCK_REALTIME from the start of the bursts to the end of the run. */
|
|
496
|
+
readonly step: Quantity;
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* This function reads one run of an egress cell from the lines of the egress client. A run is void
|
|
500
|
+
* when the client wrote an error or no `done` line, or when the qdisc is of another kind. A neighbour
|
|
501
|
+
* of the target that is not permanent voids a run too. It is void too when the client sent another count of
|
|
502
|
+
* datagrams than the law. A send that failed with an error other than ENOBUFS voids its run, and a
|
|
503
|
+
* datagram with no stamp of its arrival voids it too. The arrivals void a run when one burst spreads more than `spread`, or
|
|
504
|
+
* when a later burst starts more than `jitter` off its time. The counts of the qdisc void a run when
|
|
505
|
+
* other traffic went through it. A step of the clock and a read of less than `read` of the
|
|
506
|
+
* departures void a run too.
|
|
507
|
+
*/
|
|
508
|
+
export declare const measureEgress: (run: Run, expected: EgressPrediction) => Measured;
|
|
465
509
|
/**
|
|
466
510
|
* This module reads one run of a paused consumer against its law. Two members of a group each hold
|
|
467
511
|
* one partition. A SIGSTOP stops the first member while it holds a batch, and a SIGCONT ends that
|
|
@@ -2257,6 +2301,11 @@ interface Measured {
|
|
|
2257
2301
|
* A void run has it too when the judge read the lines of the client.
|
|
2258
2302
|
*/
|
|
2259
2303
|
readonly memory?: MemoryReading;
|
|
2304
|
+
/**
|
|
2305
|
+
* This record is what a run of an egress cell measured: the arrival and the departure of each datagram in the qdisc.
|
|
2306
|
+
* A void run has it too when the judge read the stamps of the client.
|
|
2307
|
+
*/
|
|
2308
|
+
readonly egress?: EgressReading;
|
|
2260
2309
|
/** This record is what the second request of an HTTP client met, for a cell whose prediction says it. */
|
|
2261
2310
|
readonly request?: RequestReading | null;
|
|
2262
2311
|
/** This record is the time of each later band of a driver cell (`DriverBand.then`). */
|
|
@@ -2958,4 +3007,4 @@ export declare const environmentCounts: (cell: Cell, runs: number) => number[];
|
|
|
2958
3007
|
* Each environment does a warm-up first, and the result keeps it apart from the counted runs.
|
|
2959
3008
|
*/
|
|
2960
3009
|
export declare const runCell: (cell: Cell, say?: (line: string) => void) => Promise<CellResult>;
|
|
2961
|
-
export { type Agent, type BuildImage, type BuildRecord, CLIENT_CAPABILITIES, type CallReading, type Cell, type CellResult, type Client, type ClientCapability, type ClientImage, type ClockPair, type Cloud, type Cluster, type ClusterClientAt, type ClusterLab, type ClusterStage, type ConntrackPrediction, type ConntrackReading, type ContextFile, type CountBand, type Crossings, type Cut, type Decision, type DeliveryPrediction, type DeliveryReading, type DeliveryStream, type DiskImage, type DiskLab, type DiskLabOptions, type DiskPinnable, type DiskRecord, type DiskSubject, type DiskWriterRecord, type Drill, type DrillRoom, type DriverBand, type DriverSocket, type DriverStep, type DriverStepTime, type ErrorOnTheWay, type EstimateVerdict, type Fabric, type FabricLab, type FabricManifest, type FabricParts, type Fault, type FaultOptions, type FaultPlace, type FaultSide, type Group, type GroupClient, type GroupLab, type GroupMeasured, type GroupNetworkFault, type GroupPlace, type GroupPrediction, type GroupReading, type GroupRole, type GroupVerdict, type GroupView, type Hop, type HopEvent, type HopPlace, type HopSignal, type HopWrite, type Host, type HostSetting, type HostSysctl, type HttpProbe, type ImagePlan, type ImageSource, type Interval, type Jitter, type Kafka, type KafkaLab, type KafkaMember, type KafkaPause, type KernelRecord, type Lab, type Layer, type LeafViews, type LineCount, type LineMatch, type LoadBand, type LoadJudgement, type LoadPlan, type LoadPrediction, type LoadSpread, type LoadStream, type LoadVerdict, type Manifest, type ManifestHop, type Measured, type MemberLine, type MemoryLimits, type MemoryOomPrediction, type MemoryOomTask, type MemoryPrediction, type MemoryReading, type MemoryStep, type MemoryStepReading, type MemoryTaskReading, type MemoryThrottlePrediction, type MiddleboxEvent, type MiddleboxExpectation, type MiddleboxForm, type NetworkFault, type NodeLine, type Observer, type OplogRead, type OplogTime, type Outcome, type Outcomes, type Pair, type PairSets, type Pairing, type PartitionView, type PauseBand, type PauseCommit, type PausePrediction, type PauseReading, type Pinnable, type PinnedImage, type PortsPrediction, type PortsReading, type Prediction, type Probe, type ProbeEvent, type ProgramEvent, type ProxyHop, type ProxyTime, type QueueBand, type QueueConnection, type QueueConnectionReading, type QueueEnd, type QueuePrediction, type QueueReading, type ReconnectReading, type ReconnectVerdict, type Reconnects, type RecordCode, type Recovers, type RecoveryMeasured, type Reference, type Reordering, type ReplicaSet, type ReplicaSetLab, type ReplicaSetStage, type Replies, type RequestPrediction, type RequestReading, type RouteLine, type RouterHop, type RttRange, type Run, type RunBackup, type RunDrill, type RunEstimate, type RunFabric, type RunGroup, type RunLoad, type RunPart, type RunPause, type RunRoute, type RunStream, type RunTopology, type SentinelEvent, type SentinelStage, type Shipped, type ShippedImage, type Sibling, type SocketPlace, type Spread, type Stage, type StageBand, type StageVerdict, type StallReading, type Stamp, type Status, type StatusRow, type Subject, type Substrate, type SubstrateSource, type Target, type TimeFromFault, type Topology, type Toxic, type Verdict, type WallStamp, type Writes, type WsProbe, environmentProblems, isHopPlace, latestEndOf };
|
|
3010
|
+
export { type Agent, type BuildImage, type BuildRecord, CLIENT_CAPABILITIES, type CallReading, type Cell, type CellResult, type Client, type ClientCapability, type ClientImage, type ClockPair, type Cloud, type Cluster, type ClusterClientAt, type ClusterLab, type ClusterStage, type ConntrackPrediction, type ConntrackReading, type ContextFile, type CountBand, type Crossings, type Cut, type Decision, type DeliveryPrediction, type DeliveryReading, type DeliveryStream, type DiskImage, type DiskLab, type DiskLabOptions, type DiskPinnable, type DiskRecord, type DiskSubject, type DiskWriterRecord, type Drill, type DrillRoom, type DriverBand, type DriverSocket, type DriverStep, type DriverStepTime, type EgressBurst, type EgressPacketLaw, type EgressPacketReading, type EgressPrediction, type EgressReading, type ErrorOnTheWay, type EstimateVerdict, type Fabric, type FabricLab, type FabricManifest, type FabricParts, type Fault, type FaultOptions, type FaultPlace, type FaultSide, type Group, type GroupClient, type GroupLab, type GroupMeasured, type GroupNetworkFault, type GroupPlace, type GroupPrediction, type GroupReading, type GroupRole, type GroupVerdict, type GroupView, type Hop, type HopEvent, type HopPlace, type HopSignal, type HopWrite, type Host, type HostSetting, type HostSysctl, type HttpProbe, type ImagePlan, type ImageSource, type Interval, type Jitter, type Kafka, type KafkaLab, type KafkaMember, type KafkaPause, type KernelRecord, type Lab, type Layer, type LeafViews, type LineCount, type LineMatch, type LoadBand, type LoadJudgement, type LoadPlan, type LoadPrediction, type LoadSpread, type LoadStream, type LoadVerdict, type Manifest, type ManifestHop, type Measured, type MemberLine, type MemoryLimits, type MemoryOomPrediction, type MemoryOomTask, type MemoryPrediction, type MemoryReading, type MemoryStep, type MemoryStepReading, type MemoryTaskReading, type MemoryThrottlePrediction, type MiddleboxEvent, type MiddleboxExpectation, type MiddleboxForm, type NetworkFault, type NodeLine, type Observer, type OplogRead, type OplogTime, type Outcome, type Outcomes, type Pair, type PairSets, type Pairing, type PartitionView, type PauseBand, type PauseCommit, type PausePrediction, type PauseReading, type Pinnable, type PinnedImage, type PortsPrediction, type PortsReading, type Prediction, type Probe, type ProbeEvent, type ProgramEvent, type ProxyHop, type ProxyTime, type QueueBand, type QueueConnection, type QueueConnectionReading, type QueueEnd, type QueuePrediction, type QueueReading, type ReconnectReading, type ReconnectVerdict, type Reconnects, type RecordCode, type Recovers, type RecoveryMeasured, type Reference, type Reordering, type ReplicaSet, type ReplicaSetLab, type ReplicaSetStage, type Replies, type RequestPrediction, type RequestReading, type RouteLine, type RouterHop, type RttRange, type Run, type RunBackup, type RunDrill, type RunEstimate, type RunFabric, type RunGroup, type RunLoad, type RunPart, type RunPause, type RunRoute, type RunStream, type RunTopology, type SentinelEvent, type SentinelStage, type Shipped, type ShippedImage, type Sibling, type SocketPlace, type Spread, type Stage, type StageBand, type StageVerdict, type StallReading, type Stamp, type Status, type StatusRow, type Subject, type Substrate, type SubstrateSource, type Target, type TimeFromFault, type Topology, type Toxic, type Verdict, type WallStamp, type Writes, type WsProbe, environmentProblems, isHopPlace, latestEndOf };
|
package/build/index.js
CHANGED
|
@@ -396,7 +396,7 @@ const STEPS = [
|
|
|
396
396
|
22,
|
|
397
397
|
44
|
|
398
398
|
];
|
|
399
|
-
const s = (value) => quantity(Math.round(value * 1e6) / 1e6, "s");
|
|
399
|
+
const s$1 = (value) => quantity(Math.round(value * 1e6) / 1e6, "s");
|
|
400
400
|
const name = (run) => `env ${run.environment} run ${run.index}`;
|
|
401
401
|
/**
|
|
402
402
|
* This function gives the value at quantile p of sorted values, by nearest rank: x_(⌈p·n⌉). It is
|
|
@@ -409,10 +409,10 @@ const spreadOf = (times) => {
|
|
|
409
409
|
const sorted = times.map((time) => valueIn(time, "s")).sort((a, b) => a - b);
|
|
410
410
|
return {
|
|
411
411
|
count: sorted.length,
|
|
412
|
-
median: s(median(sorted)),
|
|
413
|
-
p99: s(quantileOf(sorted, .99)),
|
|
414
|
-
p999: s(quantileOf(sorted, .999)),
|
|
415
|
-
max: s(sorted.at(-1))
|
|
412
|
+
median: s$1(median(sorted)),
|
|
413
|
+
p99: s$1(quantileOf(sorted, .99)),
|
|
414
|
+
p999: s$1(quantileOf(sorted, .999)),
|
|
415
|
+
max: s$1(sorted.at(-1))
|
|
416
416
|
};
|
|
417
417
|
};
|
|
418
418
|
/** This function adds the reordering records of runs: the counts add, and each largest value is the largest of all. */
|
|
@@ -548,8 +548,8 @@ const groupVerdictOf = (prediction, counted, delta = NOISE) => {
|
|
|
548
548
|
const stamps = prediction.group?.stamps === void 0 ? 0 : valueIn(prediction.group.stamps, "s");
|
|
549
549
|
const stages = (prediction.group?.stages ?? []).map((band) => {
|
|
550
550
|
const interval = {
|
|
551
|
-
low: s(valueIn(band.low, "s") - noise),
|
|
552
|
-
high: s(valueIn(band.high, "s") + stamps + noise)
|
|
551
|
+
low: s$1(valueIn(band.low, "s") - noise),
|
|
552
|
+
high: s$1(valueIn(band.high, "s") + stamps + noise)
|
|
553
553
|
};
|
|
554
554
|
const outside = [];
|
|
555
555
|
const values = [];
|
|
@@ -574,7 +574,7 @@ const groupVerdictOf = (prediction, counted, delta = NOISE) => {
|
|
|
574
574
|
return {
|
|
575
575
|
stage: band.stage,
|
|
576
576
|
band: interval,
|
|
577
|
-
median: values.length === 0 ? null : s(median(values)),
|
|
577
|
+
median: values.length === 0 ? null : s$1(median(values)),
|
|
578
578
|
outside,
|
|
579
579
|
decision: outside.length === 0 && values.length > 0 ? "holds" : "fails"
|
|
580
580
|
};
|
|
@@ -586,7 +586,7 @@ const groupVerdictOf = (prediction, counted, delta = NOISE) => {
|
|
|
586
586
|
const at = run.group?.stages[stage];
|
|
587
587
|
return at === void 0 ? [] : [valueIn(at, "s")];
|
|
588
588
|
});
|
|
589
|
-
medians[stage] = s(median(values.sort((a, b) => a - b)));
|
|
589
|
+
medians[stage] = s$1(median(values.sort((a, b) => a - b)));
|
|
590
590
|
}
|
|
591
591
|
const lostCounts = counted.flatMap((run) => run.group?.writes.lost === null || run.group === void 0 ? [] : [run.group.writes.lost.length]);
|
|
592
592
|
const oldCounts = counted.flatMap((run) => run.group === void 0 ? [] : [run.group.writes.old]);
|
|
@@ -618,7 +618,7 @@ const groupVerdictOf = (prediction, counted, delta = NOISE) => {
|
|
|
618
618
|
errors: [...errors].map(([error, firsts]) => ({
|
|
619
619
|
name: error,
|
|
620
620
|
runs: firsts.length,
|
|
621
|
-
first: s(median(firsts.sort((a, b) => a - b)))
|
|
621
|
+
first: s$1(median(firsts.sort((a, b) => a - b)))
|
|
622
622
|
})),
|
|
623
623
|
...lags.length === 0 ? {} : { lags: spreadOf(lags) },
|
|
624
624
|
...prediction.group?.duplicates === void 0 ? {} : { duplicates: {
|
|
@@ -651,7 +651,7 @@ const verdictOfBand = (prediction, runs, delta = NOISE) => {
|
|
|
651
651
|
why: "no run counted"
|
|
652
652
|
};
|
|
653
653
|
if (prediction.detects === null) {
|
|
654
|
-
const law = prediction.queue !== void 0 ? "queue" : prediction.ports !== void 0 ? "port range" : prediction.pause !== void 0 ? "paused consumer" : prediction.conntrack !== void 0 ? "conntrack table" : prediction.memory !== void 0 ? "memory limit" : void 0;
|
|
654
|
+
const law = prediction.queue !== void 0 ? "queue" : prediction.ports !== void 0 ? "port range" : prediction.pause !== void 0 ? "paused consumer" : prediction.conntrack !== void 0 ? "conntrack table" : prediction.memory !== void 0 ? "memory limit" : prediction.egress !== void 0 ? "egress qdisc" : void 0;
|
|
655
655
|
if (law !== void 0) {
|
|
656
656
|
const off = new Set(outside.map((each) => each.run)).size;
|
|
657
657
|
return {
|
|
@@ -689,7 +689,7 @@ const verdictOfBand = (prediction, runs, delta = NOISE) => {
|
|
|
689
689
|
kinds.set(kind, (kinds.get(kind) ?? 0) + 1);
|
|
690
690
|
}
|
|
691
691
|
const outcomes = [...kinds].map(([kind, n]) => `${n} ${kind}`).join(", ");
|
|
692
|
-
const timed = times.length === 0 ? "no time" : `median ${s(median(times)).value} s from ${prediction.from}, range [${s(times[0]).value}, ${s(times.at(-1)).value}] s`;
|
|
692
|
+
const timed = times.length === 0 ? "no time" : `median ${s$1(median(times)).value} s from ${prediction.from}, range [${s$1(times[0]).value}, ${s$1(times.at(-1)).value}] s`;
|
|
693
693
|
const { counts } = prediction;
|
|
694
694
|
if (counts !== void 0) {
|
|
695
695
|
const exact = counts.map((each) => `${each.what} ${each.count}`).join(", ");
|
|
@@ -698,7 +698,7 @@ const verdictOfBand = (prediction, runs, delta = NOISE) => {
|
|
|
698
698
|
decision: outside.length === 0 ? "holds" : "fails",
|
|
699
699
|
band: null,
|
|
700
700
|
outside,
|
|
701
|
-
median: times.length === 0 ? null : s(median(times)),
|
|
701
|
+
median: times.length === 0 ? null : s$1(median(times)),
|
|
702
702
|
why: `${counted.length - outside.length} of ${counted.length} runs gave the exact counts (${exact}); ${outcomes}; ${timed}. ${prediction.why}`
|
|
703
703
|
};
|
|
704
704
|
}
|
|
@@ -712,7 +712,7 @@ const verdictOfBand = (prediction, runs, delta = NOISE) => {
|
|
|
712
712
|
decision: off === 0 ? "holds" : "fails",
|
|
713
713
|
band: null,
|
|
714
714
|
outside,
|
|
715
|
-
median: times.length === 0 ? null : s(median(times)),
|
|
715
|
+
median: times.length === 0 ? null : s$1(median(times)),
|
|
716
716
|
why: `${counted.length - off} of ${counted.length} runs inside the band of ${bands.join(" and the band of ")}; ${outcomes}; ${timed}. ${prediction.why}`
|
|
717
717
|
};
|
|
718
718
|
}
|
|
@@ -723,7 +723,7 @@ const verdictOfBand = (prediction, runs, delta = NOISE) => {
|
|
|
723
723
|
decision: "measured",
|
|
724
724
|
band: null,
|
|
725
725
|
outside: missed,
|
|
726
|
-
median: times.length === 0 ? null : s(median(times)),
|
|
726
|
+
median: times.length === 0 ? null : s$1(median(times)),
|
|
727
727
|
why: `${counted.length} runs measured: ${outcomes}; ${timed}.${late} ${prediction.why}`
|
|
728
728
|
};
|
|
729
729
|
}
|
|
@@ -748,8 +748,8 @@ const verdictOfBand = (prediction, runs, delta = NOISE) => {
|
|
|
748
748
|
decision: prediction.load === void 0 ? "measured" : judged.holds ? "holds" : "fails",
|
|
749
749
|
band: null,
|
|
750
750
|
outside: judged.outside,
|
|
751
|
-
median: middleOfLoad === void 0 ? null : s(valueIn(middleOfLoad, "s")),
|
|
752
|
-
...judged.load.latency === null ? {} : { slowest: s(valueIn(judged.load.latency.max, "s")) },
|
|
751
|
+
median: middleOfLoad === void 0 ? null : s$1(valueIn(middleOfLoad, "s")),
|
|
752
|
+
...judged.load.latency === null ? {} : { slowest: s$1(valueIn(judged.load.latency.max, "s")) },
|
|
753
753
|
load: judged.load,
|
|
754
754
|
why: read
|
|
755
755
|
};
|
|
@@ -769,14 +769,14 @@ const verdictOfBand = (prediction, runs, delta = NOISE) => {
|
|
|
769
769
|
].some((count) => (count ?? 0) > 0) ? ` Reordering: ${reorderingWords(reordering)}.` : "";
|
|
770
770
|
const estimate = estimateVerdict(counted.map((run) => run.estimate));
|
|
771
771
|
const estimated = estimate === void 0 ? "" : ` ${estimate.words}`;
|
|
772
|
-
const why = samples.length === 0 ? `${counted.length} runs measured, with no reply: ${prediction.why}` : `${counted.length} runs, ${samples.length} replies: median ${s(median(samples)).value} s, p99 ${s(quantileOf(samples, .99)).value} s, slowest ${s(samples.at(-1)).value} s, ${retransmissions} retransmissions, ${ended.length} connections ended.${reordered}${estimated} ${prediction.why}`;
|
|
772
|
+
const why = samples.length === 0 ? `${counted.length} runs measured, with no reply: ${prediction.why}` : `${counted.length} runs, ${samples.length} replies: median ${s$1(median(samples)).value} s, p99 ${s$1(quantileOf(samples, .99)).value} s, slowest ${s$1(samples.at(-1)).value} s, ${retransmissions} retransmissions, ${ended.length} connections ended.${reordered}${estimated} ${prediction.why}`;
|
|
773
773
|
return {
|
|
774
774
|
...empty,
|
|
775
775
|
decision: "measured",
|
|
776
776
|
band: null,
|
|
777
777
|
outside: [],
|
|
778
|
-
median: samples.length === 0 ? null : s(median(samples)),
|
|
779
|
-
...samples.length === 0 ? {} : { slowest: s(samples.at(-1)) },
|
|
778
|
+
median: samples.length === 0 ? null : s$1(median(samples)),
|
|
779
|
+
...samples.length === 0 ? {} : { slowest: s$1(samples.at(-1)) },
|
|
780
780
|
...reordering === void 0 ? {} : { reordering },
|
|
781
781
|
...estimate === void 0 ? {} : { estimate },
|
|
782
782
|
why
|
|
@@ -798,8 +798,8 @@ const verdictOfBand = (prediction, runs, delta = NOISE) => {
|
|
|
798
798
|
const low = valueIn(timed.low, "s");
|
|
799
799
|
const high = valueIn(timed.high, "s");
|
|
800
800
|
const band = {
|
|
801
|
-
low: s(low - noise),
|
|
802
|
-
high: s(high + noise)
|
|
801
|
+
low: s$1(low - noise),
|
|
802
|
+
high: s$1(high + noise)
|
|
803
803
|
};
|
|
804
804
|
const values = [];
|
|
805
805
|
for (const run of counted) {
|
|
@@ -820,10 +820,10 @@ const verdictOfBand = (prediction, runs, delta = NOISE) => {
|
|
|
820
820
|
why: "no run measured its time"
|
|
821
821
|
};
|
|
822
822
|
const [from, to] = medianInterval(values);
|
|
823
|
-
const median$1 = s(median(values));
|
|
823
|
+
const median$1 = s$1(median(values));
|
|
824
824
|
const interval = {
|
|
825
|
-
low: s(from),
|
|
826
|
-
high: s(to)
|
|
825
|
+
low: s$1(from),
|
|
826
|
+
high: s$1(to)
|
|
827
827
|
};
|
|
828
828
|
const wide = {
|
|
829
829
|
low: low * .95,
|
|
@@ -1154,11 +1154,11 @@ const fieldOf = (line, path) => path.split(".").reduce((value, key) => value !==
|
|
|
1154
1154
|
/** This function tells if a line of the client matches a line match: its `ev`, and each field that the match names. */
|
|
1155
1155
|
const matches = (line, match) => line.ev === match.ev && Object.entries(match.where ?? {}).every(([path, value]) => fieldOf(line, path) === value);
|
|
1156
1156
|
/** This function gives the count of the lines that match. */
|
|
1157
|
-
const countOf = (lines, match) => lines.filter((line) => matches(line, match)).length;
|
|
1157
|
+
const countOf$1 = (lines, match) => lines.filter((line) => matches(line, match)).length;
|
|
1158
1158
|
/** This function gives the finding of the line counts of a run, or null when each count is the exact one. */
|
|
1159
1159
|
const countFinding = (counts, lines) => {
|
|
1160
1160
|
const off = counts.flatMap((each) => {
|
|
1161
|
-
const seen = countOf(lines, each.match);
|
|
1161
|
+
const seen = countOf$1(lines, each.match);
|
|
1162
1162
|
return seen === each.count ? [] : [`${each.what}: ${seen} lines, and the law gives ${each.count}`];
|
|
1163
1163
|
});
|
|
1164
1164
|
return off.length === 0 ? null : off.join("; ");
|
|
@@ -1748,20 +1748,20 @@ const measureQueue = (run, expected) => {
|
|
|
1748
1748
|
// src/conntrack.ts
|
|
1749
1749
|
/** This errno tells that a connect got a slot. */
|
|
1750
1750
|
const NONE = "none";
|
|
1751
|
-
const numberOr$
|
|
1751
|
+
const numberOr$2 = (line, field) => {
|
|
1752
1752
|
const value = line?.[field];
|
|
1753
1753
|
return typeof value === "number" ? value : null;
|
|
1754
1754
|
};
|
|
1755
1755
|
/** This function gives the time from one stamp to a stamp of a field of a line, when the line has it. */
|
|
1756
1756
|
const untilField = (from, line, field) => {
|
|
1757
|
-
const stamp = numberOr$
|
|
1757
|
+
const stamp = numberOr$2(line, field);
|
|
1758
1758
|
return from === void 0 || stamp === null ? null : between$2(from.t, stamp);
|
|
1759
1759
|
};
|
|
1760
1760
|
const stallOf = (line) => line === void 0 ? null : {
|
|
1761
1761
|
errno: String(line["errno"]),
|
|
1762
|
-
time: quantity(Math.round((numberOr$
|
|
1763
|
-
drops: numberOr$
|
|
1764
|
-
retransFail: numberOr$
|
|
1762
|
+
time: quantity(Math.round((numberOr$2(line, "elapsed") ?? 0) / 1e3) / 1e6, "s"),
|
|
1763
|
+
drops: numberOr$2(line, "drops") ?? 0,
|
|
1764
|
+
retransFail: numberOr$2(line, "retrans_fail") ?? 0
|
|
1765
1765
|
};
|
|
1766
1766
|
/** This function tells where a reading differs from the law of its cell. */
|
|
1767
1767
|
const findingsOf$1 = (read, failed, expected) => {
|
|
@@ -1842,15 +1842,15 @@ const measureConntrack = (run, expected) => {
|
|
|
1842
1842
|
const closed = events.find((event) => event.ev === "closed");
|
|
1843
1843
|
const neighbor = (run.server ?? []).filter((line) => line.ev === "count" && line.t >= full.t && (stall === void 0 || line.t <= stall.t)).at(-1);
|
|
1844
1844
|
const conntrack = {
|
|
1845
|
-
flows: numberOr$
|
|
1846
|
-
count: numberOr$
|
|
1847
|
-
neighbor: numberOr$
|
|
1845
|
+
flows: numberOr$2(full, "flows") ?? 0,
|
|
1846
|
+
count: numberOr$2(full, "count") ?? 0,
|
|
1847
|
+
neighbor: numberOr$2(neighbor, "count"),
|
|
1848
1848
|
stall: stallOf(stall),
|
|
1849
1849
|
firstFall: untilField(closing, drained, "first_fall"),
|
|
1850
1850
|
zero: untilField(closing, drained, "zero"),
|
|
1851
|
-
closed: numberOr$
|
|
1852
|
-
lowest: numberOr$
|
|
1853
|
-
after: numberOr$
|
|
1851
|
+
closed: numberOr$2(closed, "count"),
|
|
1852
|
+
lowest: numberOr$2(drained ?? stall, "lowest"),
|
|
1853
|
+
after: numberOr$2(stall, "after")
|
|
1854
1854
|
};
|
|
1855
1855
|
const found = findingsOf$1(conntrack, full["errno"], expected);
|
|
1856
1856
|
return {
|
|
@@ -1861,7 +1861,7 @@ const measureConntrack = (run, expected) => {
|
|
|
1861
1861
|
};
|
|
1862
1862
|
};
|
|
1863
1863
|
// src/memory.ts
|
|
1864
|
-
const numberOr = (line, field) => {
|
|
1864
|
+
const numberOr$1 = (line, field) => {
|
|
1865
1865
|
const value = line?.[field];
|
|
1866
1866
|
return typeof value === "number" ? value : null;
|
|
1867
1867
|
};
|
|
@@ -1917,7 +1917,7 @@ const stepBand = (expected, usage) => {
|
|
|
1917
1917
|
}
|
|
1918
1918
|
};
|
|
1919
1919
|
};
|
|
1920
|
-
const seconds = (time) => valueIn(time, "s");
|
|
1920
|
+
const seconds$1 = (time) => valueIn(time, "s");
|
|
1921
1921
|
/** This function reads each step of a growth: its usage, its time, and the rise of its events `high`. */
|
|
1922
1922
|
const stepsOf = (events, start, startHigh, batch, drift) => {
|
|
1923
1923
|
let usage = start;
|
|
@@ -1925,12 +1925,12 @@ const stepsOf = (events, start, startHigh, batch, drift) => {
|
|
|
1925
1925
|
const out = [];
|
|
1926
1926
|
for (const line of events) {
|
|
1927
1927
|
if (line.ev !== "step") continue;
|
|
1928
|
-
const now = numberOr(line, "current") ?? usage;
|
|
1929
|
-
const events = numberOr(line, "high") ?? high;
|
|
1928
|
+
const now = numberOr$1(line, "current") ?? usage;
|
|
1929
|
+
const events = numberOr$1(line, "high") ?? high;
|
|
1930
1930
|
const rise = now - usage;
|
|
1931
1931
|
out.push({
|
|
1932
1932
|
usage: now,
|
|
1933
|
-
time: quantity(Math.round((numberOr(line, "ns") ?? 0) / 1e3) / 1e6, "s"),
|
|
1933
|
+
time: quantity(Math.round((numberOr$1(line, "ns") ?? 0) / 1e3) / 1e6, "s"),
|
|
1934
1934
|
high: events - high,
|
|
1935
1935
|
read: Math.abs(rise - batch) <= drift
|
|
1936
1936
|
});
|
|
@@ -1940,7 +1940,7 @@ const stepsOf = (events, start, startHigh, batch, drift) => {
|
|
|
1940
1940
|
return out;
|
|
1941
1941
|
};
|
|
1942
1942
|
/** These are the first findings of a run that the words of its finding name, one for each step. */
|
|
1943
|
-
const NAMED = 5;
|
|
1943
|
+
const NAMED$1 = 5;
|
|
1944
1944
|
const throttleFindings = (read, expected) => {
|
|
1945
1945
|
const found = [];
|
|
1946
1946
|
const off = [];
|
|
@@ -1948,12 +1948,12 @@ const throttleFindings = (read, expected) => {
|
|
|
1948
1948
|
for (const step of read.steps) {
|
|
1949
1949
|
if (!step.read) continue;
|
|
1950
1950
|
const { band, high } = stepBand(expected, step.usage);
|
|
1951
|
-
if (!inside(step.time, band)) off.push(`the step to ${step.usage} pages took ${seconds(step.time)} s, outside ${bandWords(band)}`);
|
|
1951
|
+
if (!inside(step.time, band)) off.push(`the step to ${step.usage} pages took ${seconds$1(step.time)} s, outside ${bandWords(band)}`);
|
|
1952
1952
|
if (step.high < high.low || step.high > high.high) off.push(`the step to ${step.usage} pages added ${step.high} events high, not ${high.low === high.high ? high.low : `${high.low} to ${high.high}`}`);
|
|
1953
|
-
least += seconds(band.low);
|
|
1953
|
+
least += seconds$1(band.low);
|
|
1954
1954
|
}
|
|
1955
|
-
if (off.length > 0) found.push(`${off.length} terms of the steps are outside the law: ${off.slice(0, NAMED).join("; ")}`);
|
|
1956
|
-
if (read.stall !== null && seconds(read.stall) < least) found.push(`memory.pressure counts a stall of ${seconds(read.stall)} s, less than the ${Math.round(least * 1e6) / 1e6} s of the sleeps`);
|
|
1955
|
+
if (off.length > 0) found.push(`${off.length} terms of the steps are outside the law: ${off.slice(0, NAMED$1).join("; ")}`);
|
|
1956
|
+
if (read.stall !== null && seconds$1(read.stall) < least) found.push(`memory.pressure counts a stall of ${seconds$1(read.stall)} s, less than the ${Math.round(least * 1e6) / 1e6} s of the sleeps`);
|
|
1957
1957
|
return found;
|
|
1958
1958
|
};
|
|
1959
1959
|
const oomFindings = (read, expected) => {
|
|
@@ -2005,11 +2005,11 @@ const measureMemory = (run, expected) => {
|
|
|
2005
2005
|
}
|
|
2006
2006
|
const differs = limitsDiffer(ready, expected.limits);
|
|
2007
2007
|
if (differs !== null) return voided(differs);
|
|
2008
|
-
const start = numberOr(ready, "current") ?? 0;
|
|
2008
|
+
const start = numberOr$1(ready, "current") ?? 0;
|
|
2009
2009
|
const atReady = countsOf(ready["events"]);
|
|
2010
2010
|
const last = events.filter((event) => event.ev === "events").at(-1);
|
|
2011
2011
|
const pressure = events.find((event) => event.ev === "pressure");
|
|
2012
|
-
const some = numberOr(pressure, "some");
|
|
2012
|
+
const some = numberOr$1(pressure, "some");
|
|
2013
2013
|
const throttle = expected.kind === "throttle";
|
|
2014
2014
|
const memory = {
|
|
2015
2015
|
limits: {
|
|
@@ -2022,7 +2022,7 @@ const measureMemory = (run, expected) => {
|
|
|
2022
2022
|
tasks: events.filter((event) => event.ev === "task").map((event) => ({
|
|
2023
2023
|
name: String(event["name"]),
|
|
2024
2024
|
outcome: String(event["outcome"]),
|
|
2025
|
-
signal: numberOr(event, "signal")
|
|
2025
|
+
signal: numberOr$1(event, "signal")
|
|
2026
2026
|
})),
|
|
2027
2027
|
events: Object.fromEntries(Object.entries(countsOf(last)).filter(([name]) => name !== "t")),
|
|
2028
2028
|
stall: some === null ? null : quantity(some / 1e6, "s")
|
|
@@ -2049,6 +2049,140 @@ const measureMemory = (run, expected) => {
|
|
|
2049
2049
|
memory
|
|
2050
2050
|
};
|
|
2051
2051
|
};
|
|
2052
|
+
// src/egress.ts
|
|
2053
|
+
/**
|
|
2054
|
+
* This time is the largest step of CLOCK_REALTIME in a run that the judge accepts. The kernel stamps
|
|
2055
|
+
* each datagram on CLOCK_REALTIME, and the client moves the stamps to CLOCK_MONOTONIC with one
|
|
2056
|
+
* offset. A step of the clock moves each later stamp by the step. A step of 100 µs is less than one
|
|
2057
|
+
* tenth of the smallest band of the catalog.
|
|
2058
|
+
*/
|
|
2059
|
+
const MOST_STEP_NS = 1e5;
|
|
2060
|
+
/** These are the first findings of a run that the words of its finding name. */
|
|
2061
|
+
const NAMED = 5;
|
|
2062
|
+
const numberOr = (line, field) => {
|
|
2063
|
+
const value = line?.[field];
|
|
2064
|
+
return typeof value === "number" ? value : null;
|
|
2065
|
+
};
|
|
2066
|
+
/** This function gives one field of an object of a line, or undefined. */
|
|
2067
|
+
const fieldOf$1 = (value, field) => typeof value === "object" && value !== null ? value[field] : void 0;
|
|
2068
|
+
const countOf = (value, field) => {
|
|
2069
|
+
const count = fieldOf$1(value, field);
|
|
2070
|
+
return typeof count === "number" ? count : null;
|
|
2071
|
+
};
|
|
2072
|
+
const seconds = (ns) => quantity(Math.round(ns) / 1e9, "s");
|
|
2073
|
+
const s = (time) => valueIn(time, "s");
|
|
2074
|
+
/** This function gives the words of the law of one datagram. */
|
|
2075
|
+
const lawWords = (law) => law.kind === "sent" ? `leaves in ${bandWords(law.left)}` : `is dropped at the ${law.why}`;
|
|
2076
|
+
/** This function gives the findings of the datagrams that differ from their laws. */
|
|
2077
|
+
const packetFindings = (read, expected) => {
|
|
2078
|
+
const off = [];
|
|
2079
|
+
for (const packet of read.packets) {
|
|
2080
|
+
const law = expected.packets[packet.key];
|
|
2081
|
+
if (law === void 0 || packet.outcome === "unread") continue;
|
|
2082
|
+
if (law.kind === "dropped" && packet.outcome === "sent") off.push(`the datagram ${packet.key} left at ${s(packet.left)} s, and the law drops it at the ${law.why}`);
|
|
2083
|
+
else if (law.kind === "sent" && packet.outcome === "dropped") off.push(`the qdisc dropped the datagram ${packet.key}, and the law ${lawWords(law)}`);
|
|
2084
|
+
else if (law.kind === "sent" && packet.left !== null && !inside(packet.left, law.left)) off.push(`the datagram ${packet.key} left at ${s(packet.left)} s, outside ${bandWords(law.left)}`);
|
|
2085
|
+
}
|
|
2086
|
+
return off.length === 0 ? [] : [`${off.length} of the ${read.packets.length} datagrams are outside the law: ${off.slice(0, NAMED).join("; ")}`];
|
|
2087
|
+
};
|
|
2088
|
+
/**
|
|
2089
|
+
* This function reads one run of an egress cell from the lines of the egress client. A run is void
|
|
2090
|
+
* when the client wrote an error or no `done` line, or when the qdisc is of another kind. A neighbour
|
|
2091
|
+
* of the target that is not permanent voids a run too. It is void too when the client sent another count of
|
|
2092
|
+
* datagrams than the law. A send that failed with an error other than ENOBUFS voids its run, and a
|
|
2093
|
+
* datagram with no stamp of its arrival voids it too. The arrivals void a run when one burst spreads more than `spread`, or
|
|
2094
|
+
* when a later burst starts more than `jitter` off its time. The counts of the qdisc void a run when
|
|
2095
|
+
* other traffic went through it. A step of the clock and a read of less than `read` of the
|
|
2096
|
+
* departures void a run too.
|
|
2097
|
+
*/
|
|
2098
|
+
const measureEgress = (run, expected) => {
|
|
2099
|
+
const { events, kernel } = run;
|
|
2100
|
+
const base = {
|
|
2101
|
+
environment: run.environment,
|
|
2102
|
+
index: run.index,
|
|
2103
|
+
outcome: { kind: "answered" },
|
|
2104
|
+
elapsed: null,
|
|
2105
|
+
socket: null,
|
|
2106
|
+
noticed: null,
|
|
2107
|
+
steps: [],
|
|
2108
|
+
probes: 0,
|
|
2109
|
+
retransmissions: kernel.filter((record) => record.netns === run.netns && record.ev === "retrans").length,
|
|
2110
|
+
acks: 0
|
|
2111
|
+
};
|
|
2112
|
+
const voided = (why) => ({
|
|
2113
|
+
...base,
|
|
2114
|
+
void: why,
|
|
2115
|
+
finding: null
|
|
2116
|
+
});
|
|
2117
|
+
const error = events.find((event) => event.ev === "error");
|
|
2118
|
+
if (error !== void 0) return voided(`the client stopped: ${String(error["what"])}`);
|
|
2119
|
+
const ready = events.find((event) => event.ev === "ready");
|
|
2120
|
+
if (ready === void 0) return voided("the client wrote no ready line");
|
|
2121
|
+
if (events.find((event) => event.ev === "done") === void 0) return voided("the client did not reach its end");
|
|
2122
|
+
const kind = String(fieldOf$1(ready["qdisc"], "kind") ?? "none");
|
|
2123
|
+
if (kind !== expected.kind) return voided(`tc reads a root qdisc of the kind ${kind}, not ${expected.kind}`);
|
|
2124
|
+
const states = fieldOf$1(ready["neighbour"], "state");
|
|
2125
|
+
if (!Array.isArray(states) || !states.includes("PERMANENT")) return voided(`the neighbour of the target is ${JSON.stringify(states ?? null)}, not PERMANENT: an ARP packet can go through the qdisc`);
|
|
2126
|
+
const lines = events.filter((event) => event.ev === "packet");
|
|
2127
|
+
if (lines.length !== expected.packets.length) return voided(`the client sent ${lines.length} datagrams, and the law has ${expected.packets.length}`);
|
|
2128
|
+
const failed = lines.find((line) => line["errno"] !== null && line["errno"] !== "ENOBUFS");
|
|
2129
|
+
if (failed !== void 0) return voided(`the send of the datagram ${String(failed["key"])} failed with ${String(failed["errno"])}`);
|
|
2130
|
+
const unstamped = lines.find((line) => numberOr(line, "sched") === null);
|
|
2131
|
+
if (unstamped !== void 0) return voided(`the datagram ${String(unstamped["key"])} has no stamp of its arrival in the qdisc`);
|
|
2132
|
+
const firsts = expected.bursts.map((_, burst) => Math.min(...lines.filter((line) => line["burst"] === burst).map((line) => numberOr(line, "sched"))));
|
|
2133
|
+
const lasts = expected.bursts.map((_, burst) => Math.max(...lines.filter((line) => line["burst"] === burst).map((line) => numberOr(line, "sched"))));
|
|
2134
|
+
const origin = firsts[0];
|
|
2135
|
+
const packets = lines.map((line) => {
|
|
2136
|
+
const burst = numberOr(line, "burst") ?? 0;
|
|
2137
|
+
const first = firsts[burst] ?? origin;
|
|
2138
|
+
const left = numberOr(line, "left");
|
|
2139
|
+
const outcome = line["errno"] === "ENOBUFS" ? "dropped" : left === null ? "unread" : "sent";
|
|
2140
|
+
return {
|
|
2141
|
+
key: numberOr(line, "key") ?? -1,
|
|
2142
|
+
burst,
|
|
2143
|
+
outcome,
|
|
2144
|
+
arrived: seconds(numberOr(line, "sched") - first),
|
|
2145
|
+
left: outcome === "sent" ? seconds(left - first) : null
|
|
2146
|
+
};
|
|
2147
|
+
});
|
|
2148
|
+
const stats = events.find((event) => event.ev === "stats");
|
|
2149
|
+
const rise = (field) => (countOf(stats?.["after"], field) ?? 0) - (countOf(stats?.["before"], field) ?? 0);
|
|
2150
|
+
const egress = {
|
|
2151
|
+
kind,
|
|
2152
|
+
packets,
|
|
2153
|
+
spreads: firsts.map((first, burst) => seconds(lasts[burst] - first)),
|
|
2154
|
+
starts: firsts.map((first) => seconds(first - origin)),
|
|
2155
|
+
counts: {
|
|
2156
|
+
packets: rise("packets"),
|
|
2157
|
+
drops: rise("drops")
|
|
2158
|
+
},
|
|
2159
|
+
step: seconds(numberOr(events.find((event) => event.ev === "clock"), "step") ?? 0)
|
|
2160
|
+
};
|
|
2161
|
+
const voidedWith = (why) => ({
|
|
2162
|
+
...voided(why),
|
|
2163
|
+
egress
|
|
2164
|
+
});
|
|
2165
|
+
if (stats === void 0) return voidedWith("the client wrote no counts of the qdisc");
|
|
2166
|
+
const stepNs = Math.abs(s(egress.step) * 1e9);
|
|
2167
|
+
if (stepNs > MOST_STEP_NS) return voidedWith(`CLOCK_REALTIME stepped ${Math.round(stepNs / 1e3)} µs in the run, more than ${MOST_STEP_NS / 1e3} µs`);
|
|
2168
|
+
const wide = egress.spreads.findIndex((spread) => s(spread) > s(expected.spread));
|
|
2169
|
+
if (wide >= 0) return voidedWith(`the arrivals of the burst ${wide} spread ${s(egress.spreads[wide])} s, more than ${s(expected.spread)} s`);
|
|
2170
|
+
const at0 = s(expected.bursts[0].at);
|
|
2171
|
+
const late = expected.bursts.findIndex((burst, index) => Math.abs(s(egress.starts[index]) - (s(burst.at) - at0)) > s(expected.jitter));
|
|
2172
|
+
if (late >= 0) return voidedWith(`the burst ${late} started ${s(egress.starts[late])} s after the first, more than ${s(expected.jitter)} s off ${s(expected.bursts[late].at) - at0} s`);
|
|
2173
|
+
const dropped = packets.filter((packet) => packet.outcome === "dropped").length;
|
|
2174
|
+
const taken = packets.length - dropped;
|
|
2175
|
+
if (egress.counts.packets !== taken || egress.counts.drops !== dropped) return voidedWith(`the qdisc counts ${egress.counts.packets} packets and ${egress.counts.drops} drops, and the client counts ${taken} sends and ${dropped} drops: other traffic went through the qdisc`);
|
|
2176
|
+
const sent = packets.filter((packet) => packet.outcome === "sent").length;
|
|
2177
|
+
if (taken > 0 && sent < expected.read * taken) return voidedWith(`the judge read the departure of ${sent} of the ${taken} datagrams that the qdisc took, less than ${expected.read * 100}%`);
|
|
2178
|
+
const found = packetFindings(egress, expected);
|
|
2179
|
+
return {
|
|
2180
|
+
...base,
|
|
2181
|
+
void: null,
|
|
2182
|
+
finding: found.length === 0 ? null : found.join(". "),
|
|
2183
|
+
egress
|
|
2184
|
+
};
|
|
2185
|
+
};
|
|
2052
2186
|
// src/pause.ts
|
|
2053
2187
|
/** This expression finds the stamp of a log line of a broker, as its console writes it, on UTC. */
|
|
2054
2188
|
const LOG_TIME = /\[(\d{4})-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d),(\d{3})\]/;
|
|
@@ -3276,6 +3410,7 @@ const measureSocket = (cell, run) => {
|
|
|
3276
3410
|
if (cell.prediction.detects === null && cell.prediction.ports !== void 0) return measurePorts(run, cell.prediction.ports);
|
|
3277
3411
|
if (cell.prediction.detects === null && cell.prediction.conntrack !== void 0) return measureConntrack(run, cell.prediction.conntrack);
|
|
3278
3412
|
if (cell.prediction.detects === null && cell.prediction.memory !== void 0) return measureMemory(run, cell.prediction.memory);
|
|
3413
|
+
if (cell.prediction.detects === null && cell.prediction.egress !== void 0) return measureEgress(run, cell.prediction.egress);
|
|
3279
3414
|
if (cell.prediction.detects !== null && cell.prediction.driver !== void 0) return measureDriver(cell, run);
|
|
3280
3415
|
const { events, kernel } = run;
|
|
3281
3416
|
const ready = events.find((event) => event.ev === "ready");
|
|
@@ -9141,7 +9276,7 @@ const LINES_MS = 5e3;
|
|
|
9141
9276
|
*/
|
|
9142
9277
|
const linesCounted = async (lab, from, counts) => {
|
|
9143
9278
|
const started = Date.now();
|
|
9144
|
-
const short = () => counts.some((each) => countOf(lab.server.slice(from), each.match) < each.count);
|
|
9279
|
+
const short = () => counts.some((each) => countOf$1(lab.server.slice(from), each.match) < each.count);
|
|
9145
9280
|
while (short() && Date.now() - started < LINES_MS) await setTimeout$1(20);
|
|
9146
9281
|
await setTimeout$1(250);
|
|
9147
9282
|
};
|
|
@@ -9740,6 +9875,6 @@ const runCell = async (cell, say = () => {}) => {
|
|
|
9740
9875
|
target = larger;
|
|
9741
9876
|
}
|
|
9742
9877
|
};
|
|
9743
|
-
export { AWS_FROM, CLIENT_CAPABILITIES, CLIENT_NAMES, CLOSED_TOLERANCE, CLOUDS, CLUSTER_STAGES, CONVERGE_MS, DAEMONS, DEBUG, DIRTY, DISK_MOUNT, DISK_RECORD_FORMAT, DISK_ROOT, DISK_SUBJECT, DROP_HANDLING, FABRIC_CLIENT, FABRIC_DEVICE, FABRIC_TARGET, FRR_IMAGE, GIVES_AWAY, HASH_SCRIPT, INJECT, INSERT, KAFKA_TAIL_MS, KEPT, LAYERS, LINGER_MS, LISTING, LOAD_FORMAT, LOAD_PATH, LOCK_NAMES, LOSS_MARGIN, MEMBER_MARKS, MONITOR_DOWN, NODE_MARKS, NOISE, PINNED, PUMP, PUMP_SLACK, QUIET_MS, RELATIVE, REPLICA_SET_STAGES, REPOSITORY, RESTART, ROUTERS, SCHEDULE_PATH, SEED_DOCUMENT, SHIPPED_CLIENTS, SHIPPED_NAMES, STAGES, STANDBY_READY, STATUS_SCRIPT, STEPS, STEP_DOWN, amqpClientImage, basesOf, bootstrapOf, brokerEnv, buildOf, buildRecordOf, callOf, cancelsOf, cargoVersions, clockOffsetOf, closeOrExit, cloudOf, clusterArgs, clusterConf, clusterCutOf, clusterHostsOf, clusterOnce, clusterStagesOf, clusterViewOf, commitProblems, commitVoid, comparable, controllerEnv, crossingsOf, cutOf, deadlineOf, delayVoids, deliveryFinding, deliveryOf, deviceOf, diskRecordProblems, diskSubjectProblems, drillOnce, drillSpan, dropFinding, dropOf, endpointAfter, envOf, environmentCounts, environmentProblems, errorsOf, estimateOf, estimateVerdict, exitOf, fieldOf, fieldsOf, firstUnanswered, folderDigest, frrConf, goHttpImage, goVersions, groupOnce, groupVerdictOf, grpcClientImage, harnessImage, harnessRecord, harnessVersion, hashOf, highestHeld, hikariClientImage, hzOf, imageOf, imagePinProblems, imageProblems, inContext, infoOf, initiateScript, isFenceLine, isHopPlace, jarVersions, jitterOf, jitterOfLines, judge, kafkaArgs, kafkaClientImage, kafkaCutOf, kafkaOnce, kafkaPauseOnce, kafkaViewOf, lagsOf, laterMove, latestEndOf, leafLacks, leftAfter, loadOf, loadPlanOf, loadVerdict, locksOf, logNameOf, logTimeOf, manifestProblems, matches, measure, measureConntrack, measureDriver, measureGroup, measureMemory, measurePause, measurePorts, measureQueue, medianInterval, memAvailableOf, memberCommand, memberConfig, memberLineOf, mongoClientImage, monotonicAt, monotonicOf, namesGroup, nodeClientImage, nodeCommand, nodeHttpImage, nodeIdOf, nodeLineOf, nodeNameOf, nodesOnMonotonic, noiseOf, npmVersions, numbersOf, onMonotonic, openClusterLab, openDiskLab, openFabric, openGroupLab, openKafkaLab, openLab, openReplicaSetLab, openStandby, pairArgs, pairOnce, pairingOf, pairingsOf, pauseReady, peersOf, pgClientImage, pingsOf, plainOf, planOf, pongsOf, poolOf, programLines, programOf, quantileOf, readCpu, readHost, readOplog, reconnectFinding, reconnectOf, recordProblems, recoveryFindings, recoveryOf, referenceOf, reorderingOf, replicaSetArgs, replicaSetOnce, replicaSetStagesOf, requestOf, requestWords, restamped, roomNeeded, roomVoidOf, routeLine, routerImage, routesOf, runCell, runDiskFault, seedScript, sentinelConfig, sessionsOf, shippedClientRecord, shippedSource, sliceQuery, socketAt, socketOf, socketsOf, spread, spreadOf, stagesOf, standaloneCommand, standbyCommand, statusViewOf, stealShare, stepBand, stopScript, streamEnded, streamOf, streamsLoadOf, subjectClient, subjectProblems, subscriptionsOf, substrateHere, substrateKey, substrateOf, substrateOn, targetImageOf, targetSourceOf, templated, toolJsonOf, topicOf, topologyOf, toxicBody, unlockedManifests, unpinnedBases, unpoolable, verdictOf, versionsOf, viewOf, writesOf };
|
|
9878
|
+
export { AWS_FROM, CLIENT_CAPABILITIES, CLIENT_NAMES, CLOSED_TOLERANCE, CLOUDS, CLUSTER_STAGES, CONVERGE_MS, DAEMONS, DEBUG, DIRTY, DISK_MOUNT, DISK_RECORD_FORMAT, DISK_ROOT, DISK_SUBJECT, DROP_HANDLING, FABRIC_CLIENT, FABRIC_DEVICE, FABRIC_TARGET, FRR_IMAGE, GIVES_AWAY, HASH_SCRIPT, INJECT, INSERT, KAFKA_TAIL_MS, KEPT, LAYERS, LINGER_MS, LISTING, LOAD_FORMAT, LOAD_PATH, LOCK_NAMES, LOSS_MARGIN, MEMBER_MARKS, MONITOR_DOWN, NODE_MARKS, NOISE, PINNED, PUMP, PUMP_SLACK, QUIET_MS, RELATIVE, REPLICA_SET_STAGES, REPOSITORY, RESTART, ROUTERS, SCHEDULE_PATH, SEED_DOCUMENT, SHIPPED_CLIENTS, SHIPPED_NAMES, STAGES, STANDBY_READY, STATUS_SCRIPT, STEPS, STEP_DOWN, amqpClientImage, basesOf, bootstrapOf, brokerEnv, buildOf, buildRecordOf, callOf, cancelsOf, cargoVersions, clockOffsetOf, closeOrExit, cloudOf, clusterArgs, clusterConf, clusterCutOf, clusterHostsOf, clusterOnce, clusterStagesOf, clusterViewOf, commitProblems, commitVoid, comparable, controllerEnv, crossingsOf, cutOf, deadlineOf, delayVoids, deliveryFinding, deliveryOf, deviceOf, diskRecordProblems, diskSubjectProblems, drillOnce, drillSpan, dropFinding, dropOf, endpointAfter, envOf, environmentCounts, environmentProblems, errorsOf, estimateOf, estimateVerdict, exitOf, fieldOf, fieldsOf, firstUnanswered, folderDigest, frrConf, goHttpImage, goVersions, groupOnce, groupVerdictOf, grpcClientImage, harnessImage, harnessRecord, harnessVersion, hashOf, highestHeld, hikariClientImage, hzOf, imageOf, imagePinProblems, imageProblems, inContext, infoOf, initiateScript, isFenceLine, isHopPlace, jarVersions, jitterOf, jitterOfLines, judge, kafkaArgs, kafkaClientImage, kafkaCutOf, kafkaOnce, kafkaPauseOnce, kafkaViewOf, lagsOf, laterMove, latestEndOf, leafLacks, leftAfter, loadOf, loadPlanOf, loadVerdict, locksOf, logNameOf, logTimeOf, manifestProblems, matches, measure, measureConntrack, measureDriver, measureEgress, measureGroup, measureMemory, measurePause, measurePorts, measureQueue, medianInterval, memAvailableOf, memberCommand, memberConfig, memberLineOf, mongoClientImage, monotonicAt, monotonicOf, namesGroup, nodeClientImage, nodeCommand, nodeHttpImage, nodeIdOf, nodeLineOf, nodeNameOf, nodesOnMonotonic, noiseOf, npmVersions, numbersOf, onMonotonic, openClusterLab, openDiskLab, openFabric, openGroupLab, openKafkaLab, openLab, openReplicaSetLab, openStandby, pairArgs, pairOnce, pairingOf, pairingsOf, pauseReady, peersOf, pgClientImage, pingsOf, plainOf, planOf, pongsOf, poolOf, programLines, programOf, quantileOf, readCpu, readHost, readOplog, reconnectFinding, reconnectOf, recordProblems, recoveryFindings, recoveryOf, referenceOf, reorderingOf, replicaSetArgs, replicaSetOnce, replicaSetStagesOf, requestOf, requestWords, restamped, roomNeeded, roomVoidOf, routeLine, routerImage, routesOf, runCell, runDiskFault, seedScript, sentinelConfig, sessionsOf, shippedClientRecord, shippedSource, sliceQuery, socketAt, socketOf, socketsOf, spread, spreadOf, stagesOf, standaloneCommand, standbyCommand, statusViewOf, stealShare, stepBand, stopScript, streamEnded, streamOf, streamsLoadOf, subjectClient, subjectProblems, subscriptionsOf, substrateHere, substrateKey, substrateOf, substrateOn, targetImageOf, targetSourceOf, templated, toolJsonOf, topicOf, topologyOf, toxicBody, unlockedManifests, unpinnedBases, unpoolable, verdictOf, versionsOf, viewOf, writesOf };
|
|
9744
9879
|
|
|
9745
9880
|
//# sourceMappingURL=index.js.map
|