From 332ba03a242d4f50df97d1a265a1394282e2f899 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 18 Feb 2011 18:26:08 +0000 Subject: [PATCH] gaugering --- src/datacache/perf_datacache.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/datacache/perf_datacache.c b/src/datacache/perf_datacache.c index ff60a58a4..bc86cf2f5 100644 --- a/src/datacache/perf_datacache.c +++ b/src/datacache/perf_datacache.c @@ -25,6 +25,7 @@ #include "platform.h" #include "gnunet_util_lib.h" #include "gnunet_datacache_lib.h" +#include #define VERBOSE GNUNET_NO @@ -69,6 +70,7 @@ run (void *cls, struct GNUNET_TIME_Absolute exp; struct GNUNET_TIME_Absolute start; unsigned int i; + char gstr[128]; ok = 0; h = GNUNET_DATACACHE_create (cfg, @@ -101,6 +103,12 @@ run (void *cls, 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), + "Time to PUT %u items in %s-datacache_ms", + ITERATIONS, + plugins_name); + GAUGER (GNUNET_TIME_absolute_get_duration(start).rel_value, + gstr); start = GNUNET_TIME_absolute_get (); memset (&k, 0, sizeof (GNUNET_HashCode)); for (i = 0; i < ITERATIONS; i++) @@ -117,6 +125,12 @@ run (void *cls, found, ITERATIONS, (unsigned long long) GNUNET_TIME_absolute_get_duration(start).rel_value, ITERATIONS - found); + GNUNET_snprintf (gstr, sizeof (gstr), + "Time to try to GET %u items from %s-datacache_ms", + ITERATIONS, + plugins_name); + GAUGER (GNUNET_TIME_absolute_get_duration(start).rel_value, + gstr); GNUNET_DATACACHE_destroy (h); ASSERT (ok == 0); -- 2.25.1