@mark1russell7/harness 0.16.17 → 0.16.19

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 CHANGED
@@ -44,6 +44,10 @@ The folder `vm/`, the file `src/vm.ts` and the workflow `vm.yml` operate a lab i
44
44
 
45
45
  `runCells` in that file is the one command of the cells for the runner and for a guest. Rule 3 of that document pairs the two in one job. A guest cannot read its runner, thus the runner gives its host in `LAB_RUNNER`. `substrateHere` writes E4 with that cloud and image, and with the kernel and HZ of the guest. A run also records `steal`, the share of the CPU that the host took (`stealShare`). A guest sees only the host above it, thus this number does not show the layer below a hosted runner.
46
46
 
47
+ The command `run` of `src/vm.ts` and the workflow `vm-run.yml` operate one command of another repository in the guest (SYS-136). The guest copies a folder of the caller to `/work`, with no `node_modules`, and installs it from its lockfile. The argv starts in `/work` when Docker is ready. It writes its output to `/out`, and `/out` comes back to the runner, also after a failure.
48
+
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
+
47
51
  ## The topologies
48
52
 
49
53
  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.
@@ -246,6 +250,11 @@ console.log(used.cpu?.total, used.network?.tx.bytes, used.memory.peak, reader.se
246
250
  - Docker removes the cgroup of a client when its program ends. After that, a `read()` throws, and each reading of a series has null for the values of the cgroup.
247
251
  - The traffic of a client is the traffic of the namespace that the clients of the lab share.
248
252
  - **The parse is in TypeScript.** The reader writes the text of each file in one JSON line. `resourceReadingOf` reads that line with `cpuStatOf`, `memoryStatOf`, `cpuMaxOf`, `networkOf`, `cgroupNumber`, `cgroupLimit` and `cgroupKeyed`.
253
+ - **The readings of a cell** (from 0.16.16). A cell can measure the cost of its target in each run, with `runCell`:
254
+ - `Cell.clientLimits` gives the limits of the client in each run, for example other CPUs than the target.
255
+ - `Cell.resources` starts a reader of the target in each run, with these options. The reader stops at the end of the run.
256
+ - Each run then keeps `Run.resources`. It has a reading when the client is ready and before it sends (`start`). It also has a reading after the run ended (`end`), and the series of the reader.
257
+ - `environmentProblems` names each problem of the limits of the target and of the client, before a lab opens. It also names each bad value of the connections of a load stream.
249
258
 
250
259
  ## The subjects
251
260
 
@@ -284,7 +293,14 @@ From 0.11.20, the harness builds each image with the CLI of Docker (`docker buil
284
293
  - the kernel program of the prober, compiled against the BTF of the kernel that builds it, and its Rust collector.
285
294
  - `client`, the TCP client of a cell. Rust's `std::net` sets no socket option by itself, thus the measurement gets the timers of the namespace. The client also samples `TCP_INFO` each 2 ms, a second vantage on its socket. It waits in `poll()`, which does not lock the socket. A keepalive timer that finds its socket held tries again HZ/20 later.
286
295
  - In a stream, a reply of the `client` is whole at its CRLF, or after the length of a bulk string. The client then writes a `replied` line.
287
- - `load`, the open-loop driver of an HTTP/1.1 server (SYS-93). Its plan (`systems-load/1`) is a list of streams, each with a key, a schedule (`rigor-schedule/1`) and its requests. Each stream has its own connection, thus a slow reply delays only its own stream. A send does not wait for a reply. A response is whole after its `Content-Length` or its last chunk. The `sent` and `replied` lines name the stream (`k`) and the arrival (`i`), and a `replied` line names the status.
296
+ - `load`, the open-loop driver of an HTTP/1.1 server (SYS-93). Its plan (`systems-load/1`) is a list of streams, each with a key, a schedule (`rigor-schedule/1`) and its requests. Each stream has its own connections, thus a slow reply delays only its own stream. A send does not wait for a reply. A response is whole after its `Content-Length` or its last chunk. The `sent` and `replied` lines name the stream (`k`) and the arrival (`i`), and a `replied` line names the status.
297
+ - The field `connections` of a stream (`LoadConnections`) sets how its arrivals go to the server. A plan with no such field gives the same lines as before.
298
+ - `{ mode: "pipeline" }` is the default. The stream has one connection, and each arrival goes at its time also when the replies before it are not in. The replies come in the order of the requests. Thus a slow reply delays each reply after it on the stream.
299
+ - `{ mode: "pool", size }` keeps `size` connections, from 1 to 1024, each with one request in flight at most. The driver opens them before `ready`. A due arrival takes the connection that is idle for the longest time. With no idle connection, it waits in a queue of its stream.
300
+ - `{ mode: "fresh" }` opens a new connection for each arrival at its time, and closes it after the reply. The connect does not block the other streams. A failed connect is an `error` line of that arrival only, and the stream goes on.
301
+ - A run of a cell with a pool or a fresh stream ends at `done` or at the deadline (`loadEnds`). An `error` or an `eof` of one connection does not end it.
302
+ - In a pool and in a fresh stream, each `replied` line names the arrival of its own connection. Thus the replies can come out of order. The `sent` line comes at the write and gives the wait for the connection in ns (`wait`). That wait is not a lag of the driver: `streamsLoadOf` takes it out of the lag. The latency still counts from the planned time.
303
+ - A fresh stream leaves each closed connection in TIME_WAIT on the client, thus a high rate can use all the local ports. A pool needs a keep-alive time of the server above the idle time of each connection.
288
304
  - `resources`, the reader of the resources of a container. `read` prints one JSON line with the text of each file of a cgroup and of `/proc/net/dev`, between two monotonic stamps. `watch` prints one line each period. Each line of a series has its place on the clock from the start of the series. Thus a slow reading does not move the later ones.
289
305
  - `inject`, which applies a fault in one `iptables-restore` commit, with monotonic stamps around the commit. Thus the start of a fault is known in the VM. A `docker exec` from Windows comes 190 ms late at the median. With `--via DEV`, the rules go in the FORWARD chain, on the device toward one side. `--protocol` and `--handshake pass` change the match of a rule, and `inject silence` drops each packet of its namespace.
290
306
  - `inject` also sends a signal to a process by its name (`signal`), and one command to a server of the Redis protocol (`resp`). Stamps bracket each.
@@ -635,4 +651,12 @@ The tests of `resources.ts` read recorded texts of the files of a cgroup and of
635
651
  - The readings of the client are the control. Its CPU time is less than half of the burn, and its namespace sent less than 10 % of the bytes. Thus a reader of the wrong container fails the test.
636
652
  - After the end of the client, a reading of its series has null for each value of its cgroup, and a `read()` throws.
637
653
 
654
+ `HARNESS_LOAD=1` starts the proof of the connection modes of the client `load` on real containers, in the workflow `load.yml`. A Node server numbers each connection and counts the requests in its handlers on each connection. Six streams each send 40 arrivals, 50 ms apart.
655
+
656
+ - Each stream sends each arrival and gets each reply, and it keeps its schedule within 50 ms. The server starts each request after its `sent` line and ends it before its `replied` line.
657
+ - A pipeline with a wait of 100 ms has one connection with two requests or more in flight. Node runs the handlers of pipelined requests at the same time, thus the 90th percentile of the latency stays below 200 ms.
658
+ - A pool of 8 has one request at most on each connection, and the 90th percentile of the latency is below 200 ms. A fresh stream has 40 connections and a `wait` from 0 to 50 ms for each.
659
+ - A pool of 1 makes a queue: the last latency is 1.5 s or more, and the median service time is from 100 to 150 ms. The send of the last arrivals is 1 s late or more, but the lag without the wait stays below 50 ms.
660
+ - Two streams send a slow request of 300 ms and a fast request of 10 ms in turn. On a pipeline, the median latency of the fast requests is 200 ms or more. On a pool of 8, it is below 100 ms, and some fast replies come before the slow reply before them.
661
+
638
662
  `pnpm --filter @mark1russell7/harness build` writes the package for npm into `build/`.
@@ -1,6 +1,209 @@
1
1
  import { Quantity } from "@mark1russell7/quantity";
2
2
  import { Profile, Schedule, ScheduleOptions } from "@mark1russell7/rigor-chaos";
3
3
  import { KernelRecord } from "@mark1russell7/prober";
4
+ /**
5
+ * The resources that one container of a lab used. A reader in a sidecar reads the files of the
6
+ * cgroup of the container and the devices of its network namespace (`RESOURCES_PROGRAM`). It
7
+ * writes the text of each file in one JSON line, with a stamp on CLOCK_MONOTONIC. This module reads
8
+ * each file from that line, and it gives the change between two readings.
9
+ *
10
+ * A file that the reader cannot read gives null: no read. It does not give a zero.
11
+ */
12
+ /** This name is the event of a line of the reader. */
13
+ declare const RESOURCES_EVENT = "resources";
14
+ /** This path is the reader of the resources, in the image of the harness. */
15
+ declare const RESOURCES_PROGRAM = "/opt/harness/resources";
16
+ /** These are the counters of `cpu.stat` of a cgroup. Each time is in microseconds, as the kernel gives it. */
17
+ interface ResourceCpu {
18
+ /** This time is `usage_usec`: the CPU time of the tasks of the cgroup. */
19
+ readonly usage: number;
20
+ /** This time is `user_usec`: the part of the usage in user mode. */
21
+ readonly user: number;
22
+ /** This time is `system_usec`: the part of the usage in the kernel. */
23
+ readonly system: number;
24
+ /** This count is `nr_periods`: the periods of the CPU limit. It is null in a cgroup with no `cpu` controller. */
25
+ readonly periods: number | null;
26
+ /** This count is `nr_throttled`: the periods in which the limit stopped the cgroup. */
27
+ readonly throttled: number | null;
28
+ /** This time is `throttled_usec`: how long the limit stopped the cgroup. */
29
+ readonly throttledTime: number | null;
30
+ }
31
+ /** These are the amounts of memory of a cgroup, in bytes. Each one is null when its file or its key gave no read. */
32
+ interface ResourceMemory {
33
+ /** This amount is `memory.current`: the memory that the cgroup holds at this time. */
34
+ readonly current: number | null;
35
+ /** This amount is `memory.peak`: the highest `memory.current` of the cgroup. A kernel before Linux 5.19 has no such file. */
36
+ readonly peak: number | null;
37
+ /** This amount is `anon` of `memory.stat`: the anonymous memory, for example the heap of a program. */
38
+ readonly anon: number | null;
39
+ /** This amount is `file` of `memory.stat`: the page cache. */
40
+ readonly file: number | null;
41
+ /** This amount is `kernel` of `memory.stat`. Where the kernel has no such key, it is `kernel_stack` and `slab`. */
42
+ readonly kernel: number | null;
43
+ /** This amount is `sock` of `memory.stat`: the buffers of the sockets. */
44
+ readonly sock: number | null;
45
+ /** These are the counts of `memory.events`, for example `max` and `oom_kill`. */
46
+ readonly events: Readonly<Record<string, number>> | null;
47
+ }
48
+ /** These are the bytes and the packets of one direction of a device. */
49
+ interface ResourceTraffic {
50
+ readonly bytes: number;
51
+ readonly packets: number;
52
+ }
53
+ /** These are the counters of one device of a network namespace: what it received (`rx`) and what it sent (`tx`). */
54
+ interface ResourceDevice {
55
+ readonly name: string;
56
+ readonly rx: ResourceTraffic;
57
+ readonly tx: ResourceTraffic;
58
+ }
59
+ /** These are the counters of the devices of a network namespace, without `lo`, and their sums. */
60
+ interface ResourceNetwork {
61
+ /** These are the devices, in the order of their names. */
62
+ readonly devices: readonly ResourceDevice[];
63
+ readonly rx: ResourceTraffic;
64
+ readonly tx: ResourceTraffic;
65
+ }
66
+ /** These are the limits of a cgroup, as the kernel prints them. Each one is null when its file gave no read. */
67
+ interface ResourceLimits {
68
+ /** This limit is `cpu.max`: the CPU time of each period in microseconds, or `max` for no limit. */
69
+ readonly cpu: {
70
+ readonly quota: number | "max";
71
+ readonly period: number;
72
+ } | null;
73
+ /** This limit is `memory.max` in bytes, or `max` for no limit. */
74
+ readonly memory: number | "max" | null;
75
+ /** This list is `cpuset.cpus.effective`: the CPUs of the cgroup, for example `0-3`. */
76
+ readonly cpuset: string | null;
77
+ }
78
+ /** A resource reading is the resources of one container at one moment. */
79
+ interface ResourceReading {
80
+ /** This stamp is the time on CLOCK_MONOTONIC before the first file, in nanoseconds. The reader reads `cpu.stat` first. */
81
+ readonly t0: number;
82
+ /** This stamp is the time on CLOCK_MONOTONIC after the last file, in nanoseconds. */
83
+ readonly t1: number;
84
+ /** This folder is the cgroup of the container, as the reader found it. */
85
+ readonly cgroup: string;
86
+ readonly cpu: ResourceCpu | null;
87
+ readonly memory: ResourceMemory;
88
+ /** This count is `pids.current`: the tasks of the cgroup. */
89
+ readonly pids: number | null;
90
+ readonly network: ResourceNetwork | null;
91
+ readonly limits: ResourceLimits;
92
+ }
93
+ /**
94
+ * A resource change is what a container used between two readings. A part is null when a file of
95
+ * it gave no read in one of the readings, or when a counter of it went down. `resets` names each
96
+ * counter that went down, because a negative use has no meaning.
97
+ */
98
+ interface ResourceChange {
99
+ /** This time is the time between the first stamps of the two readings. */
100
+ readonly elapsed: Quantity;
101
+ readonly cpu: {
102
+ readonly total: Quantity;
103
+ readonly user: Quantity;
104
+ readonly system: Quantity;
105
+ /** This time is how long the CPU limit stopped the cgroup. It is null in a cgroup with no `cpu` controller. */
106
+ readonly throttled: Quantity | null;
107
+ /** This count is the periods of the CPU limit. */
108
+ readonly periods: number | null;
109
+ /** This count is the periods in which the limit stopped the cgroup. */
110
+ readonly throttledPeriods: number | null;
111
+ } | null;
112
+ readonly memory: {
113
+ /** This amount is `memory.current` at the second reading, in bytes. */
114
+ readonly last: number | null;
115
+ /** This amount is `memory.peak` at the second reading, in bytes: the highest usage of the cgroup from its start. */
116
+ readonly peak: number | null;
117
+ /** This choice says that the peak rose between the two readings. The peak is then the peak of that time. */
118
+ readonly peakBetween: boolean | null;
119
+ };
120
+ /** This part is the traffic of each device and the sums. A device that came after the first reading counts from 0. */
121
+ readonly network: ResourceNetwork | null;
122
+ /** These are the counters that went down, for example `cpu.usage` after a restart of the container. */
123
+ readonly resets: readonly string[];
124
+ }
125
+ /** These are the options of a reader of the resources of a container. */
126
+ interface ResourceOptions {
127
+ /** This time is the period of a series, for example 1 s. Without it, the reader has no series. */
128
+ readonly period?: Quantity;
129
+ /** This list is the CPUs that the kernel puts the reader on, for example the CPUs of the client. Without it, the reader has no such limit. */
130
+ readonly cpuset?: string;
131
+ }
132
+ /**
133
+ * A resource reader reads the resources of one container from a sidecar. The sidecar is in the
134
+ * network namespace of the container and in the cgroup namespace of the host. It is not in the
135
+ * cgroup of the container, thus its own CPU time and memory are not in the readings.
136
+ */
137
+ interface ResourceReader {
138
+ /** These are the readings of the series, as they arrive. A reader with no period has none. */
139
+ readonly series: readonly ResourceReading[];
140
+ /**
141
+ * This method gives one reading at this moment. The stamps of the reading are the times of the
142
+ * read in the VM, thus the latency of the call is not in them.
143
+ */
144
+ read(): Promise<ResourceReading>;
145
+ /** This method stops the sidecar. The series keeps its readings. */
146
+ stop(): Promise<void>;
147
+ }
148
+ /** These are the fields of the `HostConfig` of the Docker API that hold the limits of a container. */
149
+ interface HostLimits {
150
+ /** This count is the CPU quota, in units of 1e-9 CPUs. */
151
+ NanoCpus?: number;
152
+ /** This list is the CPUs that the kernel puts the container on. */
153
+ CpusetCpus?: string;
154
+ /** This amount is the memory limit, in bytes. */
155
+ Memory?: number;
156
+ /** This amount is the limit of the memory and the swap together, in bytes. It is equal to `Memory`, thus the container has no swap. */
157
+ MemorySwap?: number;
158
+ }
159
+ /** This function gives the problems of the limits of a container, each as a sentence. Limits with no problem give an empty list. */
160
+ declare const limitsProblems: (limits: ContainerLimits) => string[];
161
+ /**
162
+ * This function gives the limits of a container as Docker takes them: the CPU quota, the CPUs and
163
+ * the memory, with no swap. It throws for limits that have a problem (`limitsProblems`).
164
+ */
165
+ declare const hostLimitsOf: (limits: ContainerLimits) => HostLimits;
166
+ /**
167
+ * This function gives the argv of the reader: one reading, or a series with a period. Each folder
168
+ * is a place where the cgroup of the container can be. The reader takes the first one that is there.
169
+ */
170
+ declare const resourceArgs: (dirs: readonly string[], period?: Quantity) => string[];
171
+ /** This function gives the count of a file of a cgroup that holds one count, as `memory.current` does. Another text gives null. */
172
+ declare const cgroupNumber: (text: string) => number | null;
173
+ /** This function gives a limit of a cgroup, as `memory.max` prints it: its count, or `max` for no limit. Another text gives null. */
174
+ declare const cgroupLimit: (text: string) => number | "max" | null;
175
+ /**
176
+ * This function gives the counts of a flat keyed file of a cgroup: one key and one count on each
177
+ * line. `cpu.stat` and `memory.stat` are such files. It skips each other line.
178
+ */
179
+ declare const cgroupKeyed: (text: string) => Readonly<Record<string, number>>;
180
+ /** This function reads `cpu.stat`. It gives null for a text with no usage. */
181
+ declare const cpuStatOf: (text: string) => ResourceCpu | null;
182
+ /** This function reads `memory.stat`: the amounts of `anon`, `file`, `kernel` and `sock`, each null without its key. */
183
+ declare const memoryStatOf: (text: string) => Pick<ResourceMemory, "anon" | "file" | "kernel" | "sock">;
184
+ /** This function reads `cpu.max`: the quota and the period, as `50000 100000` or `max 100000`. Another text gives null. */
185
+ declare const cpuMaxOf: (text: string) => ResourceLimits["cpu"];
186
+ /**
187
+ * This function reads `/proc/net/dev`: the bytes and the packets of each device, without `lo`. It
188
+ * gives null for a text that is not that file, and for a line of a device that it cannot read.
189
+ */
190
+ declare const networkOf: (text: string) => ResourceNetwork | null;
191
+ /**
192
+ * This function gives the reading of one line of the reader (`RESOURCES_EVENT`). It gives null for
193
+ * another line, and for a line with no stamps.
194
+ */
195
+ declare const resourceReadingOf: (line: ProbeEvent) => ResourceReading | null;
196
+ /**
197
+ * This function gives the reading of the output of one read of the reader. It throws for a text
198
+ * that is not a line of a reading.
199
+ */
200
+ declare const resourceReadingIn: (output: string) => ResourceReading;
201
+ /**
202
+ * This function gives what a container used between two readings. It gives its CPU time, the time
203
+ * that its CPU limit stopped it, the traffic of each device, and its last memory. A counter that
204
+ * went down is in `resets`, and its part is null. It throws when the second reading is the earlier one.
205
+ */
206
+ declare const resourceChange: (before: ResourceReading, after: ResourceReading) => ResourceChange;
4
207
  /**
5
208
  * A fault is a failure that the harness injects, by the name of its manifestation. Each name is
6
209
  * the last segment of the identifier of the manifestation in the corpus:
@@ -1141,9 +1344,27 @@ interface LoadPlan {
1141
1344
  readonly options: ScheduleOptions;
1142
1345
  }
1143
1346
  /**
1144
- * A load stream is one connection of the client `load`: its key, its schedule and its requests.
1145
- * Arrival i sends request i modulo the count of requests. Each stream has its own connection, thus
1146
- * a slow stream does not delay the arrivals of another stream.
1347
+ * Load connections tell how the client `load` sends the arrivals of one stream to the server.
1348
+ * - `pipeline` is the default. The stream has one connection, and each arrival goes at its time,
1349
+ * also when the replies before it are not in. The server can read the requests of a connection
1350
+ * one at a time, and one read can hold several requests.
1351
+ * - `pool` keeps `size` connections, each with one request in flight at most. A due arrival with no
1352
+ * idle connection waits for one. That wait is not a lag of the client.
1353
+ * - `fresh` opens a new connection for each arrival at its time, and closes it after the reply.
1354
+ * The time of the connect is not a lag of the client.
1355
+ */
1356
+ type LoadConnections = {
1357
+ readonly mode: "pipeline";
1358
+ } | {
1359
+ readonly mode: "pool";
1360
+ readonly size: number;
1361
+ } | {
1362
+ readonly mode: "fresh";
1363
+ };
1364
+ /**
1365
+ * A load stream is one stream of arrivals of the client `load`: its key, its schedule and its
1366
+ * requests. Arrival i sends request i modulo the count of requests. Each stream has its own
1367
+ * connections, thus a slow stream does not delay the arrivals of another stream.
1147
1368
  */
1148
1369
  interface LoadStream {
1149
1370
  /** This text names the stream in each line of the client (`k`). Two streams of a cell do not have the same key. */
@@ -1151,6 +1372,8 @@ interface LoadStream {
1151
1372
  readonly plan: LoadPlan;
1152
1373
  /** These texts are whole HTTP/1.1 requests, each with its head and its body. */
1153
1374
  readonly requests: readonly string[];
1375
+ /** These connections carry the arrivals of the stream. With no value, the stream is a pipeline on one connection. */
1376
+ readonly connections?: LoadConnections;
1154
1377
  }
1155
1378
  /** A run stream is the schedule that one stream of the client `load` had in a run. */
1156
1379
  interface RunStream {
@@ -1541,6 +1764,18 @@ interface Cell {
1541
1764
  * the container starts, and then it makes the file `/tmp/cgroup` in it.
1542
1765
  */
1543
1766
  readonly cgroup?: Readonly<Record<string, string>>;
1767
+ /**
1768
+ * These are the limits of the container of the client in each run: its CPU quota, its CPUs and its
1769
+ * memory. A measurement of the cost of a target puts the client on other CPUs than the target.
1770
+ * Without them, the client has no limit.
1771
+ */
1772
+ readonly clientLimits?: ContainerLimits;
1773
+ /**
1774
+ * These options start a reader of the resources of the target in each run (`Lab.resources`). The
1775
+ * run then keeps a reading when its client is ready, a reading at its end, and the series of the
1776
+ * reader (`Run.resources`). Without them, a run reads no resources.
1777
+ */
1778
+ readonly resources?: ResourceOptions;
1544
1779
  readonly prediction: Prediction;
1545
1780
  /** This side is the side whose detection the cell measures. Without it, the side is the client. */
1546
1781
  readonly observer?: Observer;
@@ -1664,6 +1899,7 @@ declare const isHopPlace: (place: FaultPlace | undefined) => place is HopPlace;
1664
1899
  * environments of the cell can operate. A value of the host is the same for each environment of the
1665
1900
  * host. Thus a cell with sysctls of the host operates one environment at a time. Otherwise, a lab
1666
1901
  * reads the value of a different lab as its value before, and the restore does not give back the host.
1902
+ * A bad value of the connections of a load stream is also a problem, before a lab opens.
1667
1903
  */
1668
1904
  declare const environmentProblems: (cell: Cell) => string[];
1669
1905
  /**
@@ -1764,6 +2000,19 @@ interface Run {
1764
2000
  readonly schedule?: Schedule;
1765
2001
  /** These schedules are the ones that the streams of the client `load` had. */
1766
2002
  readonly streams?: readonly RunStream[];
2003
+ /** These are the readings of the resources of the target in a run of a cell with `Cell.resources`. */
2004
+ readonly resources?: RunResources;
2005
+ }
2006
+ /**
2007
+ * These are the readings of the resources of the target in one run. The two readings bracket the
2008
+ * work of the run. The reading `start` comes after the client is ready and before it sends. The
2009
+ * reading `end` comes after the run ended. `resourceChange(start, end)` gives what the target used.
2010
+ */
2011
+ interface RunResources {
2012
+ readonly start: ResourceReading;
2013
+ readonly end: ResourceReading;
2014
+ /** These are the readings of the series of the reader, from its start to its stop. A reader with no period has none. */
2015
+ readonly series: readonly ResourceReading[];
1767
2016
  }
1768
2017
  /** A run route is one change of a route at a leaf of a fabric, on the monotonic clock. */
1769
2018
  interface RunRoute {
@@ -1895,4 +2144,4 @@ interface RunTopology {
1895
2144
  };
1896
2145
  }>>;
1897
2146
  }
1898
- export { MiddleboxEvent as $, HopEvent as A, RunGroup as At, KernelRecord as B, Stage as Bt, Fault as C, RequestPrediction as Ct, GroupPrediction as D, RunBackup as Dt, GroupPlace as E, Run as Et, HttpProbe as F, RunTopology as Ft, LoadPrediction as G, Toxic as Gt, LineMatch as H, Subject as Ht, ImageSource as I, SentinelEvent as It, MemoryOomPrediction as J, isHopPlace as Jt, LoadStream as K, WsProbe as Kt, Jitter as L, SentinelStage as Lt, HopSignal as M, RunPause as Mt, HopWrite as N, RunRoute as Nt, GroupRole as O, RunDrill as Ot, HostSysctl as P, RunStream as Pt, MemoryThrottlePrediction as Q, Kafka as R, Shipped as Rt, FabricManifest as S, Replies as St, Group as T, RttRange as Tt, LoadBand as U, Target as Ut, LineCount as V, StageBand as Vt, LoadPlan as W, Topology as Wt, MemoryPrediction as X, MemoryOomTask as Y, latestEndOf as Yt, MemoryStep as Z, DriverStep as _, Reconnects as _t, ClientCapability as a, PauseBand as at, EgressPrediction as b, ReplicaSet as bt, ClusterClientAt as c, PortsPrediction as ct, ContainerLimits as d, ProxyHop as dt, MiddleboxExpectation as et, CountBand as f, ProxyTime as ft, DriverBand as g, QueuePrediction as gt, DrillRoom as h, QueueEnd as ht, Client as i, Pair as it, HopPlace as j, RunPart as jt, Hop as k, RunFabric as kt, ClusterStage as l, Prediction as lt, Drill as m, QueueConnection as mt, CLIENT_CAPABILITIES as n, Observer as nt, ClientImage as o, PausePrediction as ot, DeliveryPrediction as p, QueueBand as pt, MemoryLimits as q, environmentProblems as qt, Cell as r, Outcomes as rt, Cluster as s, PinnedImage as st, BuildImage as t, MiddleboxForm as tt, ConntrackPrediction as u, ProbeEvent as ut, EgressBurst as v, Recovers as vt, FaultPlace as w, RouterHop as wt, Fabric as x, ReplicaSetStage as xt, EgressPacketLaw as y, Reference as yt, KafkaPause as z, ShippedImage as zt };
2147
+ export { MemoryThrottlePrediction as $, RESOURCES_EVENT as $t, HopEvent as A, RunFabric as At, KernelRecord as B, Shipped as Bt, Fault as C, resourceReadingOf as Cn, Replies as Ct, GroupPrediction as D, Run as Dt, GroupPlace as E, RttRange as Et, HttpProbe as F, RunRoute as Ft, LoadPlan as G, Target as Gt, LineMatch as H, Stage as Ht, ImageSource as I, RunStream as It, MemoryLimits as J, WsProbe as Jt, LoadPrediction as K, Topology as Kt, Jitter as L, RunTopology as Lt, HopSignal as M, RunPart as Mt, HopWrite as N, RunPause as Nt, GroupRole as O, RunBackup as Ot, HostSysctl as P, RunResources as Pt, MemoryStep as Q, HostLimits as Qt, Kafka as R, SentinelEvent as Rt, FabricManifest as S, resourceReadingIn as Sn, ReplicaSetStage as St, Group as T, RouterHop as Tt, LoadBand as U, StageBand as Ut, LineCount as V, ShippedImage as Vt, LoadConnections as W, Subject as Wt, MemoryOomTask as X, isHopPlace as Xt, MemoryOomPrediction as Y, environmentProblems as Yt, MemoryPrediction as Z, latestEndOf as Zt, DriverStep as _, limitsProblems as _n, QueuePrediction as _t, ClientCapability as a, ResourceMemory as an, Pair as at, EgressPrediction as b, resourceArgs as bn, Reference as bt, ClusterClientAt as c, ResourceReader as cn, PinnedImage as ct, ContainerLimits as d, cgroupKeyed as dn, ProbeEvent as dt, RESOURCES_PROGRAM as en, MiddleboxEvent as et, CountBand as f, cgroupLimit as fn, ProxyHop as ft, DriverBand as g, hostLimitsOf as gn, QueueEnd as gt, DrillRoom as h, cpuStatOf as hn, QueueConnection as ht, Client as i, ResourceLimits as in, Outcomes as it, HopPlace as j, RunGroup as jt, Hop as k, RunDrill as kt, ClusterStage as l, ResourceReading as ln, PortsPrediction as lt, Drill as m, cpuMaxOf as mn, QueueBand as mt, CLIENT_CAPABILITIES as n, ResourceCpu as nn, MiddleboxForm as nt, ClientImage as o, ResourceNetwork as on, PauseBand as ot, DeliveryPrediction as p, cgroupNumber as pn, ProxyTime as pt, LoadStream as q, Toxic as qt, Cell as r, ResourceDevice as rn, Observer as rt, Cluster as s, ResourceOptions as sn, PausePrediction as st, BuildImage as t, ResourceChange as tn, MiddleboxExpectation as tt, ConntrackPrediction as u, ResourceTraffic as un, Prediction as ut, EgressBurst as v, memoryStatOf as vn, Reconnects as vt, FaultPlace as w, RequestPrediction as wt, Fabric as x, resourceChange as xn, ReplicaSet as xt, EgressPacketLaw as y, networkOf as yn, Recovers as yt, KafkaPause as z, SentinelStage as zt };