fix(web-probe): aggregate numeric sse flush replacements
This commit is contained in:
@@ -119,12 +119,13 @@ async function writeState(): Promise<string> {
|
||||
traceId: "trc_webperf_fixture",
|
||||
sessionIdHash: "sha256:session",
|
||||
eventCount: 12,
|
||||
deliveredCount: 10,
|
||||
chunkCount: 3,
|
||||
flushDurationMs: 18.75,
|
||||
droppedCount: 2,
|
||||
maxItemsPerChunk: 5,
|
||||
maxChunkMs: 7.5,
|
||||
replacedByKey: true,
|
||||
replacedByKey: 3,
|
||||
valuesRedacted: true,
|
||||
}],
|
||||
valuesRedacted: true,
|
||||
@@ -181,9 +182,10 @@ test("analyzer and performance-summary include bounded web-performance runtime d
|
||||
assert.equal(groups[0].reason, "sse_flush");
|
||||
assert.equal(groups[0].module, "workbench-runtime");
|
||||
assert.equal(groups[0].eventCount, 12);
|
||||
assert.equal(groups[0].deliveredCount, 10);
|
||||
assert.equal(groups[0].chunkCount, 3);
|
||||
assert.equal(groups[0].maxFlushDurationMs, 18.75);
|
||||
assert.equal(groups[0].replacedByKeyCount, 1);
|
||||
assert.equal(groups[0].replacedByKeyCount, 3);
|
||||
|
||||
const reportText = JSON.stringify(report);
|
||||
assert.match(reportText, /workbench_sse_flush/u);
|
||||
@@ -209,6 +211,6 @@ test("analyzer and performance-summary include bounded web-performance runtime d
|
||||
assert.match(renderedText, /Web performance runtime diagnostics/u);
|
||||
assert.match(renderedText, /payloads=3 parsed=1 parseIssues=2 events=1 groups=1/u);
|
||||
assert.match(renderedText, /workbench_sse_flush reason=sse_flush module=workbench-runtime/u);
|
||||
assert.match(renderedText, /eventCount=12 chunks=3 flushMax=18.75ms dropped=2/u);
|
||||
assert.match(renderedText, /eventCount=12 delivered=10 chunks=3 flushMax=18.75ms dropped=2/u);
|
||||
assert.match(renderedText, /payload states=invalid-json:1, not-parsed-over-limit:1, parsed:1/u);
|
||||
}, 20_000);
|
||||
|
||||
Reference in New Issue
Block a user