mirror of
https://github.com/neondatabase/neon.git
synced 2026-10-28 22:46:46 +00:00
refactor(consumption_metrics): prereq refactorings, tests (#5315)
Split off from #5297. There should be no functional changes here: - refactor tenant metric "production" like previously timeline, allows unit testing, though not interesting enough yet to test - introduce type aliases for tuples - extra refactoring for `collect`, was initially thinking it was useful but will do a inline later - shorter binding names - support for future allocation reuse quests with IdempotencyKey - move code out of tokio::select to make it rustfmt-able - generification, allow later replacement of `&'static str` with enum - add tests that assert sent event contents exactly
This commit is contained in:
@@ -121,7 +121,7 @@ async fn collect_metrics_iteration(
|
||||
|
||||
let current_metrics = gather_proxy_io_bytes_per_client();
|
||||
|
||||
let metrics_to_send: Vec<Event<Ids>> = current_metrics
|
||||
let metrics_to_send: Vec<Event<Ids, &'static str>> = current_metrics
|
||||
.iter()
|
||||
.filter_map(|(curr_key, (curr_val, curr_time))| {
|
||||
let mut start_time = *curr_time;
|
||||
|
||||
Reference in New Issue
Block a user