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

Function consumer_group_stats

nodedb/src/control/pubsub.rs:474–483  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

472
473 #[test]
474 fn consumer_group_stats() {
475 let registry = TopicRegistry::new(1000);
476 registry.create_topic("cg").unwrap();
477 registry.subscribe_group("cg", "g1", 0).unwrap();
478 registry.subscribe_group("cg", "g1", 0).unwrap();
479 registry.subscribe_group("cg", "g2", 0).unwrap();
480
481 let stats = registry.topic_stats("cg").unwrap();
482 assert_eq!(stats.consumer_group_count, 2);
483 }
484}

Callers

nothing calls this directly

Calls 3

create_topicMethod · 0.80
subscribe_groupMethod · 0.80
topic_statsMethod · 0.80

Tested by

no test coverage detected