stasis: Add statistics gathering in developer mode.

This change adds statistics gathering to Stasis topics,
subscriptions, and message types. These can be viewed using
CLI commands and provide insight into how Stasis is used
and how long certain operations take to execute.

These are only available when Asterisk is compiled in
developer mode and do not have any impact under normal
operation.

ASTERISK-28117

Change-Id: I94411b53767f89ee01714daaecf0c2f1666e863f
This commit is contained in:
Joshua C. Colp
2018-11-30 07:40:40 -04:00
parent 1f8062c6a6
commit fe07093660
8 changed files with 848 additions and 14 deletions

View File

@@ -971,7 +971,11 @@ struct stasis_caching_topic *stasis_caching_topic_create(struct stasis_topic *or
}
ast_free(new_name);
#ifdef AST_DEVMODE
caching_topic->sub = internal_stasis_subscribe(original_topic, caching_topic_exec, caching_topic, 0, 0, __FILE__, __LINE__, __PRETTY_FUNCTION__);
#else
caching_topic->sub = internal_stasis_subscribe(original_topic, caching_topic_exec, caching_topic, 0, 0);
#endif
if (caching_topic->sub == NULL) {
ao2_ref(caching_topic, -1);