summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-20 12:34:59 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-20 12:34:59 +0100
commite4293ec0752293c9206914e908a1c45e1a4d4f02 (patch)
tree2979423d35a8919a1b7f18bf15071d6512669737
parent159ce744b9aacfc8a9c98d89619226c521ea4cc1 (diff)
downloadexchange-e4293ec0752293c9206914e908a1c45e1a4d4f02.tar.gz
exchange-e4293ec0752293c9206914e908a1c45e1a4d4f02.tar.bz2
exchange-e4293ec0752293c9206914e908a1c45e1a4d4f02.zip
have variant where we first setup all reserves
-rw-r--r--src/benchmark/taler-exchange-benchmark.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c
index 95c3ae239..8bfbc42a5 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -297,6 +297,9 @@ eval_probability (float probability)
}
+static int reserves_first = 1;
+
+
/**
* Actual commands construction and execution.
*
@@ -355,7 +358,9 @@ run (void *cls,
GNUNET_asprintf (&batch_label,
"batch-start-%u",
j);
- all_commands[j * (howmany_coins + 1)]
+ all_commands[reserves_first
+ ? j
+ : j * (howmany_coins + 1)]
= TALER_TESTING_cmd_batch (add_label (batch_label),
make_reserve);
}
@@ -433,7 +438,9 @@ run (void *cls,
"unit-%u-%u",
i,
j);
- all_commands[j * (howmany_coins + 1) + (1 + i)]
+ all_commands[reserves_first
+ ? howmany_reserves + j * howmany_coins + i
+ : j * (howmany_coins + 1) + (1 + i)]
= TALER_TESTING_cmd_batch (add_label (unit_label),
unit);
}