MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / min_max_tracking

Function min_max_tracking

nodedb/src/engine/sparse/stats.rs:351–360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

349
350 #[test]
351 fn min_max_tracking() {
352 let mut stats = ColumnStats::new();
353 for v in &["charlie", "alice", "bob"] {
354 stats.observe(Some(&serde_json::Value::String(v.to_string())));
355 }
356 assert_eq!(stats.min_value.as_deref(), Some("alice"));
357 assert_eq!(stats.max_value.as_deref(), Some("charlie"));
358 assert_eq!(stats.non_null_count, 3);
359 assert_eq!(stats.null_count, 0);
360 }
361
362 #[test]
363 fn null_tracking() {

Callers

nothing calls this directly

Calls 2

to_stringMethod · 0.80
observeMethod · 0.45

Tested by

no test coverage detected