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

Function sample

nodedb-bridge/src/telemetry.rs:149–155  ·  view source on GitHub ↗
(id: u32, val: u64)

Source from the content-addressed store, hash-verified

147 use super::*;
148
149 fn sample(id: u32, val: u64) -> MetricSample {
150 MetricSample {
151 metric_id: id,
152 timestamp_ns: val,
153 value: MetricValue::Counter(val),
154 }
155 }
156
157 #[test]
158 fn basic_record_and_drain() {

Callers 2

basic_record_and_drainFunction · 0.70
overflow_drops_oldestFunction · 0.70

Calls

no outgoing calls

Tested by 2

basic_record_and_drainFunction · 0.56
overflow_drops_oldestFunction · 0.56