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

Function multiple_series

nodedb/src/engine/timeseries/last_value_cache.rs:172–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

170
171 #[test]
172 fn multiple_series() {
173 let mut cache = LastValueCache::new();
174 cache.update(sid(1), 100, 1.0);
175 cache.update(sid(2), 200, 2.0);
176 cache.update(sid(3), 300, 3.0);
177
178 assert_eq!(cache.len(), 3);
179 assert!((cache.get(sid(2)).unwrap().value - 2.0).abs() < 1e-12);
180 }
181
182 #[test]
183 fn all_returns_all_entries() {

Callers

nothing calls this directly

Calls 2

sidFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected