@mark1russell7/harness 0.11.21 → 0.11.22
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 +2 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +7 -2
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -330,6 +330,8 @@ Each run starts from kernels that keep nothing from the run before it (`lab.forg
|
|
|
330
330
|
- **A driver band** (`measureDriver`, `driver.ts`). A driver with more than one socket names the socket of its band (`DriverBand.socket`).
|
|
331
331
|
- The band counts from its reference on that socket. It ends at a line of the client (`ends`), or at the report of the kernel on the socket.
|
|
332
332
|
- A band that a line ends is a timer of the driver. It counts from the last segment with data that the socket received or sent. The idle timer of a Node socket starts again at each read and each write of data.
|
|
333
|
+
- A band can name that segment as its reference (`last-data`). For example, an idle gRPC client goes to IDLE at a GOAWAY of its proxy. The idle timer of the proxy counts from the last data of the stream.
|
|
334
|
+
- A reference that this judge does not know (for example `ping-sent`) does not come. Thus its band is a finding. Before 0.11.22, such a reference counted from the first close of a socket of the peer. Through a proxy, that close can be the idle close of a socket toward the target.
|
|
333
335
|
- The MongoDB client is ready when its first write has its reply and its monitor streams. The monitor sends its first awaited hello `minHeartbeatFrequencyMS` (500 ms) after its first check. A fault before that hello meets the start of the stream, not the stream that a cell measures.
|
|
334
336
|
- Each later band (`then`) has its own reference and line. A later band outside its band, or absent, is a finding. So is a line that the prediction names as quiet, after the fault.
|
|
335
337
|
- For a silent prediction, a flow of an open socket of the driver that a router forgot is a finding.
|
package/build/index.d.ts
CHANGED
|
@@ -130,9 +130,12 @@ export declare const socketAt: (events: readonly ProbeEvent[], role: string, at:
|
|
|
130
130
|
* the driver. It counts from the last segment with data that the socket received or sent.
|
|
131
131
|
* - `request-sent`: the send of the operation into the fault, the second `sent` line.
|
|
132
132
|
* - `first-retransmission`: the first retransmission of the RTO timer on the socket.
|
|
133
|
+
* - `last-data`: the last segment with data that the socket received or sent before the fault
|
|
134
|
+
* held, for a band of the kernel too. An idle timer of a peer counts from the end of a stream.
|
|
133
135
|
* - `peer-closed`: the change of state of the socket of the target, when its process dies.
|
|
134
136
|
* - `fault`: the start of the commit of the fault. `client-start`: the `connecting` line.
|
|
135
137
|
* - `first-sent`: the first segment with data that the socket sends after the fault.
|
|
138
|
+
* A reference that this judge does not know (`ping-sent`) does not come: its band is a finding.
|
|
136
139
|
*/
|
|
137
140
|
export declare const referenceOf: (run: Run, from: Reference, role: string, data: boolean) => number | undefined;
|
|
138
141
|
/**
|
package/build/index.js
CHANGED
|
@@ -736,9 +736,12 @@ const outsetOf = (run) => {
|
|
|
736
736
|
* the driver. It counts from the last segment with data that the socket received or sent.
|
|
737
737
|
* - `request-sent`: the send of the operation into the fault, the second `sent` line.
|
|
738
738
|
* - `first-retransmission`: the first retransmission of the RTO timer on the socket.
|
|
739
|
+
* - `last-data`: the last segment with data that the socket received or sent before the fault
|
|
740
|
+
* held, for a band of the kernel too. An idle timer of a peer counts from the end of a stream.
|
|
739
741
|
* - `peer-closed`: the change of state of the socket of the target, when its process dies.
|
|
740
742
|
* - `fault`: the start of the commit of the fault. `client-start`: the `connecting` line.
|
|
741
743
|
* - `first-sent`: the first segment with data that the socket sends after the fault.
|
|
744
|
+
* A reference that this judge does not know (`ping-sent`) does not come: its band is a finding.
|
|
742
745
|
*/
|
|
743
746
|
const referenceOf = (run, from, role, data) => {
|
|
744
747
|
const ready = run.events.find((event) => event.ev === "ready");
|
|
@@ -748,8 +751,9 @@ const referenceOf = (run, from, role, data) => {
|
|
|
748
751
|
if (from === "request-sent") return run.events.filter((event) => event.ev === "sent")[1]?.t;
|
|
749
752
|
const { socket, place } = kernelOf(run, role, before);
|
|
750
753
|
if (place === void 0) return void 0;
|
|
751
|
-
if (from === "last-received") {
|
|
752
|
-
const
|
|
754
|
+
if (from === "last-received" || from === "last-data") {
|
|
755
|
+
const withData = data || from === "last-data";
|
|
756
|
+
const counts = (record) => withData ? (record.ev === "rx" || record.ev === "tx") && (record.seg?.len.value ?? 0) > 0 : record.ev === "rx";
|
|
753
757
|
return place.records.filter((record) => record.mono <= before && counts(record)).at(-1)?.mono;
|
|
754
758
|
}
|
|
755
759
|
if (from === "first-sent") return place.records.find((record) => record.ev === "tx" && record.mono > before && (record.seg?.len.value ?? 0) > 0)?.mono;
|
|
@@ -758,6 +762,7 @@ const referenceOf = (run, from, role, data) => {
|
|
|
758
762
|
const request = run.events.filter((event) => event.ev === "sent")[1]?.t ?? before;
|
|
759
763
|
return place.records.find((record) => record.ev === "retrans" && record.why === "rto" && record.mono > request)?.mono;
|
|
760
764
|
}
|
|
765
|
+
if (from !== "peer-closed") return void 0;
|
|
761
766
|
const closed = (socket === void 0 ? void 0 : peerPlace(run, socket.local))?.records.find((record) => record.ev === "state" && oldState$1(record) === 1)?.mono;
|
|
762
767
|
if (closed !== void 0 || run.topology === void 0) return closed;
|
|
763
768
|
return proxiedClose(run);
|