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

Method get

nodedb/src/engine/timeseries/last_value_cache.rs:65–67  ·  view source on GitHub ↗

O(1) lookup of the last value for a series.

(&self, series_id: SeriesId)

Source from the content-addressed store, hash-verified

63
64 /// O(1) lookup of the last value for a series.
65 pub fn get(&self, series_id: SeriesId) -> Option<&LastValueEntry> {
66 self.entries.get(&series_id)
67 }
68
69 /// Return all cached last values. O(N) where N is distinct series count.
70 pub fn all(&self) -> impl Iterator<Item = (SeriesId, &LastValueEntry)> {

Callers 3

insert_and_getFunction · 0.45
newer_timestamp_updatesFunction · 0.45
older_timestamp_skippedFunction · 0.45

Calls

no outgoing calls

Tested by 3

insert_and_getFunction · 0.36
newer_timestamp_updatesFunction · 0.36
older_timestamp_skippedFunction · 0.36