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

Method subscription_count

nodedb/src/control/notify_bus.rs:233–236  ·  view source on GitHub ↗

Number of distinct (tenant, channel) subscriptions currently active.

(&self)

Source from the content-addressed store, hash-verified

231
232 /// Number of distinct (tenant, channel) subscriptions currently active.
233 pub fn subscription_count(&self) -> usize {
234 let map = self.subscribers.read().unwrap_or_else(|p| p.into_inner());
235 map.values().map(|v| v.len()).sum()
236 }
237}
238
239/// Normalize a channel name to lowercase, matching PG unquoted-identifier rules.

Callers

nothing calls this directly

Calls 3

sumMethod · 0.80
readMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected