Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion crates/ruvector-metrics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,15 @@ mod tests {

#[test]
fn test_gather_metrics() {
// The metrics are `lazy_static`, so they register with the default
// Prometheus registry on first use. Touch one here rather than relying
// on another test in the same process having done it: each test gets
// its own process under a per-test runner, and this assertion then has
// an empty registry to read.
COLLECTIONS_TOTAL.set(0.0);

let metrics = gather_metrics();
assert!(metrics.contains("ruvector"));
assert!(metrics.contains("ruvector_collections_total"));
}

#[test]
Expand Down
Loading