From 5e96828707197d7c3ce668e16e820bdbeb1c6469 Mon Sep 17 00:00:00 2001 From: Olivier Date: Sat, 8 Jan 2022 15:12:20 +0000 Subject: [PATCH] Use u32 for time unit (for now) as it's hashable --- bare-metrics-gui/src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bare-metrics-gui/src/config.rs b/bare-metrics-gui/src/config.rs index b988b45..ee4e7d2 100644 --- a/bare-metrics-gui/src/config.rs +++ b/bare-metrics-gui/src/config.rs @@ -7,11 +7,11 @@ pub struct DashboardConfig { pub graphs: Vec, } -#[derive(Deserialize, Clone)] +#[derive(Deserialize, Clone, Debug, Hash)] pub enum MetricTransform { Rate { // Divisor in seconds. Would usually expect to see 1 (/sec), 60 (/min) or 3600 (/hour). - time_unit: f32, + time_unit: u32, }, }