Skip to content

Commit

Permalink
statistics: expose function that returns a statistic group name
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Feb 18, 2021
1 parent 5f2f276 commit 50e1db5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions statistics.c
Expand Up @@ -677,6 +677,11 @@ int mi_print_stat(mi_item_t *resp_obj, str *mod, str *stat, unsigned long val)
}


str *get_stat_module_name(stat_var *stat)
{
return &collector->amodules[stat->mod_idx].name;
}


/***************************** MI STUFF ********************************/

Expand Down
1 change: 1 addition & 0 deletions statistics.h
Expand Up @@ -145,6 +145,7 @@ stat_var* __get_stat( const str *name, int mod_idx );

module_stats *add_stat_module(char *module);
module_stats *get_stat_module( str *module);
str *get_stat_module_name(stat_var *stat);

unsigned int get_stat_val( stat_var *var );

Expand Down

0 comments on commit 50e1db5

Please sign in to comment.