add metrics

This commit is contained in:
houseme
2025-05-15 23:34:36 +08:00
parent 5304b73588
commit 60635aeb65
27 changed files with 1702 additions and 42 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
/// Format the path to the metric name format
/// Replace '/' and '-' with '_'
#[allow(dead_code)]
pub fn format_path_to_metric_name(path: &str) -> String {
path.trim_start_matches('/').replace('/', "_").replace('-', "_")
path.trim_start_matches('/').replace(['/', '-'], "_")
}
#[cfg(test)]