Misc
This commit is contained in:
parent
95a9006681
commit
f8e6eea2ff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
||||||
|
[workspace]
|
||||||
|
members = [
|
||||||
|
"bare-metrics-core",
|
||||||
|
"bare-metrics-gui",
|
||||||
|
"bare-metrics-recorder",
|
||||||
|
"bare-metrics-reader"
|
||||||
|
]
|
|
@ -0,0 +1 @@
|
||||||
|
/target
|
|
@ -0,0 +1,18 @@
|
||||||
|
[package]
|
||||||
|
name = "bare-metrics-gui"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
bare-metrics-core = { version = "0.1.0", path = "../bare-metrics-core" }
|
||||||
|
# not needed? bare-metrics-recorder = { version = "0.1.0", path = "../bare-metrics-recorder" }
|
||||||
|
bare-metrics-reader = { version = "0.1.0", path = "../bare-metrics-reader" }
|
||||||
|
eframe = "0.15.0"
|
||||||
|
emath = "0.15.0"
|
||||||
|
egui = "0.15.0"
|
||||||
|
log = "0.4.14"
|
||||||
|
env_logger = "0.9.0"
|
||||||
|
anyhow = "1.0.48"
|
||||||
|
hdrhistogram = "7.4.0"
|
|
@ -99,6 +99,8 @@ impl<W: Write + Send + 'static> BareMetricsRecorderCore<W> {
|
||||||
metric_kind,
|
metric_kind,
|
||||||
unit,
|
unit,
|
||||||
description,
|
description,
|
||||||
|
name,
|
||||||
|
labels,
|
||||||
}) => {
|
}) => {
|
||||||
self.next_frame.new_metrics.insert(
|
self.next_frame.new_metrics.insert(
|
||||||
metric_id,
|
metric_id,
|
||||||
|
@ -106,6 +108,8 @@ impl<W: Write + Send + 'static> BareMetricsRecorderCore<W> {
|
||||||
kind: metric_kind,
|
kind: metric_kind,
|
||||||
unit: unit.map(|unit| unit.as_str().to_string()),
|
unit: unit.map(|unit| unit.as_str().to_string()),
|
||||||
description: description.to_string(),
|
description: description.to_string(),
|
||||||
|
name,
|
||||||
|
labels,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
self.known_metric_kinds.insert(metric_id, metric_kind);
|
self.known_metric_kinds.insert(metric_id, metric_kind);
|
||||||
|
@ -214,6 +218,8 @@ pub enum RecorderMessage {
|
||||||
metric_kind: MetricKind,
|
metric_kind: MetricKind,
|
||||||
unit: Option<Unit>,
|
unit: Option<Unit>,
|
||||||
description: &'static str,
|
description: &'static str,
|
||||||
|
name: String,
|
||||||
|
labels: HashMap<String, String>,
|
||||||
},
|
},
|
||||||
HistogramReading {
|
HistogramReading {
|
||||||
metric_id: MetricId,
|
metric_id: MetricId,
|
||||||
|
@ -258,6 +264,11 @@ impl BareMetricsRecorderShard {
|
||||||
metric_kind,
|
metric_kind,
|
||||||
unit,
|
unit,
|
||||||
description: description.unwrap_or(""),
|
description: description.unwrap_or(""),
|
||||||
|
name: key.name().to_string(),
|
||||||
|
labels: key
|
||||||
|
.labels()
|
||||||
|
.map(|l| (l.key().to_string(), l.value().to_string()))
|
||||||
|
.collect::<HashMap<String, String>>(),
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Err(e) = self.recorder_tx.send(registration) {
|
if let Err(e) = self.recorder_tx.send(registration) {
|
||||||
|
|
Loading…
Reference in New Issue