Repository navigation
feat: report byte totals and recently closed connections - #582
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 376ee457c6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Test Results 2 048 files ± 0 2 076 suites ±0 33m 24s ⏱️ -12s Results for commit d55d670. ± Comparison against base commit 2462373. This pull request removes 4 and adds 34 tests. Note that renamed tests count towards both. |
What changes
Engine (
library:core,library:api)ConnectionRegistryadds each connection's bytes to running totals when it closes, soActiveConnections.receivedBytes/sentBytes(new,nullby default) cover every connection since the engine started and never drop. The sampler never reports a total lower than its last one, covering the moment between a connection leaving the live map and adding its bytes.ActiveConnection.closedAt(new,nullby default), their final counts and no rates: the last 256 for 10 minutes, at mostlimitper snapshot, inActiveConnections.closed(new, empty by default). A connection still listed as open is left out ofclosed. Closed entries never change, so idle repeats stay deduplicated.RemoteKetchpass both through as they are, andRemoteConnectionsTestchecks that end to end over a real socket.App (
ui/connections)strings_connections.xml, translated into all 9 other languages.Snapshots
Tests
ConnectionRegistryTest: totals survive closes, closed entries keep their final counts and close order, the cap, expiry on virtual time, and idle dedupe with closed entries.ActiveConnectionsTest: defaults for older JSON, and a round trip with totals and closed connections.ConnectionRoutesTest,RemoteConnectionsTest: pass-through on/api/connectionsand end to end throughRemoteKetch.ConnectionGridModelTest,ConnectionRowsTest: closed cells, the switch, de-duplication, sort and search, andheaderSummary.ConnectionGridSnapshots.page_totalsAndClosed_dimClosedRowsAndSayWhenTheyClosed.Ran:
:library:api:jvmTest,:library:core:jvmTest --tests '*Connection*',:library:server:test --tests '*Connection*' '*RemoteStreamTest*' '*EventHubTest*',:library:remote:jvmTest, and:app:shared:jvmTestfor the connection, localization, hardcoded-text and design-token tests. iOS and Android were not compiled.