diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-05-24 21:08:58 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-05-24 21:08:58 +0000 |
commit | 48197df156e707beed6c396b5248755ff82543a0 (patch) | |
tree | 412176881ad3bc0a43a29496ae76b1a3cd7bf3ba /src/datastore/perf_datastore_api.c | |
parent | dfd7759ebf34e5597830eca8b89256ec02900235 (diff) | |
download | gnunet-48197df156e707beed6c396b5248755ff82543a0.tar.gz gnunet-48197df156e707beed6c396b5248755ff82543a0.zip |
fix performance metric
Diffstat (limited to 'src/datastore/perf_datastore_api.c')
-rw-r--r-- | src/datastore/perf_datastore_api.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c index 92a56846d..9d7755342 100644 --- a/src/datastore/perf_datastore_api.c +++ b/src/datastore/perf_datastore_api.c | |||
@@ -283,10 +283,14 @@ run_continuation (void *cls, | |||
283 | break; | 283 | break; |
284 | case RP_DONE: | 284 | case RP_DONE: |
285 | GNUNET_snprintf (gstr, sizeof (gstr), | 285 | GNUNET_snprintf (gstr, sizeof (gstr), |
286 | "PUT operations in %s-datastore", | 286 | "DATASTORE-%s", |
287 | plugin_name); | 287 | plugin_name); |
288 | if (crc->i == ITERATIONS) | 288 | if ( (crc->i == ITERATIONS) && |
289 | GAUGER ("DATASTORE", gstr, 1000 * stored_ops / (1 + GNUNET_TIME_absolute_get_duration(start_time).rel_value), "op/s"); | 289 | (stored_ops > 0) ) |
290 | GAUGER (gstr, | ||
291 | "PUT operation duration", | ||
292 | GNUNET_TIME_absolute_get_duration(start_time).rel_value / stored_ops, | ||
293 | "ms/operation"); | ||
290 | GNUNET_DATASTORE_disconnect (datastore, GNUNET_YES); | 294 | GNUNET_DATASTORE_disconnect (datastore, GNUNET_YES); |
291 | GNUNET_free (crc); | 295 | GNUNET_free (crc); |
292 | ok = 0; | 296 | ok = 0; |