diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-02-18 18:57:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-02-18 18:57:43 +0000 |
commit | 30452a93723d7b8fff1148c3b803a495afaf19b6 (patch) | |
tree | d763fafcb2f935b53f9f440958a382c4c755c34f | |
parent | 332ba03a242d4f50df97d1a265a1394282e2f899 (diff) | |
download | gnunet-30452a93723d7b8fff1148c3b803a495afaf19b6.tar.gz gnunet-30452a93723d7b8fff1148c3b803a495afaf19b6.zip |
gaugering
-rw-r--r-- | src/datastore/perf_datastore_api.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c index 301124878..6aee1f725 100644 --- a/src/datastore/perf_datastore_api.c +++ b/src/datastore/perf_datastore_api.c | |||
@@ -242,6 +242,7 @@ run_continuation (void *cls, | |||
242 | static char data[65536]; | 242 | static char data[65536]; |
243 | int i; | 243 | int i; |
244 | int k; | 244 | int k; |
245 | char gstr[128]; | ||
245 | 246 | ||
246 | ok = (int) crc->phase; | 247 | ok = (int) crc->phase; |
247 | switch (crc->phase) | 248 | switch (crc->phase) |
@@ -293,11 +294,18 @@ run_continuation (void *cls, | |||
293 | 1000 * stored_ops / (1 + GNUNET_TIME_absolute_get_duration(start_time).rel_value)); | 294 | 1000 * stored_ops / (1 + GNUNET_TIME_absolute_get_duration(start_time).rel_value)); |
294 | crc->phase = RP_PUT; | 295 | crc->phase = RP_PUT; |
295 | crc->j = 0; | 296 | crc->j = 0; |
297 | start = GNUNET_TIME_absolute_get (); | ||
296 | GNUNET_SCHEDULER_add_continuation (&run_continuation, | 298 | GNUNET_SCHEDULER_add_continuation (&run_continuation, |
297 | crc, | 299 | crc, |
298 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 300 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
299 | break; | 301 | break; |
300 | case RP_DONE: | 302 | case RP_DONE: |
303 | GNUNET_snprintf (gstr, sizeof (gstr), | ||
304 | "PUT operations in %s-datastore_op/s", | ||
305 | plugins_name); | ||
306 | if (crc->i == ITERATIONS) | ||
307 | GAUGER (1000 * stored_ops / (1 + GNUNET_TIME_absolute_get_duration(start_time).rel_value), | ||
308 | gstr); | ||
301 | GNUNET_DATASTORE_disconnect (datastore, GNUNET_YES); | 309 | GNUNET_DATASTORE_disconnect (datastore, GNUNET_YES); |
302 | GNUNET_free (crc); | 310 | GNUNET_free (crc); |
303 | ok = 0; | 311 | ok = 0; |