aboutsummaryrefslogtreecommitdiff
path: root/src/statistics/test_statistics_api_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/statistics/test_statistics_api_loop.c')
-rw-r--r--src/statistics/test_statistics_api_loop.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/statistics/test_statistics_api_loop.c b/src/statistics/test_statistics_api_loop.c
index a7e2cbab5..a1664cde5 100644
--- a/src/statistics/test_statistics_api_loop.c
+++ b/src/statistics/test_statistics_api_loop.c
@@ -31,7 +31,10 @@ static struct GNUNET_STATISTICS_Handle *h;
31 31
32 32
33static int 33static int
34check_1 (void *cls, const char *subsystem, const char *name, uint64_t value, 34check_1 (void *cls,
35 const char *subsystem,
36 const char *name,
37 uint64_t value,
35 int is_persistent) 38 int is_persistent)
36{ 39{
37 GNUNET_assert (0 == strcmp (name, "test-0")); 40 GNUNET_assert (0 == strcmp (name, "test-0"));
@@ -42,7 +45,8 @@ check_1 (void *cls, const char *subsystem, const char *name, uint64_t value,
42 45
43 46
44static void 47static void
45next (void *cls, int success) 48next (void *cls,
49 int success)
46{ 50{
47 int *ok = cls; 51 int *ok = cls;
48 52
@@ -53,7 +57,9 @@ next (void *cls, int success)
53 57
54 58
55static void 59static void
56run (void *cls, char *const *args, const char *cfgfile, 60run (void *cls,
61 char *const *args,
62 const char *cfgfile,
57 const struct GNUNET_CONFIGURATION_Handle *cfg) 63 const struct GNUNET_CONFIGURATION_Handle *cfg)
58{ 64{
59 unsigned int i; 65 unsigned int i;
@@ -62,9 +68,9 @@ run (void *cls, char *const *args, const char *cfgfile,
62 h = GNUNET_STATISTICS_create ("test-statistics-api-loop", cfg); 68 h = GNUNET_STATISTICS_create ("test-statistics-api-loop", cfg);
63 for (i = 0; i < ROUNDS; i++) 69 for (i = 0; i < ROUNDS; i++)
64 { 70 {
65 GNUNET_snprintf (name, sizeof (name), "test-%d", i % 256); 71 GNUNET_snprintf (name, sizeof (name), "test-%d", i % 32);
66 GNUNET_STATISTICS_set (h, name, i, GNUNET_NO); 72 GNUNET_STATISTICS_set (h, name, i, GNUNET_NO);
67 GNUNET_snprintf (name, sizeof (name), "test-%d", i % 128); 73 GNUNET_snprintf (name, sizeof (name), "test-%d", i % 16);
68 GNUNET_STATISTICS_update (h, name, 1, GNUNET_NO); 74 GNUNET_STATISTICS_update (h, name, 1, GNUNET_NO);
69 } 75 }
70 i = 0; 76 i = 0;