aboutsummaryrefslogtreecommitdiff
path: root/src/benchmark/taler-exchange-benchmark.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-20 18:38:57 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-20 18:38:57 +0100
commit1b24e2f9bb84d64ff07f28a330e1913de790df0c (patch)
treea5290dc393dc2ef06ceb052c48a588e650c93b5e /src/benchmark/taler-exchange-benchmark.c
parentb9186bdd788b544fbbc349f655b93389fd301211 (diff)
more statistics, make explicit table lock optional, can hurt performance badly
Diffstat (limited to 'src/benchmark/taler-exchange-benchmark.c')
-rw-r--r--src/benchmark/taler-exchange-benchmark.c35
1 files changed, 27 insertions, 8 deletions
diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c
index 8bfbc42a5..307b0f378 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -176,6 +176,11 @@ static enum BenchmarkMode mode;
static struct GNUNET_CONFIGURATION_Handle *cfg;
/**
+ * Should we create all of the reserves at the beginning?
+ */
+static int reserves_first;
+
+/**
* Currency used.
*/
static char *currency;
@@ -297,9 +302,6 @@ eval_probability (float probability)
}
-static int reserves_first = 1;
-
-
/**
* Actual commands construction and execution.
*
@@ -467,14 +469,27 @@ static void
print_stats (void)
{
for (unsigned int i = 0; NULL != timings[i].prefix; i++)
+ {
+ char *total;
+ char *latency;
+
+ total = GNUNET_strdup (
+ GNUNET_STRINGS_relative_time_to_string (timings[i].total_duration,
+ GNUNET_YES));
+ latency = GNUNET_strdup (
+ GNUNET_STRINGS_relative_time_to_string (timings[i].success_latency,
+ GNUNET_YES));
fprintf (stderr,
- "%s-%d took %s in total for %u executions\n",
+ "%s-%d took %s in total with %s for latency for %u executions (%u repeats)\n",
timings[i].prefix,
(int) getpid (),
- GNUNET_STRINGS_relative_time_to_string (
- timings[i].total_duration,
- GNUNET_YES),
- timings[i].num_commands);
+ total,
+ latency,
+ timings[i].num_commands,
+ timings[i].num_retries);
+ GNUNET_free (total);
+ GNUNET_free (latency);
+ }
}
@@ -959,6 +974,10 @@ main (int argc,
"fakebank",
"start a fakebank instead of the Python bank",
&use_fakebank),
+ GNUNET_GETOPT_option_flag ('F',
+ "reserves-first",
+ "should all reserves be created first, before starting normal operations",
+ &reserves_first),
GNUNET_GETOPT_option_flag ('K',
"linger",
"linger around until key press",