Repository navigation
Conversation
- Introduce reusable stratum_timing_tracker_t in components/stratum with fixed 64 slots and O(1) ring-buffer indexing. - Replace dynamic PSRAM allocation of 1000 RequestTiming structs in Stratum V1 with static tracker. - Replace ad-hoc 32-slot timing array and manual latency calculation in Stratum V2 with unified tracker. - Add unit tests for timing tracker in components/stratum/test/test_stratum_timing.c.
…stratum-timing # Conflicts: # main/tasks/stratum_v1_client.c # main/tasks/stratum_v2_client.c
johnny9
left a comment
There was a problem hiding this comment.
The four tracker tests reach 100% helper branch coverage, but the test suite does not compile either client. Add client tests for failed sends, V2 batch replies, reconnect resets, and the two regressions below.
The clients are in main, and fall outside the scope of unity tests. To properly do this, we should move all code out of main into components and only leave a thin main. Before trying to get more coverage on that code, it would make sense to componentize the parts we want tested, but that is outside the scope of this PR. |
Both SV1 and SV2 had separate share submit timing systems, this PR extracts them.