@mark1russell7/harness 0.16.32 → 0.16.33
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/index.d.ts +69 -1
- package/build/index.js +69 -5
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,6 +48,19 @@ The command `run` of `src/vm.ts` and the workflow `vm-run.yml` operate one comma
|
|
|
48
48
|
|
|
49
49
|
After the time limit, each process of the argv stops. The file `run.json` in `/out` tells why the run ended, the exit code and the kernel of the guest. A consumer adds one job that uses `vm-run.yml` at a commit of this repository. One file, `vm/linux.json`, pins the kernel for `vm.yml` and `vm-run.yml`.
|
|
50
50
|
|
|
51
|
+
### The gate of the VM tier
|
|
52
|
+
|
|
53
|
+
A pull request that changes the VM tier starts `vm.yml` (SYS-155). The workflow operates one arm `e4` with the cells of the bridge of T01. Then `src/vm-tier.test.ts` reads the records of that arm, with `HARNESS_VM=1`. `vmArmProblems` in `src/vm-tier.ts` gives each difference from the cases of the self-test, as data:
|
|
54
|
+
|
|
55
|
+
| Case | The result that the case expects |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| control | The guest operates the kernel of `vm/linux.json`. The boot to Docker takes 30 s or less. The steal of each run is 0.01 or less. |
|
|
58
|
+
| idle blackhole | Each run ends with `ETIMEDOUT`. The median of the times is from 11.0 s to 12.0 s. |
|
|
59
|
+
| in-flight blackhole | Each run ends with `ETIMEDOUT` from 5.9 s to 6.5 s after the fault. |
|
|
60
|
+
| stall of 1 s | Each run gets its answer from 1.5 s to 1.9 s after the fault. |
|
|
61
|
+
|
|
62
|
+
A void run does not pass. The arm writes its boot record (`<arm>.boot.json`) before the cells, thus a guest that did not boot fails the control case. A runner with no `/dev/kvm` fails the job in a pull request or a push. Only a dispatch keeps the void result of rule 8. `VM_TIER_FAULTS` names the faults of the gate, and the rig `systems.vm` of `docs/rigs.json` names the same faults.
|
|
63
|
+
|
|
51
64
|
## The topologies
|
|
52
65
|
|
|
53
66
|
A topology (`Topology`) is the chain of hops from the client to the target, as data. Each hop is on two networks, one for each side. Network j joins element j and element j + 1: the client is element 0, and the target is the last element.
|
package/build/index.d.ts
CHANGED
|
@@ -2805,6 +2805,74 @@ interface FabricPinnable {
|
|
|
2805
2805
|
* also a problem. A record with a problem is not a record.
|
|
2806
2806
|
*/
|
|
2807
2807
|
export declare const fabricRecordProblems: (record: FabricPinnable) => string[];
|
|
2808
|
+
/** The boot record of an arm in a guest. The command `arm` writes it before the cells start. */
|
|
2809
|
+
interface VmBoot {
|
|
2810
|
+
readonly format: "harness-vm-boot/1";
|
|
2811
|
+
/** This number is the time from the start of QEMU to the first reply of Docker in the guest, in milliseconds. */
|
|
2812
|
+
readonly ms: number;
|
|
2813
|
+
/** This text is the release of the kernel of the guest, as `uname -r` gives it. */
|
|
2814
|
+
readonly kernel: string;
|
|
2815
|
+
}
|
|
2816
|
+
/**
|
|
2817
|
+
* The gate of the VM tier of layer E4 (`vm.ts`). The workflow `vm.yml` operates one arm `e4`: QEMU boots the pinned
|
|
2818
|
+
* kernel, and the cells of T01 operate in the guest. Each cell applies its fault in the lab of the guest.
|
|
2819
|
+
*
|
|
2820
|
+
* This file reads the records of that arm, and gives each difference from the cases of the self-test as data. A
|
|
2821
|
+
* control case examines the boot and the guest. A fault case examines the measure of each run of one cell.
|
|
2822
|
+
*/
|
|
2823
|
+
/** The kinds of fault that the cells of the arm apply in the guest. */
|
|
2824
|
+
type VmFaultKind = "blackhole" | "stall";
|
|
2825
|
+
/** The kinds of fault that the gate of the VM tier examines. */
|
|
2826
|
+
export declare const VM_TIER_FAULTS: readonly VmFaultKind[];
|
|
2827
|
+
/** The format of the record of a cell, as the cells write it. */
|
|
2828
|
+
export declare const CELL_RECORD_FORMAT = "loom.cell-record/1";
|
|
2829
|
+
/** These are the parts of the record of a cell that the gate reads. */
|
|
2830
|
+
interface VmCellRecord {
|
|
2831
|
+
readonly format: string;
|
|
2832
|
+
readonly cell: Cell;
|
|
2833
|
+
readonly manifests: readonly Pick<Manifest, "kernel" | "substrate">[];
|
|
2834
|
+
readonly runs: readonly Run[];
|
|
2835
|
+
}
|
|
2836
|
+
/** The records of one arm `e4`: its boot record, or null when the guest did not boot, and the record of each cell. */
|
|
2837
|
+
interface VmArm {
|
|
2838
|
+
readonly boot: VmBoot | null;
|
|
2839
|
+
readonly records: readonly VmCellRecord[];
|
|
2840
|
+
}
|
|
2841
|
+
/** The control case: the guest operates the pinned kernel, boots in its time, and the host takes little of its CPU. */
|
|
2842
|
+
interface VmControlCase {
|
|
2843
|
+
readonly kind: "control";
|
|
2844
|
+
readonly name: string;
|
|
2845
|
+
/** This text is the release of the pinned kernel, the version of `vm/linux.json`. */
|
|
2846
|
+
readonly kernel: string;
|
|
2847
|
+
/** The boot to Docker must take this time in ms or less. */
|
|
2848
|
+
readonly bootMaxMs: number;
|
|
2849
|
+
/** The steal of each run, the share of the CPU that the host took, must be this share or less. */
|
|
2850
|
+
readonly stealMax: number;
|
|
2851
|
+
}
|
|
2852
|
+
/** A fault case: the measure of each run of one cell of the arm, against the result that the case expects. */
|
|
2853
|
+
interface VmFaultCase {
|
|
2854
|
+
readonly kind: "fault";
|
|
2855
|
+
readonly name: string;
|
|
2856
|
+
/** This text is the name of the cell. */
|
|
2857
|
+
readonly cell: string;
|
|
2858
|
+
readonly fault: VmFaultKind;
|
|
2859
|
+
/** Each counted run must end with this outcome. An `error` also needs `errno`. */
|
|
2860
|
+
readonly outcome: "error" | "answered";
|
|
2861
|
+
readonly errno?: string;
|
|
2862
|
+
/** The count of the runs that are not void must be this count or more. */
|
|
2863
|
+
readonly runsMin: number;
|
|
2864
|
+
/** The median of the measured times in s must be in this range. */
|
|
2865
|
+
readonly median?: readonly [number, number];
|
|
2866
|
+
/** The measured time in s of each counted run must be in this range. */
|
|
2867
|
+
readonly each?: readonly [number, number];
|
|
2868
|
+
}
|
|
2869
|
+
/** One case of the self-test of the VM tier. */
|
|
2870
|
+
type VmCase = VmControlCase | VmFaultCase;
|
|
2871
|
+
/**
|
|
2872
|
+
* This function gives each difference between the records of an arm `e4` and the result that a case expects. An arm
|
|
2873
|
+
* with no boot record, no record of the cell or no counted run gives a problem: a void arm does not pass.
|
|
2874
|
+
*/
|
|
2875
|
+
export declare const vmArmProblems: (arm: VmArm, cases: readonly VmCase[]) => string[];
|
|
2808
2876
|
/**
|
|
2809
2877
|
* This module reads the lockfiles of a build context for the manifest of a run. A lockfile pins each
|
|
2810
2878
|
* package that a build installs, thus its sha256 pins the packages that the image holds. The
|
|
@@ -3393,4 +3461,4 @@ export declare const environmentCounts: (cell: Cell, runs: number) => number[];
|
|
|
3393
3461
|
* Each environment does a warm-up first, and the result keeps it apart from the counted runs.
|
|
3394
3462
|
*/
|
|
3395
3463
|
export declare const runCell: (cell: Cell, say?: (line: string) => void) => Promise<CellResult>;
|
|
3396
|
-
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 ContainerLimits, type ContextFile, type CountBand, type CpuLists, type CpuShares, type CpuState, type CpuStates, type Crossings, type Cut, type Decision, type DeliveryPrediction, type DeliveryReading, type DeliveryStream, type DiskImage, type DiskLab, type DiskLabOptions, type DiskLayerRecord, type DiskPinnable, type DiskRecord, type DiskSubject, type DiskTornRecord, 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 FabricArrival, type FabricControl, type FabricFault, type FabricFaultKind, type FabricGap, type FabricImage, type FabricLab, type FabricLabOptions, type FabricLeafRecord, type FabricManifest, type FabricParts, type FabricPinnable, type FabricRecord, type FabricRouteRecord, type FabricStamp, type FabricStreamRecord, type FabricTierLab, 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 HostLimits, type HostSetting, type HostSysctl, type HttpProbe, type ImagePlan, type ImageSource, type Interval, type Jitter, type Kafka, type KafkaLab, type KafkaMember, type KafkaPause, type KernelRecord, LAYERS, LAYER_FACTS, LAYER_RIG_ENV, LIMITS, type Lab, type Layer, type LayerFacts, type LayerState, type LeafSessions, type LeafViews, type Limit, type LineCount, type LineMatch, type LoadBand, type LoadConnections, 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, RESOURCES_EVENT, RESOURCES_PROGRAM, RIG_TERMS, 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 ResourceChange, type ResourceCpu, type ResourceDevice, type ResourceLimits, type ResourceMemory, type ResourceNetwork, type ResourceOptions, type ResourceReader, type ResourceReading, type ResourceTraffic, type RigTerm, type RigTermCell, type RouteLine, type RouterHop, type RttRange, type Run, type RunBackup, type RunCpus, type RunDrill, type RunEstimate, type RunFabric, type RunGroup, type RunLoad, type RunPart, type RunPause, type RunResources, type RunRoute, type RunStream, type RunTopology, type SentinelEvent, type SentinelStage, type Shipped, type ShippedImage, type Sibling, type SilenceDrops, type SocketPlace, type Spine, type Spread, type StackChange, type Stage, type StageBand, type StageVerdict, type StallReading, type Stamp, type Status, type StatusRow, type Subject, type Substrate, type SubstrateSource, TOXIC_RIG_TERMS, type Target, type TimeFromFault, type Topology, type Toxic, type Verdict, type WallStamp, type Writes, type WsProbe, cgroupKeyed, cgroupLimit, cgroupNumber, cpuMaxOf, cpuStatOf, cpusOfList, environmentProblems, hostLimitsOf, isHopPlace, latestEndOf, layerOf, limitsOf, limitsProblems, memoryStatOf, networkOf, resourceArgs, resourceChange, resourceReadingIn, resourceReadingOf, rigTermsOf };
|
|
3464
|
+
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 ContainerLimits, type ContextFile, type CountBand, type CpuLists, type CpuShares, type CpuState, type CpuStates, type Crossings, type Cut, type Decision, type DeliveryPrediction, type DeliveryReading, type DeliveryStream, type DiskImage, type DiskLab, type DiskLabOptions, type DiskLayerRecord, type DiskPinnable, type DiskRecord, type DiskSubject, type DiskTornRecord, 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 FabricArrival, type FabricControl, type FabricFault, type FabricFaultKind, type FabricGap, type FabricImage, type FabricLab, type FabricLabOptions, type FabricLeafRecord, type FabricManifest, type FabricParts, type FabricPinnable, type FabricRecord, type FabricRouteRecord, type FabricStamp, type FabricStreamRecord, type FabricTierLab, 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 HostLimits, type HostSetting, type HostSysctl, type HttpProbe, type ImagePlan, type ImageSource, type Interval, type Jitter, type Kafka, type KafkaLab, type KafkaMember, type KafkaPause, type KernelRecord, LAYERS, LAYER_FACTS, LAYER_RIG_ENV, LIMITS, type Lab, type Layer, type LayerFacts, type LayerState, type LeafSessions, type LeafViews, type Limit, type LineCount, type LineMatch, type LoadBand, type LoadConnections, 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, RESOURCES_EVENT, RESOURCES_PROGRAM, RIG_TERMS, 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 ResourceChange, type ResourceCpu, type ResourceDevice, type ResourceLimits, type ResourceMemory, type ResourceNetwork, type ResourceOptions, type ResourceReader, type ResourceReading, type ResourceTraffic, type RigTerm, type RigTermCell, type RouteLine, type RouterHop, type RttRange, type Run, type RunBackup, type RunCpus, type RunDrill, type RunEstimate, type RunFabric, type RunGroup, type RunLoad, type RunPart, type RunPause, type RunResources, type RunRoute, type RunStream, type RunTopology, type SentinelEvent, type SentinelStage, type Shipped, type ShippedImage, type Sibling, type SilenceDrops, type SocketPlace, type Spine, type Spread, type StackChange, type Stage, type StageBand, type StageVerdict, type StallReading, type Stamp, type Status, type StatusRow, type Subject, type Substrate, type SubstrateSource, TOXIC_RIG_TERMS, type Target, type TimeFromFault, type Topology, type Toxic, type Verdict, type VmArm, type VmBoot, type VmCase, type VmCellRecord, type VmControlCase, type VmFaultCase, type VmFaultKind, type WallStamp, type Writes, type WsProbe, cgroupKeyed, cgroupLimit, cgroupNumber, cpuMaxOf, cpuStatOf, cpusOfList, environmentProblems, hostLimitsOf, isHopPlace, latestEndOf, layerOf, limitsOf, limitsProblems, memoryStatOf, networkOf, resourceArgs, resourceChange, resourceReadingIn, resourceReadingOf, rigTermsOf };
|
package/build/index.js
CHANGED
|
@@ -871,7 +871,7 @@ const countFinding = (counts, lines) => {
|
|
|
871
871
|
return off.length === 0 ? null : off.join("; ");
|
|
872
872
|
};
|
|
873
873
|
/** This function says a line match in words, for a finding. */
|
|
874
|
-
const wordsOf = (match) => {
|
|
874
|
+
const wordsOf$1 = (match) => {
|
|
875
875
|
const where = Object.entries(match.where ?? {}).map(([path, value]) => `${path} ${String(value)}`);
|
|
876
876
|
return where.length === 0 ? `a ${match.ev} line` : `a ${match.ev} line with ${where.join(", ")}`;
|
|
877
877
|
};
|
|
@@ -1172,7 +1172,7 @@ const measureDriver = (cell, run) => {
|
|
|
1172
1172
|
const until = prediction.detects ? Infinity : after + valueIn(prediction.window, "s") * 1e9;
|
|
1173
1173
|
for (const match of driver.quiet ?? []) {
|
|
1174
1174
|
const line = events.find((event) => event.t > after && event.t <= until && matches(event, match));
|
|
1175
|
-
if (line !== void 0) findings.push(`${wordsOf(match)} came ${between$3(after, line.t).value} s after the fault, where none should`);
|
|
1175
|
+
if (line !== void 0) findings.push(`${wordsOf$1(match)} came ${between$3(after, line.t).value} s after the fault, where none should`);
|
|
1176
1176
|
}
|
|
1177
1177
|
const expected = prediction.detects ? void 0 : prediction.middlebox?.forgets;
|
|
1178
1178
|
if (!prediction.detects && (run.middlebox !== void 0 || expected !== void 0)) {
|
|
@@ -1199,7 +1199,7 @@ const measureDriver = (cell, run) => {
|
|
|
1199
1199
|
const line = lineAfter(events, step.ends, after);
|
|
1200
1200
|
const from = referenceOf(run, step.from, step.socket ?? driver.socket, true, line?.t);
|
|
1201
1201
|
if (line === void 0 || from === void 0) {
|
|
1202
|
-
findings.push(line === void 0 ? `${step.what}: ${wordsOf(step.ends)} never came` : `${step.what}: its reference (${step.from}) never came`);
|
|
1202
|
+
findings.push(line === void 0 ? `${step.what}: ${wordsOf$1(step.ends)} never came` : `${step.what}: its reference (${step.from}) never came`);
|
|
1203
1203
|
return {
|
|
1204
1204
|
what: step.what,
|
|
1205
1205
|
name: line === void 0 ? null : nameOf$1(line, step.ends),
|
|
@@ -1233,7 +1233,7 @@ const measureDriver = (cell, run) => {
|
|
|
1233
1233
|
...nothing,
|
|
1234
1234
|
...stepped,
|
|
1235
1235
|
void: voided,
|
|
1236
|
-
finding: findings[0] ?? `the reply never came: ${wordsOf(driver.reply.ends)}`
|
|
1236
|
+
finding: findings[0] ?? `the reply never came: ${wordsOf$1(driver.reply.ends)}`
|
|
1237
1237
|
};
|
|
1238
1238
|
return {
|
|
1239
1239
|
...base,
|
|
@@ -6025,6 +6025,70 @@ const fabricRecordProblems = (record) => [.../* @__PURE__ */ new Set([
|
|
|
6025
6025
|
...imagePinProblems("the image of FRRouting", record.frr.image, void 0),
|
|
6026
6026
|
...imagePinProblems("the image of the stream", record.stream.image, void 0)
|
|
6027
6027
|
])];
|
|
6028
|
+
// src/vm-tier.ts
|
|
6029
|
+
/** The kinds of fault that the gate of the VM tier examines. */
|
|
6030
|
+
const VM_TIER_FAULTS = ["blackhole", "stall"];
|
|
6031
|
+
/** The format of the boot record. The type holds it equal to the format that `vm.ts` writes, with no import of `vm.ts`. */
|
|
6032
|
+
const BOOT_FORMAT = "harness-vm-boot/1";
|
|
6033
|
+
/** The format of the record of a cell, as the cells write it. */
|
|
6034
|
+
const CELL_RECORD_FORMAT = "loom.cell-record/1";
|
|
6035
|
+
const wordsOf = (outcome) => outcome.kind === "error" ? `the error ${outcome.errno}` : outcome.kind;
|
|
6036
|
+
const range = ([low, high]) => `${low} s to ${high} s`;
|
|
6037
|
+
const inRange = (value, [low, high]) => value >= low && value <= high;
|
|
6038
|
+
const controlProblems = (arm, expected) => {
|
|
6039
|
+
const problems = [];
|
|
6040
|
+
const { boot } = arm;
|
|
6041
|
+
if (boot === null) return ["the arm has no boot record: the guest did not boot"];
|
|
6042
|
+
if (boot.format !== BOOT_FORMAT) problems.push(`the boot record has the format ${String(boot.format)}, not ${BOOT_FORMAT}`);
|
|
6043
|
+
if (boot.kernel !== expected.kernel) problems.push(`the guest booted the kernel ${boot.kernel}, not the pinned kernel ${expected.kernel}`);
|
|
6044
|
+
if (!(boot.ms <= expected.bootMaxMs)) problems.push(`the boot to Docker took ${boot.ms} ms, not ${expected.bootMaxMs} ms or less`);
|
|
6045
|
+
if (arm.records.length === 0) problems.push("the arm has no record of a cell");
|
|
6046
|
+
for (const record of arm.records) {
|
|
6047
|
+
const name = record.cell.name;
|
|
6048
|
+
if (record.manifests.length === 0) problems.push(`the record of ${name} has no manifest`);
|
|
6049
|
+
for (const manifest of record.manifests) {
|
|
6050
|
+
if (manifest.kernel !== expected.kernel) problems.push(`the record of ${name} operated on the kernel ${manifest.kernel}, not ${expected.kernel}`);
|
|
6051
|
+
if (manifest.substrate?.layer !== "E4") problems.push(`the record of ${name} is of the layer ${String(manifest.substrate?.layer)}, not E4`);
|
|
6052
|
+
}
|
|
6053
|
+
for (const run of record.runs) if (run.steal === void 0) problems.push(`the run ${run.environment}.${run.index} of ${name} has no steal`);
|
|
6054
|
+
else if (!(run.steal <= expected.stealMax)) problems.push(`the steal of the run ${run.environment}.${run.index} of ${name} is ${run.steal}, not ${expected.stealMax} or less`);
|
|
6055
|
+
}
|
|
6056
|
+
return problems;
|
|
6057
|
+
};
|
|
6058
|
+
const faultProblems = (arm, expected) => {
|
|
6059
|
+
const record = arm.records.find((each) => each.cell.name === expected.cell);
|
|
6060
|
+
if (record === void 0) return [`the arm has no record of the cell ${expected.cell}`];
|
|
6061
|
+
const problems = [];
|
|
6062
|
+
if (record.cell.fault !== expected.fault) problems.push(`the cell ${expected.cell} applies ${record.cell.fault}, not ${expected.fault}`);
|
|
6063
|
+
const counted = record.runs.map((run) => ({
|
|
6064
|
+
run,
|
|
6065
|
+
read: measure(record.cell, run)
|
|
6066
|
+
})).filter(({ read }) => read.void === null);
|
|
6067
|
+
if (counted.length < expected.runsMin) problems.push(`the cell ${expected.cell} has ${counted.length} runs that are not void, not ${expected.runsMin} or more`);
|
|
6068
|
+
const times = [];
|
|
6069
|
+
for (const { run, read } of counted) {
|
|
6070
|
+
const id = `the run ${run.environment}.${run.index}`;
|
|
6071
|
+
const { outcome } = read;
|
|
6072
|
+
if (!(outcome.kind === expected.outcome && (outcome.kind !== "error" || outcome.errno === expected.errno))) problems.push(`${id} ended with ${wordsOf(outcome)}, not ${expected.outcome === "error" ? `the error ${String(expected.errno)}` : expected.outcome}`);
|
|
6073
|
+
if (read.elapsed === null || read.elapsed === void 0) {
|
|
6074
|
+
problems.push(`${id} has no measured time`);
|
|
6075
|
+
continue;
|
|
6076
|
+
}
|
|
6077
|
+
const seconds = valueIn(read.elapsed, "s");
|
|
6078
|
+
times.push(seconds);
|
|
6079
|
+
if (expected.each !== void 0 && !inRange(seconds, expected.each)) problems.push(`${id} took ${seconds} s, not ${range(expected.each)}`);
|
|
6080
|
+
}
|
|
6081
|
+
if (expected.median !== void 0 && times.length > 0) {
|
|
6082
|
+
const middle = median(times);
|
|
6083
|
+
if (!inRange(middle, expected.median)) problems.push(`the median of the cell ${expected.cell} is ${middle} s, not ${range(expected.median)}`);
|
|
6084
|
+
}
|
|
6085
|
+
return problems;
|
|
6086
|
+
};
|
|
6087
|
+
/**
|
|
6088
|
+
* This function gives each difference between the records of an arm `e4` and the result that a case expects. An arm
|
|
6089
|
+
* with no boot record, no record of the cell or no counted run gives a problem: a void arm does not pass.
|
|
6090
|
+
*/
|
|
6091
|
+
const vmArmProblems = (arm, cases) => cases.flatMap((each) => (each.kind === "control" ? controlProblems(arm, each) : faultProblems(arm, each)).map((problem) => `${each.name}: ${problem}`));
|
|
6028
6092
|
// src/disk.ts
|
|
6029
6093
|
/**
|
|
6030
6094
|
* The disk tier applies a disk plan of `@mark1russell7/rigor-chaos` to the files of a program. Each fault starts one new
|
|
@@ -10356,6 +10420,6 @@ const runCell = async (cell, say = () => {}) => {
|
|
|
10356
10420
|
target = larger;
|
|
10357
10421
|
}
|
|
10358
10422
|
};
|
|
10359
|
-
export { AWS_FROM, CLIENT_CAPABILITIES, CLIENT_NAMES, CLOSED_TOLERANCE, CLOUDS, CLUSTER_STAGES, CONVERGE_MS, CPU_STATES, DAEMONS, DEBUG, DIRTY, DISK_MOUNT, DISK_RECORD_FORMAT, DISK_ROOT, DISK_SUBJECT, DISK_TIER_KINDS, DROP_HANDLING, FABRIC_CLIENT, FABRIC_DEVICE, FABRIC_RECORD_FORMAT, FABRIC_SINK_SCRIPT, FABRIC_STREAM_IMAGE, FABRIC_STREAM_INTERVAL_MS, FABRIC_STREAM_PORT, FABRIC_STREAM_SCRIPT, FABRIC_TARGET, FABRIC_TIER_FAULTS, FABRIC_TIER_TIMERS, FRR_IMAGE, GIVES_AWAY, HASH_SCRIPT, INJECT, INSERT, KAFKA_TAIL_MS, KEPT, LAYERS, LAYER_FACTS, LAYER_RIG_ENV, LIMITS, LINGER_MS, LISTING, LOAD_FORMAT, LOAD_PATH, LOAD_POOL_LIMIT, LOCK_NAMES, LOSS_MARGIN, MEMBER_MARKS, MONITOR_DOWN, NODE_MARKS, NOISE, PINNED, PUMP, PUMP_SLACK, QUIET_MS, RELATIVE, REPLICA_SET_STAGES, REPOSITORY, RESOURCES_EVENT, RESOURCES_PROGRAM, RESTART, RIG_TERMS, ROUTERS, SCHEDULE_PATH, SEED_DOCUMENT, SHIPPED_CLIENTS, SHIPPED_NAMES, STAGES, STANDBY_READY, STATUS_SCRIPT, STEPS, STEP_DOWN, TOXIC_RIG_TERMS, amqpClientImage, arrivalOf, basesOf, bootstrapOf, brokerEnv, buildOf, buildRecordOf, callOf, cancelsOf, cargoVersions, cgroupKeyed, cgroupLimit, cgroupNumber, clockOffsetOf, closeOrExit, cloudOf, clusterArgs, clusterConf, clusterCutOf, clusterHostsOf, clusterOnce, clusterStagesOf, clusterViewOf, commitProblems, commitVoid, comparable, connectionsProblems, controllerEnv, cpuMaxOf, cpuShares, cpuStatOf, cpusOfList, crossingsOf, cutOf, deadlineOf, delayVoids, deliveryFinding, deliveryOf, deviceOf, diskLayerCommand, diskRecordProblems, diskSubjectProblems, diskTornCommand, drillOnce, drillSpan, dropFinding, dropOf, endpointAfter, envOf, environmentCounts, environmentProblems, errorsOf, estimateOf, estimateVerdict, exitOf, fabricFaultProblems, fabricRecordProblems, fabricStreamOf, fieldOf, fieldsOf, firstUnanswered, folderDigest, frrConf, goHttpImage, goVersions, groupOnce, groupVerdictOf, grpcClientImage, harnessImage, harnessRecord, harnessVersion, hashOf, highestHeld, hikariClientImage, hostLimitsOf, hzOf, imageOf, imagePinProblems, imageProblems, inContext, infoOf, initiateScript, isFenceLine, isHopPlace, jarVersions, jitterOf, jitterOfLines, judge, kafkaArgs, kafkaClientImage, kafkaCutOf, kafkaOnce, kafkaPauseOnce, kafkaViewOf, lagsOf, laterMove, latestEndOf, layerOf, leafLacks, leafRouteAfter, leftAfter, limitsOf, limitsProblems, loadOf, loadPlanOf, loadVerdict, locksOf, logNameOf, logTimeOf, manifestProblems, matches, measure, measureConntrack, measureDriver, measureEgress, measureGroup, measureMemory, measurePause, measurePorts, measureQueue, medianInterval, memAvailableOf, memberCommand, memberConfig, memberLineOf, memoryStatOf, mongoClientImage, monotonicAt, monotonicOf, namesGroup, networkOf, nodeClientImage, nodeCommand, nodeHttpImage, nodeIdOf, nodeLineOf, nodeNameOf, nodesOnMonotonic, noiseOf, npmDrift, npmVersions, numbersOf, onMonotonic, openClusterLab, openDiskLab, openFabric, openFabricLab, openGroupLab, openKafkaLab, openLab, openReplicaSetLab, openStandby, pairArgs, pairOnce, pairingOf, pairingsOf, pauseReady, peersOf, pgClientImage, pingsOf, plainOf, planOf, pongsOf, poolOf, programLines, programOf, quantileOf, readCpu, readCpus, readHost, readOplog, reconnectFinding, reconnectOf, recordProblems, recoveryFindings, recoveryOf, referenceOf, reorderingOf, replicaSetArgs, replicaSetOnce, replicaSetStagesOf, requestOf, requestWords, resourceArgs, resourceChange, resourceReader, resourceReadingIn, resourceReadingOf, restamped, rigTermsOf, roomNeeded, roomVoidOf, routeLine, routerImage, routesOf, runCell, runCpusOf, runDiskFault, runFabricFault, seedScript, sentinelConfig, sessionsOf, shippedClientRecord, shippedSource, silenceDrops, 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 };
|
|
10423
|
+
export { AWS_FROM, CELL_RECORD_FORMAT, CLIENT_CAPABILITIES, CLIENT_NAMES, CLOSED_TOLERANCE, CLOUDS, CLUSTER_STAGES, CONVERGE_MS, CPU_STATES, DAEMONS, DEBUG, DIRTY, DISK_MOUNT, DISK_RECORD_FORMAT, DISK_ROOT, DISK_SUBJECT, DISK_TIER_KINDS, DROP_HANDLING, FABRIC_CLIENT, FABRIC_DEVICE, FABRIC_RECORD_FORMAT, FABRIC_SINK_SCRIPT, FABRIC_STREAM_IMAGE, FABRIC_STREAM_INTERVAL_MS, FABRIC_STREAM_PORT, FABRIC_STREAM_SCRIPT, FABRIC_TARGET, FABRIC_TIER_FAULTS, FABRIC_TIER_TIMERS, FRR_IMAGE, GIVES_AWAY, HASH_SCRIPT, INJECT, INSERT, KAFKA_TAIL_MS, KEPT, LAYERS, LAYER_FACTS, LAYER_RIG_ENV, LIMITS, LINGER_MS, LISTING, LOAD_FORMAT, LOAD_PATH, LOAD_POOL_LIMIT, LOCK_NAMES, LOSS_MARGIN, MEMBER_MARKS, MONITOR_DOWN, NODE_MARKS, NOISE, PINNED, PUMP, PUMP_SLACK, QUIET_MS, RELATIVE, REPLICA_SET_STAGES, REPOSITORY, RESOURCES_EVENT, RESOURCES_PROGRAM, RESTART, RIG_TERMS, ROUTERS, SCHEDULE_PATH, SEED_DOCUMENT, SHIPPED_CLIENTS, SHIPPED_NAMES, STAGES, STANDBY_READY, STATUS_SCRIPT, STEPS, STEP_DOWN, TOXIC_RIG_TERMS, VM_TIER_FAULTS, amqpClientImage, arrivalOf, basesOf, bootstrapOf, brokerEnv, buildOf, buildRecordOf, callOf, cancelsOf, cargoVersions, cgroupKeyed, cgroupLimit, cgroupNumber, clockOffsetOf, closeOrExit, cloudOf, clusterArgs, clusterConf, clusterCutOf, clusterHostsOf, clusterOnce, clusterStagesOf, clusterViewOf, commitProblems, commitVoid, comparable, connectionsProblems, controllerEnv, cpuMaxOf, cpuShares, cpuStatOf, cpusOfList, crossingsOf, cutOf, deadlineOf, delayVoids, deliveryFinding, deliveryOf, deviceOf, diskLayerCommand, diskRecordProblems, diskSubjectProblems, diskTornCommand, drillOnce, drillSpan, dropFinding, dropOf, endpointAfter, envOf, environmentCounts, environmentProblems, errorsOf, estimateOf, estimateVerdict, exitOf, fabricFaultProblems, fabricRecordProblems, fabricStreamOf, fieldOf, fieldsOf, firstUnanswered, folderDigest, frrConf, goHttpImage, goVersions, groupOnce, groupVerdictOf, grpcClientImage, harnessImage, harnessRecord, harnessVersion, hashOf, highestHeld, hikariClientImage, hostLimitsOf, hzOf, imageOf, imagePinProblems, imageProblems, inContext, infoOf, initiateScript, isFenceLine, isHopPlace, jarVersions, jitterOf, jitterOfLines, judge, kafkaArgs, kafkaClientImage, kafkaCutOf, kafkaOnce, kafkaPauseOnce, kafkaViewOf, lagsOf, laterMove, latestEndOf, layerOf, leafLacks, leafRouteAfter, leftAfter, limitsOf, limitsProblems, loadOf, loadPlanOf, loadVerdict, locksOf, logNameOf, logTimeOf, manifestProblems, matches, measure, measureConntrack, measureDriver, measureEgress, measureGroup, measureMemory, measurePause, measurePorts, measureQueue, medianInterval, memAvailableOf, memberCommand, memberConfig, memberLineOf, memoryStatOf, mongoClientImage, monotonicAt, monotonicOf, namesGroup, networkOf, nodeClientImage, nodeCommand, nodeHttpImage, nodeIdOf, nodeLineOf, nodeNameOf, nodesOnMonotonic, noiseOf, npmDrift, npmVersions, numbersOf, onMonotonic, openClusterLab, openDiskLab, openFabric, openFabricLab, openGroupLab, openKafkaLab, openLab, openReplicaSetLab, openStandby, pairArgs, pairOnce, pairingOf, pairingsOf, pauseReady, peersOf, pgClientImage, pingsOf, plainOf, planOf, pongsOf, poolOf, programLines, programOf, quantileOf, readCpu, readCpus, readHost, readOplog, reconnectFinding, reconnectOf, recordProblems, recoveryFindings, recoveryOf, referenceOf, reorderingOf, replicaSetArgs, replicaSetOnce, replicaSetStagesOf, requestOf, requestWords, resourceArgs, resourceChange, resourceReader, resourceReadingIn, resourceReadingOf, restamped, rigTermsOf, roomNeeded, roomVoidOf, routeLine, routerImage, routesOf, runCell, runCpusOf, runDiskFault, runFabricFault, seedScript, sentinelConfig, sessionsOf, shippedClientRecord, shippedSource, silenceDrops, 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, vmArmProblems, writesOf };
|
|
10360
10424
|
|
|
10361
10425
|
//# sourceMappingURL=index.js.map
|