830 B
830 B
1. Metrics module
- 1.1 Add transport metrics contracts, snapshot models, and default JSON-plus-console reporting implementation in shared networking code.
- 1.2 Ensure the metrics module aggregates one run of global and per-peer counters and finalizes idempotently.
2. KCP transport integration
- 2.1 Extend
KcpTransportwith optional metrics-module injection and current-snapshot access without changingITransport. - 2.2 Publish start, shutdown, session, payload, datagram, and error events from
KcpTransportinto the metrics module and finalize reports onStop().
3. Verification
- 3.1 Add edit-mode tests for metrics aggregation, peer isolation, and single-report shutdown behavior.
- 3.2 Run the relevant network edit-mode test suite and confirm the new metrics behavior passes.