stats: add global way to check if API is enabled

pull/4252/head
Victor Julien 6 years ago
parent 9ccecdecb6
commit 2d381f93f3

@ -116,6 +116,11 @@ static int stats_loggers_active = 1;
static uint16_t counters_global_id = 0;
bool StatsEnabled(void)
{
return (stats_enabled == TRUE);
}
static void StatsPublicThreadContextInit(StatsPublicThreadContext *t)
{
SCMutexInit(&t->m, NULL);

@ -109,6 +109,7 @@ void StatsSetupPostConfigPreOutput(void);
void StatsSetupPostConfigPostOutput(void);
void StatsSpawnThreads(void);
void StatsRegisterTests(void);
bool StatsEnabled(void);
/* functions used to free the resources alloted by the Stats API */
void StatsReleaseResources(void);

Loading…
Cancel
Save