diff options
Diffstat (limited to 'src/datacache/perf_datacache.c')
-rw-r--r-- | src/datacache/perf_datacache.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/datacache/perf_datacache.c b/src/datacache/perf_datacache.c index 4381171c5..1dfb46cf1 100644 --- a/src/datacache/perf_datacache.c +++ b/src/datacache/perf_datacache.c | |||
@@ -74,7 +74,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
74 | 74 | ||
75 | if (h == NULL) | 75 | if (h == NULL) |
76 | { | 76 | { |
77 | FPRINTF (stderr, "%s", "Failed to initialize datacache. Database likely not setup, skipping test.\n"); | 77 | fprintf (stderr, "%s", "Failed to initialize datacache. Database likely not setup, skipping test.\n"); |
78 | ok = 77; /* mark test as skipped */ | 78 | ok = 77; /* mark test as skipped */ |
79 | return; | 79 | return; |
80 | } | 80 | } |
@@ -84,7 +84,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
84 | for (i = 0; i < ITERATIONS; i++) | 84 | for (i = 0; i < ITERATIONS; i++) |
85 | { | 85 | { |
86 | if (0 == i % (ITERATIONS / 80)) | 86 | if (0 == i % (ITERATIONS / 80)) |
87 | FPRINTF (stderr, "%s", "."); | 87 | fprintf (stderr, "%s", "."); |
88 | GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n); | 88 | GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n); |
89 | ASSERT (GNUNET_OK == | 89 | ASSERT (GNUNET_OK == |
90 | GNUNET_DATACACHE_put (h, &k, sizeof (struct GNUNET_HashCode), | 90 | GNUNET_DATACACHE_put (h, &k, sizeof (struct GNUNET_HashCode), |
@@ -92,8 +92,8 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
92 | 0, NULL)); | 92 | 0, NULL)); |
93 | k = n; | 93 | k = n; |
94 | } | 94 | } |
95 | FPRINTF (stderr, "%s", "\n"); | 95 | fprintf (stderr, "%s", "\n"); |
96 | FPRINTF (stdout, "Stored %u items in %s\n", ITERATIONS, | 96 | fprintf (stdout, "Stored %u items in %s\n", ITERATIONS, |
97 | GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (start), GNUNET_YES)); | 97 | GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (start), GNUNET_YES)); |
98 | GNUNET_snprintf (gstr, sizeof (gstr), "DATACACHE-%s", plugin_name); | 98 | GNUNET_snprintf (gstr, sizeof (gstr), "DATACACHE-%s", plugin_name); |
99 | GAUGER (gstr, "Time to PUT item in datacache", | 99 | GAUGER (gstr, "Time to PUT item in datacache", |
@@ -104,13 +104,13 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
104 | for (i = 0; i < ITERATIONS; i++) | 104 | for (i = 0; i < ITERATIONS; i++) |
105 | { | 105 | { |
106 | if (0 == i % (ITERATIONS / 80)) | 106 | if (0 == i % (ITERATIONS / 80)) |
107 | FPRINTF (stderr, "%s", "."); | 107 | fprintf (stderr, "%s", "."); |
108 | GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n); | 108 | GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n); |
109 | GNUNET_DATACACHE_get (h, &k, 1 + i % 16, &checkIt, &n); | 109 | GNUNET_DATACACHE_get (h, &k, 1 + i % 16, &checkIt, &n); |
110 | k = n; | 110 | k = n; |
111 | } | 111 | } |
112 | FPRINTF (stderr, "%s", "\n"); | 112 | fprintf (stderr, "%s", "\n"); |
113 | FPRINTF (stdout, | 113 | fprintf (stdout, |
114 | "Found %u/%u items in %s (%u were deleted during storage processing)\n", | 114 | "Found %u/%u items in %s (%u were deleted during storage processing)\n", |
115 | found, ITERATIONS, | 115 | found, ITERATIONS, |
116 | GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (start), GNUNET_YES), | 116 | GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (start), GNUNET_YES), |
@@ -152,7 +152,7 @@ main (int argc, char *argv[]) | |||
152 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv, | 152 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv, |
153 | "perf-datacache", "nohelp", options, &run, NULL); | 153 | "perf-datacache", "nohelp", options, &run, NULL); |
154 | if ( (0 != ok) && (77 != ok) ) | 154 | if ( (0 != ok) && (77 != ok) ) |
155 | FPRINTF (stderr, "Missed some perfcases: %d\n", ok); | 155 | fprintf (stderr, "Missed some perfcases: %d\n", ok); |
156 | return ok; | 156 | return ok; |
157 | } | 157 | } |
158 | 158 | ||