aboutsummaryrefslogtreecommitdiff
path: root/src/benchmark
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-07-15 22:33:49 +0200
committerChristian Grothoff <christian@grothoff.org>2023-07-15 22:33:49 +0200
commitcd5fafffe22608d3d9ec6c620417ecdbd6c076d3 (patch)
tree02d04097ef86ec334b387e320809cf27e3d3d1f1 /src/benchmark
parent5b14fd547e0f1497d62cdc92c27af9ddf19b6105 (diff)
downloadexchange-cd5fafffe22608d3d9ec6c620417ecdbd6c076d3.tar.xz
-get taler-exchange-benchmark to work
Diffstat (limited to 'src/benchmark')
-rw-r--r--src/benchmark/benchmark-common.conf6
-rw-r--r--src/benchmark/taler-exchange-benchmark.c39
2 files changed, 28 insertions, 17 deletions
diff --git a/src/benchmark/benchmark-common.conf b/src/benchmark/benchmark-common.conf
index 6ff5a727a..fc93b2a90 100644
--- a/src/benchmark/benchmark-common.conf
+++ b/src/benchmark/benchmark-common.conf
@@ -39,18 +39,20 @@ ENABLE_DEBIT = YES
ENABLE_CREDIT = YES
[exchange-accountcredentials-1]
+WIRE_GATEWAY_AUTH_METHOD = none
WIRE_GATEWAY_URL = "http://localhost:8082/42/"
# account-2 is suitable for libeufin
[exchange-account-2]
ENABLE_DEBIT = YES
ENABLE_CREDIT = YES
+PAYTO_URI = payto://iban/SANDBOXX/DE033310?receiver-name=Exchange+Company
[exchange-accountcredentials-2]
WIRE_GATEWAY_AUTH_METHOD = basic
-USERNAME = Exchange
+USERNAME = exchange
PASSWORD = x
-WIRE_GATEWAY_URL = "http://localhost:8082/2/"
+WIRE_GATEWAY_URL = "http://localhost:8082/facades/test-facade/taler-wire-gateway/"
# Trust local exchange for "EUR" currency
diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c
index 68adffd3b..b7f9189b5 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -102,7 +102,7 @@ static int use_fakebank;
* Section with the configuration data for the exchange
* bank account.
*/
-static char *exchange_bank_section = "exchange-account-1";
+static char *exchange_bank_section;
/**
* Currency used.
@@ -211,11 +211,18 @@ run (void *cls,
(void) cls;
all_commands = GNUNET_new_array (
- howmany_reserves * (1 /* Withdraw block */
- + howmany_coins) /* All units */
+ 1 /* exchange CMD */
+ + howmany_reserves * (1 /* Withdraw block */
+ + howmany_coins) /* All units */
+ 1 /* stat CMD */
+ 1 /* End CMD */,
struct TALER_TESTING_Command);
+ all_commands[0]
+ = TALER_TESTING_cmd_get_exchange ("get-exchange",
+ cred.cfg,
+ NULL,
+ true,
+ true);
GNUNET_asprintf (&amount_5, "%s:5", currency);
GNUNET_asprintf (&amount_4, "%s:4", currency);
GNUNET_asprintf (&amount_1, "%s:1", currency);
@@ -252,9 +259,9 @@ run (void *cls,
GNUNET_asprintf (&batch_label,
"batch-start-%u",
j);
- all_commands[reserves_first
- ? j
- : j * (howmany_coins + 1)]
+ all_commands[1 + (reserves_first
+ ? j
+ : j * (howmany_coins + 1))]
= TALER_TESTING_cmd_batch (add_label (batch_label),
make_reserve);
}
@@ -334,16 +341,16 @@ run (void *cls,
"unit-%u-%u",
i,
j);
- all_commands[reserves_first
- ? howmany_reserves + j * howmany_coins + i
- : j * (howmany_coins + 1) + (1 + i)]
+ all_commands[1 + (reserves_first
+ ? howmany_reserves + j * howmany_coins + i
+ : j * (howmany_coins + 1) + (1 + i))]
= TALER_TESTING_cmd_batch (add_label (unit_label),
unit);
}
}
- all_commands[howmany_reserves * (1 + howmany_coins)]
+ all_commands[1 + howmany_reserves * (1 + howmany_coins)]
= TALER_TESTING_cmd_stat (timings);
- all_commands[howmany_reserves * (1 + howmany_coins) + 1]
+ all_commands[1 + howmany_reserves * (1 + howmany_coins) + 1]
= TALER_TESTING_cmd_end ();
TALER_TESTING_run2 (is,
all_commands,
@@ -417,7 +424,7 @@ parallel_benchmark (TALER_TESTING_Main main_cb,
{
/* I am the child, do the work! */
GNUNET_log_setup ("benchmark-worker",
- NULL == loglev ? "INFO" : loglev,
+ loglev,
logfile);
result = TALER_TESTING_loop (main_cb,
main_cb_cls);
@@ -556,10 +563,12 @@ main (int argc,
return 0;
return EXIT_INVALIDARGUMENT;
}
+ if (NULL == exchange_bank_section)
+ exchange_bank_section = "exchange-account-1";
+ if (NULL == loglev)
+ loglev = "INFO";
GNUNET_log_setup ("taler-exchange-benchmark",
- NULL == loglev
- ? "INFO"
- : loglev,
+ loglev,
logfile);
if (NULL == cfg_filename)
cfg_filename = GNUNET_CONFIGURATION_default_filename ();