@mark1russell7/harness 0.14.4 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/build/{cell-DZm8zXN4.d.ts → cell-biffSiEJ.d.ts} +178 -4
- package/build/{image-EZ8ioZ3L.js → image-BxVTFZ1o.js} +23 -2
- package/build/image-BxVTFZ1o.js.map +1 -0
- package/build/index.d.ts +244 -5
- package/build/index.js +823 -28
- package/build/index.js.map +1 -1
- package/build/schema.d.ts +5 -2
- package/build/schema.js +7 -3
- package/build/schema.js.map +1 -1
- package/image/Dockerfile +3 -3
- package/image/kafka/AdminKafka.java +44 -9
- package/image/kafka/ConsumerKafka.java +359 -0
- package/image/kafka/Dockerfile +2 -2
- package/image/native/Cargo.toml +1 -1
- package/image/native/src/bin/client.rs +164 -28
- package/image/native/src/bin/ctfull.rs +633 -0
- package/image/native/src/bin/inject.rs +16 -0
- package/image/native/src/bin/load.rs +481 -0
- package/image/native/src/bin/ports.rs +1 -8
- package/image/native/src/bin/queue.rs +1 -12
- package/image/native/src/lib.rs +51 -0
- package/package.json +5 -2
- package/build/image-EZ8ioZ3L.js.map +0 -1
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as ProxyHop, A as ImageSource, At as Subject, B as LoadStream, C as Hop, Ct as RunTopology, D as HopWrite, Dt as ShippedImage, E as HopSignal, Et as Shipped, F as LineCount, Ft as isHopPlace, G as Outcomes, H as MiddleboxExpectation, I as LineMatch, It as latestEndOf, J as PausePrediction, K as Pair, L as LoadBand, M as Kafka, Mt as Topology, N as KafkaPause, Nt as Toxic, O as HostSysctl, Ot as Stage, P as KernelRecord, Pt as WsProbe, Q as ProbeEvent, R as LoadPlan, S as GroupRole, St as RunStream, T as HopPlace, Tt as SentinelStage, U as MiddleboxForm, V as MiddleboxEvent, W as Observer, X as PortsPrediction, Y as PinnedImage, Z as Prediction, _ as Fault, _t as RunFabric, a as ClientCapability, at as Reconnects, b as GroupPlace, bt as RunPause, c as ClusterClientAt, ct as ReplicaSet, d as CountBand, dt as RequestPrediction, et as ProxyTime, f as Drill, ft as RouterHop, g as FabricManifest, gt as RunDrill, h as Fabric, ht as RunBackup, i as Client, it as QueuePrediction, j as Jitter, jt as Target, k as HttpProbe, kt as StageBand, l as ClusterStage, lt as ReplicaSetStage, m as DriverStep, mt as Run, n as CLIENT_CAPABILITIES, nt as QueueConnection, o as ClientImage, ot as Recovers, p as DriverBand, pt as RttRange, q as PauseBand, r as Cell, rt as QueueEnd, s as Cluster, st as Reference, t as BuildImage, tt as QueueBand, u as ConntrackPrediction, ut as Replies, v as FaultPlace, vt as RunGroup, w as HopEvent, wt as SentinelEvent, x as GroupPrediction, xt as RunRoute, y as Group, yt as RunPart, z as LoadPrediction } from "./cell-biffSiEJ.js";
|
|
2
2
|
import { Quantity } from "@mark1russell7/quantity";
|
|
3
|
+
import { LoadMeasure, Schedule } from "@mark1russell7/rigor-chaos";
|
|
3
4
|
import { StartedTestContainer } from "testcontainers";
|
|
4
5
|
//#region src/application.d.ts
|
|
5
6
|
/**
|
|
@@ -135,6 +136,95 @@ interface CallReading {
|
|
|
135
136
|
/** This function reads the call that the client sent into the fault: its `call-error` or `data` line after the request. */
|
|
136
137
|
export declare const callOf: (events: readonly ProbeEvent[], request: ProbeEvent, detected: number | undefined) => CallReading;
|
|
137
138
|
//#endregion
|
|
139
|
+
//#region src/load.d.ts
|
|
140
|
+
/**
|
|
141
|
+
* The measure and the verdict of an open-loop cell (SYS-68). A client on a schedule sends each
|
|
142
|
+
* arrival at its time, thus a stall counts in each arrival that it delayed. The package rigor-chaos
|
|
143
|
+
* counts each latency from the planned time. The package rigor-bench judges a quantile by a
|
|
144
|
+
* distribution-free interval.
|
|
145
|
+
*/
|
|
146
|
+
/** This path is where the client of an open-loop cell finds its schedule. */
|
|
147
|
+
export declare const SCHEDULE_PATH = "/tmp/schedule.json";
|
|
148
|
+
/**
|
|
149
|
+
* This function gives the measure of one run of a schedule from the lines of its client. It gives
|
|
150
|
+
* null when the client did not start the schedule. The first `sent` line of a client is its request
|
|
151
|
+
* before `ready`, and it names no arrival. The end of the run is its last line.
|
|
152
|
+
*/
|
|
153
|
+
export declare const loadOf: (events: readonly ProbeEvent[], plan: Schedule) => RunLoad | null;
|
|
154
|
+
/**
|
|
155
|
+
* A run load is the measure of one run of a schedule. `failed` counts the replies with a status
|
|
156
|
+
* outside 200 to 299. Such a reply is a completion, thus its time is in `latency`. The client
|
|
157
|
+
* `schedule` gives no status, and a record from before this field has none: both read as 0.
|
|
158
|
+
*/
|
|
159
|
+
type RunLoad = LoadMeasure & {
|
|
160
|
+
readonly failed?: number;
|
|
161
|
+
};
|
|
162
|
+
/** This path is where the client `load` finds its plan. */
|
|
163
|
+
export declare const LOAD_PATH = "/tmp/load.json";
|
|
164
|
+
/** This text is the format of the plan of the client `load`. */
|
|
165
|
+
export declare const LOAD_FORMAT = "systems-load/1";
|
|
166
|
+
/**
|
|
167
|
+
* This function gives the schedule of each stream of a cell, and the text of the plan of the client
|
|
168
|
+
* `load`. It throws for no stream, for two streams with one key and for a stream with no request.
|
|
169
|
+
*/
|
|
170
|
+
export declare const loadPlanOf: (streams: readonly LoadStream[]) => {
|
|
171
|
+
readonly streams: readonly RunStream[];
|
|
172
|
+
readonly content: string;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* This function gives the measure of each stream of a run of the client `load`, and their pool. Each
|
|
176
|
+
* stream counts its arrivals from 0, thus the lines of a stream are the lines with its key. The pool
|
|
177
|
+
* sums the counts and joins the times, in the order of the streams. It gives null when the client did
|
|
178
|
+
* not start its schedule.
|
|
179
|
+
*/
|
|
180
|
+
export declare const streamsLoadOf: (events: readonly ProbeEvent[], streams: readonly RunStream[]) => {
|
|
181
|
+
readonly pool: RunLoad;
|
|
182
|
+
readonly streams: Readonly<Record<string, RunLoad>>;
|
|
183
|
+
} | null;
|
|
184
|
+
/** A load spread is a part of the distribution of one measure of an open-loop cell, over its counted runs. */
|
|
185
|
+
interface LoadSpread {
|
|
186
|
+
readonly p50: Quantity;
|
|
187
|
+
readonly p99: Quantity;
|
|
188
|
+
readonly max: Quantity;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* A load verdict sums the schedule of an open-loop cell over its counted runs. `latency` counts from
|
|
192
|
+
* the planned time, and `service` counts from the send: the measure of a closed-loop driver. Each
|
|
193
|
+
* arrival with no reply counts in `latency` at its age at the end of its run, a lower bound.
|
|
194
|
+
*/
|
|
195
|
+
interface LoadVerdict {
|
|
196
|
+
readonly planned: number;
|
|
197
|
+
readonly unsent: number;
|
|
198
|
+
readonly unfinished: number;
|
|
199
|
+
/** This count is the replies with a status of a failure, over the counted runs. */
|
|
200
|
+
readonly failed: number;
|
|
201
|
+
readonly latency: LoadSpread | null;
|
|
202
|
+
readonly service: LoadSpread | null;
|
|
203
|
+
readonly lag: LoadSpread | null;
|
|
204
|
+
/** This text is the verdict of each band, in the order of the prediction. */
|
|
205
|
+
readonly bands: readonly string[];
|
|
206
|
+
/** This text is the verdict of the share of failed arrivals, when the prediction has a limit on it. */
|
|
207
|
+
readonly failures?: string;
|
|
208
|
+
}
|
|
209
|
+
/** This record is what the verdict of a cell takes from its load: the runs that broke the schedule, and the sum. */
|
|
210
|
+
interface LoadJudgement {
|
|
211
|
+
readonly holds: boolean;
|
|
212
|
+
readonly outside: ReadonlyArray<{
|
|
213
|
+
readonly run: string;
|
|
214
|
+
readonly why: string;
|
|
215
|
+
}>;
|
|
216
|
+
readonly load: LoadVerdict;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* This function judges the load of an open-loop cell over its counted runs. A run that did not keep
|
|
220
|
+
* its schedule measures its driver, not the target, thus it is a finding of that run. Each
|
|
221
|
+
* band reads all the arrivals of the counted runs.
|
|
222
|
+
*/
|
|
223
|
+
export declare const loadVerdict: (prediction: LoadPrediction, runs: ReadonlyArray<{
|
|
224
|
+
readonly name: string;
|
|
225
|
+
readonly load: RunLoad | undefined;
|
|
226
|
+
}>) => LoadJudgement;
|
|
227
|
+
//#endregion
|
|
138
228
|
//#region src/driver.d.ts
|
|
139
229
|
/**
|
|
140
230
|
* This module measures a run of a cell whose client is a driver with more than one socket, for
|
|
@@ -204,6 +294,103 @@ export declare const referenceOf: (run: Run, from: Reference, role: string, data
|
|
|
204
294
|
*/
|
|
205
295
|
export declare const measureDriver: (cell: Cell, run: Run) => Measured;
|
|
206
296
|
//#endregion
|
|
297
|
+
//#region src/conntrack.d.ts
|
|
298
|
+
/** This record is the end of a connect that found no entry at its start. */
|
|
299
|
+
interface StallReading {
|
|
300
|
+
readonly errno: string;
|
|
301
|
+
readonly time: Quantity;
|
|
302
|
+
/** This count is the rise of the field `drop` of the conntrack statistics during the connect. */
|
|
303
|
+
readonly drops: number;
|
|
304
|
+
/** This count is the rise of `TCPRetransFail` during the connect. */
|
|
305
|
+
readonly retransFail: number;
|
|
306
|
+
}
|
|
307
|
+
/** This record is what a run of a conntrack cell measured. */
|
|
308
|
+
interface ConntrackReading {
|
|
309
|
+
/** This count is the flows that the client holds at its `full` line. */
|
|
310
|
+
readonly flows: number;
|
|
311
|
+
/** This count is what the namespace of the client reads at that line. */
|
|
312
|
+
readonly count: number;
|
|
313
|
+
/** This count is what the namespace of the target reads while the client holds its flows. */
|
|
314
|
+
readonly neighbor: number | null;
|
|
315
|
+
readonly stall: StallReading | null;
|
|
316
|
+
/** This time is from the `closing` line to the first fall of the count. */
|
|
317
|
+
readonly firstFall: Quantity | null;
|
|
318
|
+
/** This time is from the `closing` line to the zero of the count. */
|
|
319
|
+
readonly zero: Quantity | null;
|
|
320
|
+
/** This count is what the namespace reads after each side closes. */
|
|
321
|
+
readonly closed: number | null;
|
|
322
|
+
/** This count is the lowest that the poll of the count read. */
|
|
323
|
+
readonly lowest: number | null;
|
|
324
|
+
/** This count is what the namespace reads after a connect that got a slot. */
|
|
325
|
+
readonly after: number | null;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* This function reads one run of a conntrack cell from the lines of its client and its target. An
|
|
329
|
+
* `unsettled` line makes the run void. The entries of the run before it were still in the table, thus
|
|
330
|
+
* the run did not start from an empty table.
|
|
331
|
+
*/
|
|
332
|
+
export declare const measureConntrack: (run: Run, expected: ConntrackPrediction) => Measured;
|
|
333
|
+
//#endregion
|
|
334
|
+
//#region src/pause.d.ts
|
|
335
|
+
/**
|
|
336
|
+
* This module reads one run of a paused consumer against its law. Two members of a group each hold
|
|
337
|
+
* one partition. A SIGSTOP stops the first member while it holds a batch, and a SIGCONT ends that
|
|
338
|
+
* stop. Three sources give the reading: the lines of each member, the log lines of the brokers, and
|
|
339
|
+
* the stamps of the injector.
|
|
340
|
+
*
|
|
341
|
+
* The broker writes its log on the clock of the wall, and the members and the injector use the
|
|
342
|
+
* monotonic clock. The `start` line of a member has both clocks, thus it converts a log line.
|
|
343
|
+
*/
|
|
344
|
+
/** A commit reading is the first commit of the stopped member after the stop. */
|
|
345
|
+
interface PauseCommit {
|
|
346
|
+
readonly acked: boolean;
|
|
347
|
+
/** This name is the class of the error of the commit. It is null for a commit that the broker acknowledged. */
|
|
348
|
+
readonly name: string | null;
|
|
349
|
+
readonly message: string | null;
|
|
350
|
+
/** This number is the epoch that the member held at the commit. */
|
|
351
|
+
readonly epoch: number | null;
|
|
352
|
+
}
|
|
353
|
+
/** A pause reading is what one run of a paused consumer measured. Each offset is the next offset to read, as a commit names it. */
|
|
354
|
+
interface PauseReading {
|
|
355
|
+
/** This number is the partition of the stopped member before the stop. */
|
|
356
|
+
readonly partition: number;
|
|
357
|
+
/** This time is from the stop to the log line of the broker that removes the member. It is null when no such line came. */
|
|
358
|
+
readonly fence: Quantity | null;
|
|
359
|
+
/** This time is from the stop to the first report of the partition by the other member. It is null when no report came. */
|
|
360
|
+
readonly takeover: Quantity | null;
|
|
361
|
+
readonly commit: PauseCommit | null;
|
|
362
|
+
/** This number is the epoch at the last acknowledged commit before the stop. */
|
|
363
|
+
readonly epochBefore: number | null;
|
|
364
|
+
/** This offset is the last acknowledged commit of the stopped member before the stop. */
|
|
365
|
+
readonly lastAck: number;
|
|
366
|
+
/** This offset is the first offset of the partition that the other member read after the stop. */
|
|
367
|
+
readonly otherFirst: number | null;
|
|
368
|
+
/** This offset is the last acknowledged commit of the other member on the partition, before the commit of the stopped member. */
|
|
369
|
+
readonly otherLast: number | null;
|
|
370
|
+
/** This time is from the end of the stop to the new epoch of the member. It is null when no new epoch came. */
|
|
371
|
+
readonly rejoin: Quantity | null;
|
|
372
|
+
/** This value tells if the stopped member reported the partition again between the end of the stop and its commit. */
|
|
373
|
+
readonly reassigned: boolean;
|
|
374
|
+
/** This offset is the committed offset that the member read after its commit. */
|
|
375
|
+
readonly committed: number | null;
|
|
376
|
+
/** This offset is what the first commit after the stop names for the partition. */
|
|
377
|
+
readonly stale: number | null;
|
|
378
|
+
}
|
|
379
|
+
/** This function gives the time of a log line on the monotonic clock of a member, in ns, from the `start` line of that member. It is null for a line with no stamp. */
|
|
380
|
+
export declare const logTimeOf: (line: string, start: ProbeEvent) => number | null;
|
|
381
|
+
/**
|
|
382
|
+
* This function tells if the two members can take the fault. Each member holds one partition, the
|
|
383
|
+
* two partitions differ, and the first member has two acknowledged commits on its partition after its
|
|
384
|
+
* last change. Thus the first member reads and commits at a steady rate.
|
|
385
|
+
*/
|
|
386
|
+
export declare const pauseReady: (first: readonly ProbeEvent[], other: readonly ProbeEvent[]) => boolean;
|
|
387
|
+
/** This function tells if a log line of a broker tells that a member left a group, under either protocol. */
|
|
388
|
+
export declare const isFenceLine: (line: string) => boolean;
|
|
389
|
+
/** This function tells if a fence line names a group. The two protocols write the name in different words. */
|
|
390
|
+
export declare const namesGroup: (line: string, group: string) => boolean;
|
|
391
|
+
/** This function reads one run of a paused consumer against its law. */
|
|
392
|
+
export declare const measurePause: (run: Run, prediction: PausePrediction) => Measured;
|
|
393
|
+
//#endregion
|
|
207
394
|
//#region src/recovery.d.ts
|
|
208
395
|
/**
|
|
209
396
|
* This module holds the pure parts of a recovery drill. These are the scripts of the shell, the reader
|
|
@@ -596,6 +783,8 @@ interface Verdict {
|
|
|
596
783
|
readonly slowest?: Quantity;
|
|
597
784
|
/** This record is the sum of what reordering did in each counted run of a measurement-only cell. */
|
|
598
785
|
readonly reordering?: Reordering;
|
|
786
|
+
/** This record is the load of an open-loop cell over its counted runs. */
|
|
787
|
+
readonly load?: LoadVerdict;
|
|
599
788
|
/** This record is the time of the proxy of a calibration cell, in each direction. */
|
|
600
789
|
readonly proxy?: {
|
|
601
790
|
readonly hop: string;
|
|
@@ -783,6 +972,8 @@ interface Measured {
|
|
|
783
972
|
* sample is the time from its send to the first data after it.
|
|
784
973
|
*/
|
|
785
974
|
readonly samples?: readonly Quantity[];
|
|
975
|
+
/** This measure is the run of an open-loop cell against its schedule (`Run.schedule`), with its failed replies. Its times are in ms. */
|
|
976
|
+
readonly load?: RunLoad;
|
|
786
977
|
/** This count is the number of keepalive probes that the kernel sent. */
|
|
787
978
|
readonly probes: number;
|
|
788
979
|
/** This count is the number of segments that the kernel sent again. */
|
|
@@ -811,6 +1002,8 @@ interface Measured {
|
|
|
811
1002
|
readonly queue?: QueueReading;
|
|
812
1003
|
/** This record is what a run of a port cell measured: the count of each search, and when each port came back. */
|
|
813
1004
|
readonly ports?: PortsReading;
|
|
1005
|
+
/** This record is what a run of a conntrack cell measured: the flows, the count, and when a slot came back. */
|
|
1006
|
+
readonly conntrack?: ConntrackReading;
|
|
814
1007
|
/** This record is what the second request of an HTTP client met, for a cell whose prediction says it. */
|
|
815
1008
|
readonly request?: RequestReading | null;
|
|
816
1009
|
/** This record is the time of each later band of a driver cell (`DriverBand.then`). */
|
|
@@ -839,6 +1032,8 @@ interface Measured {
|
|
|
839
1032
|
* reader can check each pairing of the run again.
|
|
840
1033
|
*/
|
|
841
1034
|
readonly pairing?: Pairing;
|
|
1035
|
+
/** This record is what a run of a paused consumer measured. */
|
|
1036
|
+
readonly pause?: PauseReading;
|
|
842
1037
|
/** This text is the reason that the run cannot count, or null. A void run is not a pass and not a finding. */
|
|
843
1038
|
readonly void: string | null;
|
|
844
1039
|
/** This text tells what in the run disagrees with the prediction, other than its timing, or null. */
|
|
@@ -1363,6 +1558,14 @@ interface ManifestHop {
|
|
|
1363
1558
|
/** These are the sysctls of the namespace of the hop, as read back after the harness set them. */
|
|
1364
1559
|
readonly sysctls: Readonly<Record<string, string>>;
|
|
1365
1560
|
}
|
|
1561
|
+
/** This record is one sysctl of the host for one environment, as the harness read it. */
|
|
1562
|
+
interface HostSetting {
|
|
1563
|
+
readonly name: string;
|
|
1564
|
+
readonly before: string;
|
|
1565
|
+
readonly set: string;
|
|
1566
|
+
/** This value is the read after the restore. It is null until the restore. */
|
|
1567
|
+
readonly restored: string | null;
|
|
1568
|
+
}
|
|
1366
1569
|
/** A manifest is what a lab records about its machine, its images and its settings. */
|
|
1367
1570
|
interface Manifest {
|
|
1368
1571
|
readonly kernel: string;
|
|
@@ -1416,6 +1619,7 @@ interface Manifest {
|
|
|
1416
1619
|
readonly client: {
|
|
1417
1620
|
readonly kind: Client | "image";
|
|
1418
1621
|
readonly image: string;
|
|
1622
|
+
readonly capabilities?: readonly ClientCapability[];
|
|
1419
1623
|
readonly source?: ImageSource;
|
|
1420
1624
|
readonly build?: BuildRecord;
|
|
1421
1625
|
};
|
|
@@ -1427,6 +1631,8 @@ interface Manifest {
|
|
|
1427
1631
|
};
|
|
1428
1632
|
/** These are the sysctls of the client namespace, as read back after the harness set them. */
|
|
1429
1633
|
readonly sysctls: Readonly<Record<string, string>>;
|
|
1634
|
+
/** These are the sysctls of the host that the cell set: each value before, as set, and as restored. */
|
|
1635
|
+
readonly host?: readonly HostSetting[];
|
|
1430
1636
|
/** These are the hops of a topology, in sequence from the client. */
|
|
1431
1637
|
readonly hops?: readonly ManifestHop[];
|
|
1432
1638
|
/** These are the parts of a group, with their settings as each part read them back. */
|
|
@@ -1536,6 +1742,12 @@ interface Lab {
|
|
|
1536
1742
|
configure(values: Readonly<Record<string, string>>): Promise<Record<string, string>>;
|
|
1537
1743
|
/** This method sets the sysctls of the target namespace through a privileged sidecar there, and reads them back. */
|
|
1538
1744
|
targetSysctl(values: Readonly<Record<string, string>>): Promise<Record<string, string>>;
|
|
1745
|
+
/** This method runs each command in the namespace of the client and in the namespace of the target. */
|
|
1746
|
+
namespaceSetup(commands: readonly (readonly string[])[]): Promise<void>;
|
|
1747
|
+
/** This method sets sysctls of the host through a privileged sidecar on the network of the host, and reads them back. */
|
|
1748
|
+
hostSysctl(settings: readonly HostSysctl[]): Promise<void>;
|
|
1749
|
+
/** This method puts back each value that `hostSysctl` changed, once, and gives the record of each. Closing the lab also does it. */
|
|
1750
|
+
restoreHost(): Promise<readonly HostSetting[]>;
|
|
1539
1751
|
/**
|
|
1540
1752
|
* This method applies a fault between the client and the target, by default from the namespace
|
|
1541
1753
|
* of the target. The fault is a black hole, or a reset that answers the next segment of the
|
|
@@ -1613,7 +1825,11 @@ interface Lab {
|
|
|
1613
1825
|
t0: number;
|
|
1614
1826
|
t1: number;
|
|
1615
1827
|
} | null>;
|
|
1616
|
-
|
|
1828
|
+
/** This method starts the client with `args`. Each file is in its container before it starts. */
|
|
1829
|
+
probe(args: readonly string[], files?: ReadonlyArray<{
|
|
1830
|
+
readonly content: string;
|
|
1831
|
+
readonly target: string;
|
|
1832
|
+
}>): Promise<Probe>;
|
|
1617
1833
|
/**
|
|
1618
1834
|
* This method waits for the next clock line of the prober, which gives the count of lost
|
|
1619
1835
|
* records. It gives null when no clock line comes in 5 s, because then nothing tells the count.
|
|
@@ -2308,6 +2524,11 @@ export declare const kafkaCutOf: (kafka: Kafka, members: Readonly<Record<string,
|
|
|
2308
2524
|
export declare const bootstrapOf: (kafka: Kafka) => string;
|
|
2309
2525
|
/** This function gives the name of the topic of a run. A warm-up has the index -1. */
|
|
2310
2526
|
export declare const topicOf: (environment: number, index: number) => string;
|
|
2527
|
+
/** A Kafka member is one member of a consumer group. A signal goes from a sidecar in its process namespace. */
|
|
2528
|
+
interface KafkaMember extends GroupClient {
|
|
2529
|
+
/** This method sends a signal to the process of the member, at once or at an instant of the VM. The injector stamps it. */
|
|
2530
|
+
signal(signal: "STOP" | "CONT", at?: number): Promise<Stamp>;
|
|
2531
|
+
}
|
|
2311
2532
|
/** A Kafka lab is one environment of a Kafka cell. */
|
|
2312
2533
|
interface KafkaLab {
|
|
2313
2534
|
readonly kafka: Kafka;
|
|
@@ -2325,8 +2546,14 @@ interface KafkaLab {
|
|
|
2325
2546
|
sysctl(values: Readonly<Record<string, string>>): Promise<Record<string, string>>;
|
|
2326
2547
|
/** This method waits until each broker is not fenced. */
|
|
2327
2548
|
brokersUp(within?: number): Promise<void>;
|
|
2328
|
-
/**
|
|
2329
|
-
|
|
2549
|
+
/** These are the log lines of the brokers that tell that a member left a group (`isFenceLine`), in sequence. */
|
|
2550
|
+
readonly fences: readonly string[];
|
|
2551
|
+
/** This method makes the topic of a run, with one partition or more. */
|
|
2552
|
+
create(topic: string, partitions?: number): Promise<void>;
|
|
2553
|
+
/** This method writes `count` records in each partition of a topic, each acknowledged by each in-sync replica. */
|
|
2554
|
+
fill(topic: string, partitions: number, count: number): Promise<void>;
|
|
2555
|
+
/** This method starts one member of a consumer group, with the arguments of `ConsumerKafka` after the bootstrap. */
|
|
2556
|
+
consumer(args: readonly string[]): Promise<KafkaMember>;
|
|
2330
2557
|
/** This method waits until the partition is whole and calm, and gives the name of the broker of its leader. */
|
|
2331
2558
|
converge(topic: string, within?: number): Promise<string>;
|
|
2332
2559
|
/** This method gives the sequence numbers that the partition holds, one entry for each copy. */
|
|
@@ -2373,6 +2600,18 @@ export declare const kafkaArgs: (cell: Cell, topic: string) => string[];
|
|
|
2373
2600
|
* the whole partition, thus the record tells which writes the group kept.
|
|
2374
2601
|
*/
|
|
2375
2602
|
export declare const kafkaOnce: (lab: KafkaLab, cell: Cell, environment: number, index: number) => Promise<Run>;
|
|
2603
|
+
/**
|
|
2604
|
+
* This function does one run of a paused consumer:
|
|
2605
|
+
* - The topic of the run has two partitions, each with records that a run does not finish.
|
|
2606
|
+
* - Two members join one group, and the run waits until each member holds one partition and the
|
|
2607
|
+
* first member has two commits on its partition.
|
|
2608
|
+
* - A SIGSTOP stops the first member while it holds its next batch, and a SIGCONT ends the stop
|
|
2609
|
+
* after the hold of the cell. The run then waits for the tail.
|
|
2610
|
+
*
|
|
2611
|
+
* The fault is null when the members did not get one partition each. The measure then voids the run.
|
|
2612
|
+
* The law reads no kernel record, thus a lost record does not void this run.
|
|
2613
|
+
*/
|
|
2614
|
+
export declare const kafkaPauseOnce: (lab: KafkaLab, cell: Cell, environment: number, index: number) => Promise<Run>;
|
|
2376
2615
|
//#endregion
|
|
2377
2616
|
//#region src/run.d.ts
|
|
2378
2617
|
/** A cell result is a cell with its manifests, its runs, their measurements and its verdict. */
|
|
@@ -2422,5 +2661,5 @@ export declare const spread: (runs: number, environments: number) => number[];
|
|
|
2422
2661
|
*/
|
|
2423
2662
|
export declare const runCell: (cell: Cell, say?: (line: string) => void) => Promise<CellResult>;
|
|
2424
2663
|
//#endregion
|
|
2425
|
-
export { type Agent, type BuildImage, type BuildRecord, type CallReading, type Cell, type CellResult, type Client, type ClientImage, type ClockPair, type Cloud, type Cluster, type ClusterClientAt, type ClusterLab, type ClusterStage, type ContextFile, type CountBand, type Crossings, type Cut, type Decision, type Drill, type DriverBand, type DriverSocket, type DriverStep, type DriverStepTime, type ErrorOnTheWay, type Fabric, type FabricLab, type FabricManifest, type FabricParts, type Fault, 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 HttpProbe, type ImagePlan, type ImageSource, type Interval, type Jitter, type Kafka, type KafkaLab, type KernelRecord, type Lab, type Layer, type LeafViews, type LineCount, type LineMatch, type Manifest, type ManifestHop, type Measured, type MemberLine, 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 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 RunFabric, type RunGroup, type RunPart, type RunRoute, type RunTopology, type SentinelEvent, type SentinelStage, type Shipped, type ShippedImage, type Sibling, type SocketPlace, type Spread, type Stage, type StageBand, type StageVerdict, type Stamp, type Status, type StatusRow, type Subject, type Substrate, type SubstrateSource, type Target, type Topology, type Toxic, type Verdict, type WallStamp, type Writes, type WsProbe, isHopPlace, latestEndOf };
|
|
2664
|
+
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 Drill, type DriverBand, type DriverSocket, type DriverStep, type DriverStepTime, type ErrorOnTheWay, type Fabric, type FabricLab, type FabricManifest, type FabricParts, type Fault, 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 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 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 Topology, type Toxic, type Verdict, type WallStamp, type Writes, type WsProbe, isHopPlace, latestEndOf };
|
|
2426
2665
|
//# sourceMappingURL=index.d.ts.map
|