@mark1russell7/harness 0.11.6 → 0.11.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/build/{cell-lSCgFB54.d.ts → cell-7HFQIHlK.d.ts} +10 -3
- package/build/index.d.ts +9 -1
- package/build/index.js +13 -1
- package/build/index.js.map +1 -1
- package/build/schema.d.ts +1 -1
- package/image/hikari/ClientHikari.java +24 -8
- package/image/pg/client-pg.mjs +10 -6
- package/image/router/ctwatch.py +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,7 +51,9 @@ The element before a router reaches the networks after the router through it. It
|
|
|
51
51
|
|
|
52
52
|
A lookup treats an expired conntrack entry as gone, thus the router forgets a flow at its timeout, to the jiffy. The DESTROY event of the entry waits for the garbage collector or a list of the table. Thus `ctwatch.py` in the router lists the table each `pump` (`PUMP`, 0.1 s by default). A DESTROY then follows an expiry within the pump and two lists of the table.
|
|
53
53
|
|
|
54
|
-
`LISTING` (20 ms) is the longest list of the table that a prediction assumes. A longer list writes a `pump-slow` line, and a run with one near a detection by a timer of conntrack is void.
|
|
54
|
+
`LISTING` (20 ms) is the longest list of the table that a prediction assumes. A longer list writes a `pump-slow` line, and a run with one near a detection by a timer of conntrack is void. `PUMP_SLACK` (5 ms) is how late the pump can be after its interval and two lists. Its sleep can end late, and the read of the event takes time. Thus a DESTROY follows an expiry within the interval of the pump, two lists and that slack.
|
|
55
|
+
|
|
56
|
+
The `reset-both` form sends its resets on the DESTROY event. Each reset has the sequence number that its end expects. A raw sniffer reads it from the last acknowledgment of that end.
|
|
55
57
|
|
|
56
58
|
The lines of each router (`Lab.middlebox`) are the conntrack events and the resets that it sent, on CLOCK_MONOTONIC. Each run keeps the lines from its start to its end.
|
|
57
59
|
|
|
@@ -158,11 +160,12 @@ The harness ships eight images, each as a shipped source (`ImageSource`). The ta
|
|
|
158
160
|
- **The Node client image** (`image/node`) is a driver client: ioredis 6.0.0 on Node 24.21.0. The digest of the image and an npm lockfile pin them. `client-ioredis.mjs` prints the lines of the TCP client on the same clock, and it adds the status changes of ioredis as `status` lines. The same image holds the client of a group in Sentinel mode (`client-sentinel.mjs`) and the observer of its Sentinels (`observer.mjs`).
|
|
159
161
|
- **The Go HTTP image** (`image/go-http`) is the `http.Transport` of Go 1.27.2 at its defaults (`client-go`). The program uses the standard library only, thus the digest of the Go builder pins all of its code. The build does `gofmt` and `go vet` first. A wrapper on each connection writes what the read loop of the transport reads. The trace of the transport writes each try of a request.
|
|
160
162
|
- **The Node HTTP image** (`image/node-http`) holds the `http.Agent` of Node 24.21.0 (`client-agent.mjs`) and an HTTP/1.1 `Client` of undici 8.12.2 (`client-undici.mjs`). The digest of the image and an npm lockfile pin them. It is apart from the image of ioredis, thus the cells of ioredis keep their image.
|
|
161
|
-
- **The PostgreSQL client image** (`image/pg`) is node-postgres: pg 8.23.1 with pg-pool 3.14.0 on Node 24.21.0. The digest of the image and an npm lockfile pin them. `client-pg.mjs` makes one `pg.Pool` with the options of the cell (`Cell.driverOptions`), and it prints the lines of the TCP client on the same clock. The first query makes the connection, and the reply gives the client back to the pool, where it is idle. An error of the pool for that idle client is the detection of an idle cell. The probe is `{ driver: { name: "pg", query } }`, with `SELECT 1` as the query when the cell gives none.
|
|
162
|
-
-
|
|
163
|
+
- **The PostgreSQL client image** (`image/pg`) is node-postgres: pg 8.23.1 with pg-pool 3.14.0 on Node 24.21.0. The digest of the image and an npm lockfile pin them. `client-pg.mjs` makes one `pg.Pool` with the options of the cell (`Cell.driverOptions`), and it prints the lines of the TCP client on the same clock. The first query makes the connection, and the reply gives the client back to the pool, where it is idle. An error of the pool for that idle client is the detection of an idle cell. The probe is `{ driver: { name: "pg", query, inflight } }`, with `SELECT 1` as the query when the cell gives none.
|
|
164
|
+
- `inflight` is the text of the query in flight: the second query of an in-flight run. The first query then makes the pool ready at once, and only the query in flight is slow, for example `SELECT pg_sleep(20)`. The HikariCP client reads it too.
|
|
165
|
+
- **The HikariCP client image** (`image/hikari`) is HikariCP 7.1.0 over pgjdbc 42.7.13 on Temurin 21.0.12.1. The digests of the two stages and the SHA-256 of each jar pin them. The probe is `{ driver: { name: "hikari", query, inflight } }`.
|
|
163
166
|
- `ClientHikari.java` makes one `HikariDataSource` with the properties of the cell (`Cell.driverOptions`). A name with the prefix `dataSource.` is a property of pgjdbc.
|
|
164
167
|
- It prints the lines of the pg client on the same clock. Each socket comes from the `PGStream` of its connection, and a `pool` line gives each change of the counts of the pool. The errno of a failure is the SQLState of pgjdbc.
|
|
165
|
-
- Before its first line, it loads the classes of a connect and of a pool on the loopback of its namespace. It also starts the SecureRandom that HikariCP reads for the UUID of each new connection. A new JVM loads each class at its first use. Thus a
|
|
168
|
+
- Before its first line, it loads the classes of a connect and of a pool on the loopback of its namespace. It also starts the SecureRandom that HikariCP reads for the UUID of each new connection. Then it parses an ERROR of the server, as for the timeout of a statement. A new JVM loads each class at its first use. Thus a band does not time that load.
|
|
166
169
|
- **The MongoDB client image** (`image/mongo`) is the driver mongodb 7.7.0 on Node 24.21.0. The digest of the image and an npm lockfile pin them. `client-mongo.mjs` prints the lines of the TCP client on the same clock:
|
|
167
170
|
- Each socket of the driver is a `socket` line with its role: `monitor`, `rtt` or `pool`. The stack of the call that makes the socket gives the role.
|
|
168
171
|
- The events of the driver are `sdam` lines (the heartbeats and the changes of each server), `cmap` lines (the pools) and `command` lines (each try of an operation).
|
|
@@ -43,9 +43,10 @@ import { KernelRecord } from "@mark1russell7/prober";
|
|
|
43
43
|
* kernel stays up. `fin` stops the process with SIGKILL.
|
|
44
44
|
* - `planned-failover` asks a Sentinel for a failover: `SENTINEL FAILOVER <group>`.
|
|
45
45
|
*
|
|
46
|
-
* This fault is of an HTTP server:
|
|
46
|
+
* This fault is of an HTTP server or of PostgreSQL:
|
|
47
47
|
* - `app-stall` injects nothing. The server process holds the reply to the request, because the
|
|
48
|
-
* request asks for that
|
|
48
|
+
* request asks for that, while its kernel stays up. An HTTP request asks with `HttpProbe.hold`,
|
|
49
|
+
* and a query of PostgreSQL with its text, for example `SELECT pg_sleep(20)`.
|
|
49
50
|
*
|
|
50
51
|
* This fault is of a replica set (`Cell.replicaSet`):
|
|
51
52
|
* - `step-down` sends `replSetStepDown` to the primary, as a client sends a command.
|
|
@@ -756,6 +757,10 @@ interface Cell {
|
|
|
756
757
|
* - HikariCP over pgjdbc on Java, as a `HikariDataSource` against one server. Its operation is
|
|
757
758
|
* `query`, or `SELECT 1`. `Cell.driverOptions` are the properties of HikariConfig, and a name
|
|
758
759
|
* with the prefix `dataSource.` is a property of pgjdbc.
|
|
760
|
+
*
|
|
761
|
+
* A pg or hikari driver can send a different text in flight (`inflight`): the second query of
|
|
762
|
+
* an in-flight run. The first query then makes the pool ready at once, and only the query in
|
|
763
|
+
* flight is slow, for example `SELECT pg_sleep(20)`.
|
|
759
764
|
*/
|
|
760
765
|
readonly driver?: {
|
|
761
766
|
readonly name: "ioredis";
|
|
@@ -767,9 +772,11 @@ interface Cell {
|
|
|
767
772
|
} | {
|
|
768
773
|
readonly name: "pg";
|
|
769
774
|
readonly query?: string;
|
|
775
|
+
readonly inflight?: string;
|
|
770
776
|
} | {
|
|
771
777
|
readonly name: "hikari";
|
|
772
778
|
readonly query?: string;
|
|
779
|
+
readonly inflight?: string;
|
|
773
780
|
};
|
|
774
781
|
/** This workload is the workload of an HTTP client (`Cell.client` is an HTTP client). The client then ignores `keepalive` and `userTimeout`. */
|
|
775
782
|
readonly http?: HttpProbe;
|
|
@@ -1000,4 +1007,4 @@ interface RunTopology {
|
|
|
1000
1007
|
}
|
|
1001
1008
|
//#endregion
|
|
1002
1009
|
export { isHopPlace as $, Recovers as A, RunPart as B, Observer as C, ProxyHop as D, ProbeEvent as E, RequestPrediction as F, ShippedImage as G, SentinelEvent as H, RouterHop as I, Subject as J, Stage as K, RttRange as L, ReplicaSet as M, ReplicaSetStage as N, ProxyTime as O, Replies as P, WsProbe as Q, Run as R, MiddleboxForm as S, Prediction as T, SentinelStage as U, RunTopology as V, Shipped as W, Topology as X, Target as Y, Toxic as Z, ImageSource as _, DriverBand as a, MiddleboxEvent as b, FaultPlace as c, GroupPrediction as d, latestEndOf as et, GroupRole as f, HttpProbe as g, HopPlace as h, ClientImage as i, Reference as j, Reconnects as k, Group as l, Hop as m, Cell as n, DriverStep as o, HarnessImage as p, StageBand as q, Client as r, Fault as s, BuildImage as t, GroupPlace as u, KernelRecord as v, PinnedImage as w, MiddleboxExpectation as x, LineMatch as y, RunGroup as z };
|
|
1003
|
-
//# sourceMappingURL=cell-
|
|
1010
|
+
//# sourceMappingURL=cell-7HFQIHlK.d.ts.map
|
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as isHopPlace, A as Recovers, B as RunPart, C as Observer, D as ProxyHop, E as ProbeEvent, F as RequestPrediction, G as ShippedImage, H as SentinelEvent, I as RouterHop, J as Subject, K as Stage, L as RttRange, M as ReplicaSet, N as ReplicaSetStage, O as ProxyTime, P as Replies, Q as WsProbe, R as Run, S as MiddleboxForm, T as Prediction, U as SentinelStage, V as RunTopology, W as Shipped, X as Topology, Y as Target, Z as Toxic, _ as ImageSource, a as DriverBand, b as MiddleboxEvent, c as FaultPlace, d as GroupPrediction, et as latestEndOf, f as GroupRole, g as HttpProbe, h as HopPlace, i as ClientImage, j as Reference, k as Reconnects, l as Group, m as Hop, n as Cell, o as DriverStep, p as HarnessImage, q as StageBand, r as Client, s as Fault, t as BuildImage, u as GroupPlace, v as KernelRecord, w as PinnedImage, x as MiddleboxExpectation, y as LineMatch, z as RunGroup } from "./cell-
|
|
1
|
+
import { $ as isHopPlace, A as Recovers, B as RunPart, C as Observer, D as ProxyHop, E as ProbeEvent, F as RequestPrediction, G as ShippedImage, H as SentinelEvent, I as RouterHop, J as Subject, K as Stage, L as RttRange, M as ReplicaSet, N as ReplicaSetStage, O as ProxyTime, P as Replies, Q as WsProbe, R as Run, S as MiddleboxForm, T as Prediction, U as SentinelStage, V as RunTopology, W as Shipped, X as Topology, Y as Target, Z as Toxic, _ as ImageSource, a as DriverBand, b as MiddleboxEvent, c as FaultPlace, d as GroupPrediction, et as latestEndOf, f as GroupRole, g as HttpProbe, h as HopPlace, i as ClientImage, j as Reference, k as Reconnects, l as Group, m as Hop, n as Cell, o as DriverStep, p as HarnessImage, q as StageBand, r as Client, s as Fault, t as BuildImage, u as GroupPlace, v as KernelRecord, w as PinnedImage, x as MiddleboxExpectation, y as LineMatch, z as RunGroup } from "./cell-7HFQIHlK.js";
|
|
2
2
|
import { Quantity } from "@mark1russell7/quantity";
|
|
3
3
|
import "testcontainers";
|
|
4
4
|
//#region src/application.d.ts
|
|
@@ -656,6 +656,14 @@ export declare const PUMP: Quantity;
|
|
|
656
656
|
* longer listing writes a `pump-slow` line, and a run with one near its detection is void.
|
|
657
657
|
*/
|
|
658
658
|
export declare const LISTING: Quantity;
|
|
659
|
+
/**
|
|
660
|
+
* This time is how late the pump of a router can be beyond its interval and its two listings. The
|
|
661
|
+
* pump sleeps after each listing, and the sleep can end late. The watcher also reads and stamps each
|
|
662
|
+
* event within a millisecond. Thus a DESTROY follows an expiry within the interval of the pump, two
|
|
663
|
+
* listings and this slack. It is an assumption: in run 39116866471, two of 11 forgets came 1.6 ms
|
|
664
|
+
* and 2.2 ms after the pump and two listings.
|
|
665
|
+
*/
|
|
666
|
+
export declare const PUMP_SLACK: Quantity;
|
|
659
667
|
/**
|
|
660
668
|
* A network fault is a fault that the injector applies as a filter rule. It is a black hole (both
|
|
661
669
|
* directions, or one), or a reset on the next segment. It can also be an ICMP unreachable for each
|
package/build/index.js
CHANGED
|
@@ -1916,6 +1916,17 @@ const LISTING = {
|
|
|
1916
1916
|
value: 20,
|
|
1917
1917
|
unit: "ms"
|
|
1918
1918
|
};
|
|
1919
|
+
/**
|
|
1920
|
+
* This time is how late the pump of a router can be beyond its interval and its two listings. The
|
|
1921
|
+
* pump sleeps after each listing, and the sleep can end late. The watcher also reads and stamps each
|
|
1922
|
+
* event within a millisecond. Thus a DESTROY follows an expiry within the interval of the pump, two
|
|
1923
|
+
* listings and this slack. It is an assumption: in run 39116866471, two of 11 forgets came 1.6 ms
|
|
1924
|
+
* and 2.2 ms after the pump and two listings.
|
|
1925
|
+
*/
|
|
1926
|
+
const PUMP_SLACK = {
|
|
1927
|
+
value: 5,
|
|
1928
|
+
unit: "ms"
|
|
1929
|
+
};
|
|
1919
1930
|
/** This function gives the arguments of the injector for the options of a fault. */
|
|
1920
1931
|
const optionArgs = (options) => [
|
|
1921
1932
|
...options.direction === void 0 ? [] : ["--direction", options.direction],
|
|
@@ -4082,6 +4093,7 @@ const probeArgs = (cell, lab) => {
|
|
|
4082
4093
|
}
|
|
4083
4094
|
if (probe.driver?.name === "pg" || probe.driver?.name === "hikari") {
|
|
4084
4095
|
if (probe.driver.query !== void 0) args.push("--query", probe.driver.query);
|
|
4096
|
+
if (probe.driver.inflight !== void 0) args.push("--inflight-query", probe.driver.inflight);
|
|
4085
4097
|
if (cell.before === true) args.push("--before");
|
|
4086
4098
|
if (cell.driverOptions !== void 0) args.push("--options", JSON.stringify(cell.driverOptions));
|
|
4087
4099
|
args.push("--max-s", String(Math.ceil(longest * 2 + 10)));
|
|
@@ -4614,6 +4626,6 @@ const runCell = async (cell, say = () => {}) => {
|
|
|
4614
4626
|
}
|
|
4615
4627
|
};
|
|
4616
4628
|
//#endregion
|
|
4617
|
-
export { CLIENT_NAMES, CONVERGE_MS, INJECT, KEPT, LINGER_MS, LISTING, MEMBER_MARKS, NOISE, PINNED, PUMP, QUIET_MS, RELATIVE, REPLICA_SET_STAGES, REPOSITORY, SHIPPED_CLIENTS, SHIPPED_NAMES, STAGES, STATUS_SCRIPT, STEPS, STEP_DOWN, SUBJECTS, callOf, clockOffsetOf, closeOrExit, crossingsOf, cutOf, deadlineOf, delayVoids, deviceOf, dropFinding, dropOf, endpointAfter, errorsOf, exitOf, fieldOf, fieldsOf, firstUnanswered, goHttpImage, groupOnce, groupVerdictOf, harnessImage, hikariClientImage, hzOf, imageOf, imageProblems, inContext, infoOf, initiateScript, isHopPlace, judge, lagsOf, latestEndOf, leftAfter, matches, measure, measureDriver, measureGroup, medianInterval, memberCommand, memberConfig, memberLineOf, mongoClientImage, nodeClientImage, nodeHttpImage, noiseOf, onMonotonic, openGroupLab, openLab, openReplicaSetLab, peersOf, pgClientImage, pingsOf, planOf, proceduresImage, programLines, programOf, quantileOf, reconnectFinding, reconnectOf, referenceOf, reorderingOf, replicaSetArgs, replicaSetOnce, replicaSetStagesOf, requestOf, requestWords, routerImage, routesOf, runCell, sentinelConfig, socketAt, socketOf, socketsOf, spread, spreadOf, stagesOf, statusViewOf, subjectClient, subjectProblems, subscriptionsOf, targetImageOf, targetSourceOf, templated, toxicBody, unlockedManifests, unpinnedBases, verdictOf, viewOf, writesOf };
|
|
4629
|
+
export { CLIENT_NAMES, CONVERGE_MS, INJECT, KEPT, LINGER_MS, LISTING, MEMBER_MARKS, NOISE, PINNED, PUMP, PUMP_SLACK, QUIET_MS, RELATIVE, REPLICA_SET_STAGES, REPOSITORY, SHIPPED_CLIENTS, SHIPPED_NAMES, STAGES, STATUS_SCRIPT, STEPS, STEP_DOWN, SUBJECTS, callOf, clockOffsetOf, closeOrExit, crossingsOf, cutOf, deadlineOf, delayVoids, deviceOf, dropFinding, dropOf, endpointAfter, errorsOf, exitOf, fieldOf, fieldsOf, firstUnanswered, goHttpImage, groupOnce, groupVerdictOf, harnessImage, hikariClientImage, hzOf, imageOf, imageProblems, inContext, infoOf, initiateScript, isHopPlace, judge, lagsOf, latestEndOf, leftAfter, matches, measure, measureDriver, measureGroup, medianInterval, memberCommand, memberConfig, memberLineOf, mongoClientImage, nodeClientImage, nodeHttpImage, noiseOf, onMonotonic, openGroupLab, openLab, openReplicaSetLab, peersOf, pgClientImage, pingsOf, planOf, proceduresImage, programLines, programOf, quantileOf, reconnectFinding, reconnectOf, referenceOf, reorderingOf, replicaSetArgs, replicaSetOnce, replicaSetStagesOf, requestOf, requestWords, routerImage, routesOf, runCell, sentinelConfig, socketAt, socketOf, socketsOf, spread, spreadOf, stagesOf, statusViewOf, subjectClient, subjectProblems, subscriptionsOf, targetImageOf, targetSourceOf, templated, toxicBody, unlockedManifests, unpinnedBases, verdictOf, viewOf, writesOf };
|
|
4618
4630
|
|
|
4619
4631
|
//# sourceMappingURL=index.js.map
|