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

Method record_error

nodedb-cluster/src/loop_metrics.rs:90–93  ·  view source on GitHub ↗

Increment the counter for an error kind. `kind` must be a short bounded label — never a formatted error string.

(&self, kind: &'static str)

Source from the content-addressed store, hash-verified

88 /// Increment the counter for an error kind. `kind` must be a short
89 /// bounded label — never a formatted error string.
90 pub fn record_error(&self, kind: &'static str) {
91 let mut g = self.errors.lock().unwrap_or_else(|p| p.into_inner());
92 *g.entry(kind).or_insert(0) += 1;
93 }
94
95 /// Mark the loop up (driver task is running) or down (driver exited
96 /// or not yet spawned).

Callers 6

record_ping_failureMethod · 0.80
sweep_onceMethod · 0.80
sweep_onceMethod · 0.80
tickMethod · 0.80

Calls 2

lockMethod · 0.80
entryMethod · 0.80

Tested by 2