From 5edb234d215611914d8e9e9953fe4f0a4439c383 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 8 Nov 2012 15:12:12 +0000 Subject: [PATCH] add option to disable use of stats entirely --- src/statistics/statistics_api.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index 305c6f3a5..7bdd6a5c6 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c @@ -929,6 +929,9 @@ GNUNET_STATISTICS_create (const char *subsystem, { struct GNUNET_STATISTICS_Handle *ret; + if (GNUNET_YES == + GNUNET_CONFIGURATION_get_value_yesno (cfg, "statistics", "DISABLE")) + return NULL; GNUNET_assert (NULL != subsystem); GNUNET_assert (NULL != cfg); ret = GNUNET_malloc (sizeof (struct GNUNET_STATISTICS_Handle)); -- 2.25.1