MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / mi_add_module_stats

Function mi_add_module_stats

statistics.c:737–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735}
736
737inline static int mi_add_module_stats(mi_item_t *resp_obj, module_stats *mods)
738{
739 stat_var *stat;
740 int ret = 0;
741
742 if (mods->is_dyn)
743 lock_start_read((rw_lock_t *)collector->rwl);
744
745 for( stat=mods->head ; stat ; stat=stat->lnext) {
746 if (stat_is_hidden(stat))
747 continue;
748 ret = mi_print_stat(resp_obj, &mods->name, &stat->name,
749 get_stat_val(stat));
750 if (ret < 0)
751 break;
752 }
753
754 if (mods->is_dyn)
755 lock_stop_read((rw_lock_t *)collector->rwl);
756
757 return ret;
758}
759
760inline static int mi_list_module_stats(mi_item_t *resp_obj, module_stats *mods)
761{

Callers 1

mi_get_statsFunction · 0.85

Calls 1

mi_print_statFunction · 0.85

Tested by

no test coverage detected