- {
- if (0 == i % (ITERATIONS / 80))
- fprintf (stderr, ".");
- GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n);
- ASSERT (GNUNET_OK == GNUNET_DATACACHE_put (h,
- &k,
- sizeof (GNUNET_HashCode),
- (const char *) &n,
- 1+i%16,
- exp));
- k = n;
- }
- fprintf (stderr, "\n");
- fprintf (stdout, "Stored %u items in %llums\n",
- ITERATIONS,
- (unsigned long long) GNUNET_TIME_absolute_get_duration(start).rel_value);
- GNUNET_snprintf (gstr, sizeof (gstr),
- "DATACACHE-%s",
- plugin_name);
- GAUGER (gstr,
- "Time to PUT item in datacache",
- GNUNET_TIME_absolute_get_duration(start).rel_value / ITERATIONS,
- "ms/item");
+ {
+ if (0 == i % (ITERATIONS / 80))
+ FPRINTF (stderr, "%s", ".");
+ GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
+ ASSERT (GNUNET_OK ==
+ GNUNET_DATACACHE_put (h, &k, sizeof (struct GNUNET_HashCode),
+ (const char *) &n, 1 + i % 16, exp,
+ 0, NULL));
+ k = n;
+ }
+ FPRINTF (stderr, "%s", "\n");
+ FPRINTF (stdout, "Stored %u items in %s\n", ITERATIONS,
+ GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (start), GNUNET_YES));
+ GNUNET_snprintf (gstr, sizeof (gstr), "DATACACHE-%s", plugin_name);
+ GAUGER (gstr, "Time to PUT item in datacache",
+ GNUNET_TIME_absolute_get_duration (start).rel_value_us / 1000LL / ITERATIONS,
+ "ms/item");