feat(orchestrator): C3 cluster /stats collector#44
Merged
Conversation
Implements component C3 — fills in the unimplemented!() bodies on the StatsCollector scaffold landed in PR #40 and unignores the acceptance tests on tests/stats_collector.rs. - poll_once: fetches each endpoint sequentially, stores a StatsSample, prunes by the sample's own sampled_at against the retention window so the rolling-window semantic holds even under bursty polling. Failed fetches do not store a sample and do not abort the round. - current_rates: computes bytes_out_per_sec by diffing oldest/newest in each per-cluster series against sampled_at; egress_aggregate_gbps is the sum across clusters in Gbps. delta_hit_rate is a proxy until the cluster exposes broadcasts_attempted (#94). - time_series_for: returns the per-endpoint series clone. - run: simple periodic poll loop driven by tokio::time::interval; never returns under normal operation. Production wraps it in tokio::spawn. Closes #23. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #23 — orchestrator component C3. Fills in the `unimplemented!()` bodies on the `StatsCollector` scaffold landed in PR #40 and unignores the acceptance tests.
What this does
Test plan
Acceptance tests covered
All 3 from issue #23:
Closes #23.
🤖 Generated with Claude Code