diff --git a/bare-metrics-gui/src/background_loader.rs b/bare-metrics-gui/src/background_loader.rs index 3f2b144..61f26a1 100644 --- a/bare-metrics-gui/src/background_loader.rs +++ b/bare-metrics-gui/src/background_loader.rs @@ -1,17 +1,13 @@ -use crate::config::MetricTransform; use anyhow::{anyhow, bail}; use bare_metrics_core::structures::{ Frame, MetricDescriptor, MetricId, MetricKind, UnixTimestampMilliseconds, }; use bare_metrics_reader::{MetricsLogReader, SeekToken}; -use eframe::egui::{ - Color32, Frame as EguiFrame, PointerButton, Pos2, Rect, Sense, Stroke, TextStyle, Ui, Vec2, -}; use hdrhistogram::Histogram; use log::{debug, error, info}; use std::collections::{BTreeMap, HashMap}; use std::io::{Read, Seek}; -use std::ops::{DerefMut, Mul, RangeInclusive}; +use std::ops::{DerefMut, RangeInclusive}; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::mpsc::{Receiver, Sender}; use std::sync::{Arc, Mutex, RwLock}; @@ -549,10 +545,10 @@ impl MetricsLogReaderManager { .insert(metric_id, unsummarised_histogram.summarise()); } - for (metric_id, gauge) in metrics_window.gauges.iter_mut() { + for (_metric_id, gauge) in metrics_window.gauges.iter_mut() { gauge.summarise_in_place(); } - for (metric_id, counter) in metrics_window.counters.iter_mut() { + for (_metric_id, counter) in metrics_window.counters.iter_mut() { counter.summarise_in_place(); } @@ -605,7 +601,7 @@ impl MetricsLogReaderManager { )?; self.reader.seek(seek_token)?; - let (start_ts, frame) = self + let (_start_ts, frame) = self .reader .read_frame()? .ok_or_else(|| anyhow!("Sought frame should exist"))?; diff --git a/bare-metrics-gui/src/graph.rs b/bare-metrics-gui/src/graph.rs index fb346de..5762b3c 100644 --- a/bare-metrics-gui/src/graph.rs +++ b/bare-metrics-gui/src/graph.rs @@ -1,21 +1,9 @@ use crate::background_loader::MetricsLogReadingRequester; -use crate::config::MetricTransform; -use anyhow::{anyhow, bail}; -use bare_metrics_core::structures::{ - Frame, MetricDescriptor, MetricId, MetricKind, UnixTimestampMilliseconds, -}; -use bare_metrics_reader::{MetricsLogReader, SeekToken}; +use bare_metrics_core::structures::{MetricId, UnixTimestampMilliseconds}; use eframe::egui::{ Color32, Frame as EguiFrame, PointerButton, Pos2, Rect, Sense, Stroke, TextStyle, Ui, Vec2, }; -use hdrhistogram::Histogram; -use log::{debug, error, info}; -use std::collections::{BTreeMap, HashMap}; -use std::io::{Read, Seek}; -use std::ops::{DerefMut, Mul, RangeInclusive}; -use std::sync::atomic::{AtomicBool, Ordering}; -use std::sync::mpsc::{Receiver, Sender}; -use std::sync::{Arc, Mutex, RwLock}; +use std::ops::{Mul, RangeInclusive}; /// Renderer for a bare metrics graph. /// Should support rendering both line graphs and histograms.