X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fstatistics%2Ftest_statistics_api_loop.c;h=7a7b44c1fc43725cbdff09df645cb7055b44224a;hb=f57cbab24fb7a22fc982eb8b6c4a2d18402be460;hp=7eaa9d27b7ec607b4e6e62ad003df26737a3c2e8;hpb=d8abe51562c11473ebcb823ad67c529be2c9dc92;p=oweals%2Fgnunet.git diff --git a/src/statistics/test_statistics_api_loop.c b/src/statistics/test_statistics_api_loop.c index 7eaa9d27b..7a7b44c1f 100644 --- a/src/statistics/test_statistics_api_loop.c +++ b/src/statistics/test_statistics_api_loop.c @@ -22,23 +22,17 @@ * @brief testcase for statistics_api.c */ #include "platform.h" -#include "gnunet_common.h" -#include "gnunet_getopt_lib.h" -#include "gnunet_os_lib.h" -#include "gnunet_program_lib.h" -#include "gnunet_scheduler_lib.h" +#include "gnunet_util_lib.h" #include "gnunet_statistics_service.h" -#define VERBOSE GNUNET_NO +#define ROUNDS (1024 * 1024) -#define START_SERVICE GNUNET_YES +static struct GNUNET_STATISTICS_Handle *h; -#define ROUNDS (1024 * 1024) static int -check_1 (void *cls, - const char *subsystem, - const char *name, uint64_t value, int is_persistent) +check_1 (void *cls, const char *subsystem, const char *name, uint64_t value, + int is_persistent) { GNUNET_assert (0 == strcmp (name, "test-0")); GNUNET_assert (0 == strcmp (subsystem, "test-statistics-api-loop")); @@ -46,7 +40,6 @@ check_1 (void *cls, return GNUNET_OK; } -static struct GNUNET_STATISTICS_Handle *h; static void next (void *cls, int success) @@ -58,35 +51,35 @@ next (void *cls, int success) *ok = 0; } + static void -run (void *cls, - struct GNUNET_SCHEDULER_Handle *sched, - char *const *args, - const char *cfgfile, +run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) { - int i; + unsigned int i; char name[128]; - h = GNUNET_STATISTICS_create (sched, "test-statistics-api-loop", cfg); - for (i=0;i