aboutsummaryrefslogtreecommitdiff
path: root/src/merchant-tools/taler-merchant-benchmark.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-07-16 14:38:55 +0200
committerChristian Grothoff <christian@grothoff.org>2023-07-16 14:38:55 +0200
commitfd22e4c75dd2cad7f2ff0a55660e9af057419e5b (patch)
tree91ffaeb3e8bcba657f6c26f6f8bf4df5bc95587a /src/merchant-tools/taler-merchant-benchmark.c
parentf27bd7ccf260e90fb86461fbfa07a09f555756c9 (diff)
work on getting taler-merchant-benchmark to function
Diffstat (limited to 'src/merchant-tools/taler-merchant-benchmark.c')
-rw-r--r--src/merchant-tools/taler-merchant-benchmark.c161
1 files changed, 90 insertions, 71 deletions
diff --git a/src/merchant-tools/taler-merchant-benchmark.c b/src/merchant-tools/taler-merchant-benchmark.c
index 17764eb1..09c2ba6a 100644
--- a/src/merchant-tools/taler-merchant-benchmark.c
+++ b/src/merchant-tools/taler-merchant-benchmark.c
@@ -203,9 +203,10 @@ run (void *cls,
CURRENCY_10_02,
&cred.ba,
cred.user43_payto),
- TALER_TESTING_cmd_exec_wirewatch (
+ TALER_TESTING_cmd_exec_wirewatch2 (
"wirewatch-1",
- cfg_filename),
+ cfg_filename,
+ exchange_bank_section),
TALER_TESTING_cmd_withdraw_amount (
"withdraw-coin-1",
"create-reserve-1",
@@ -328,9 +329,10 @@ run (void *cls,
CURRENCY_5_01,
&cred.ba,
cred.user43_payto),
- TALER_TESTING_cmd_exec_wirewatch (
+ TALER_TESTING_cmd_exec_wirewatch2 (
"wirewatch-1",
- cfg_filename),
+ cfg_filename,
+ exchange_bank_section),
TALER_TESTING_cmd_withdraw_amount (
"withdraw-coin-1",
"create-reserve-1",
@@ -364,9 +366,10 @@ run (void *cls,
CURRENCY_10_02,
&cred.ba,
cred.user43_payto),
- TALER_TESTING_cmd_exec_wirewatch (
+ TALER_TESTING_cmd_exec_wirewatch2 (
"wirewatch-2",
- cfg_filename),
+ cfg_filename,
+ exchange_bank_section),
TALER_TESTING_cmd_withdraw_amount (
"withdraw-coin-2",
"create-reserve-2",
@@ -446,85 +449,101 @@ main (int argc,
"use fakebank for the banking system",
&use_fakebank),
GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION),
- GNUNET_GETOPT_option_help ("Runs benchmark logic against merchant backend. "
- "Must be used with either 'ordinary' or 'corner' sub-commands."),
- GNUNET_GETOPT_option_string ('l',
- "logfile",
- "LF",
- "will log to file LF",
- &logfile),
+ GNUNET_GETOPT_option_help (
+ "Runs benchmark logic against merchant backend. "
+ "Must be used with either 'ordinary' or 'corner' sub-commands."),
+ GNUNET_GETOPT_option_string (
+ 'l',
+ "logfile",
+ "LF",
+ "will log to file LF",
+ &logfile),
GNUNET_GETOPT_option_loglevel (&loglev),
GNUNET_GETOPT_OPTION_END
};
struct GNUNET_GETOPT_CommandLineOption corner_options[] = {
- GNUNET_GETOPT_option_string ('l',
- "logfile",
- "LF",
- "will log to file LF",
- &logfile),
- GNUNET_GETOPT_option_loglevel (&loglev),
+ GNUNET_GETOPT_option_string (
+ 'a',
+ "apikey",
+ "APIKEY",
+ "HTTP 'Authorization' header to send to the merchant",
+ &apikey),
GNUNET_GETOPT_option_cfgfile (&cfg_filename),
+ GNUNET_GETOPT_option_flag (
+ 'f',
+ "fakebank",
+ "use fakebank for the banking system",
+ &use_fakebank),
GNUNET_GETOPT_option_help ("Populate databases with corner case payments"),
- GNUNET_GETOPT_option_uint ('u',
- "unaggregated-number",
- "UN",
- "will generate UN unaggregated payments, defaults to 1",
- &unaggregated_number),
- GNUNET_GETOPT_option_uint ('t',
- "two-coins",
- "TC",
- "will perform TC 2-coins payments, defaults to 1",
- &twocoins_number),
+ GNUNET_GETOPT_option_string (
+ 'l',
+ "logfile",
+ "LF",
+ "will log to file LF",
+ &logfile),
+ GNUNET_GETOPT_option_loglevel (&loglev),
+ GNUNET_GETOPT_option_uint (
+ 't',
+ "two-coins",
+ "TC",
+ "will perform TC 2-coins payments, defaults to 1",
+ &twocoins_number),
+ GNUNET_GETOPT_option_uint (
+ 'U',
+ "unaggregated-number",
+ "UN",
+ "will generate UN unaggregated payments, defaults to 1",
+ &unaggregated_number),
GNUNET_GETOPT_option_string (
'u',
"exchange-account-section",
"SECTION",
"use exchange bank account configuration from the given SECTION",
&exchange_bank_section),
+ GNUNET_GETOPT_OPTION_END
+ };
+ struct GNUNET_GETOPT_CommandLineOption ordinary_options[] = {
+ GNUNET_GETOPT_option_string (
+ 'a',
+ "apikey",
+ "APIKEY",
+ "HTTP 'Authorization' header to send to the merchant",
+ &apikey),
+ GNUNET_GETOPT_option_cfgfile (&cfg_filename),
+ GNUNET_GETOPT_option_mandatory (
+ GNUNET_GETOPT_option_string (
+ 'e',
+ "exchange-account",
+ "SECTION",
+ "configuration section specifying the exchange account to use, mandatory",
+ &exchange_account)),
GNUNET_GETOPT_option_flag (
'f',
"fakebank",
"use fakebank for the banking system",
&use_fakebank),
- GNUNET_GETOPT_option_string ('a',
- "apikey",
- "APIKEY",
- "HTTP 'Authorization' header to send to the merchant",
- &apikey),
- GNUNET_GETOPT_OPTION_END
- };
- struct GNUNET_GETOPT_CommandLineOption ordinary_options[] = {
- GNUNET_GETOPT_option_string ('l',
- "logfile",
- "LF",
- "will log to file LF",
- &logfile),
+ GNUNET_GETOPT_option_help (
+ "Generate Taler ordinary payments"
+ " to populate the databases"),
+ GNUNET_GETOPT_option_string (
+ 'l',
+ "logfile",
+ "LF",
+ "will log to file LF",
+ &logfile),
GNUNET_GETOPT_option_loglevel (&loglev),
- GNUNET_GETOPT_option_cfgfile (&cfg_filename),
- GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION),
- GNUNET_GETOPT_option_help ("Generate Taler ordinary payments"
- " to populate the databases"),
- GNUNET_GETOPT_option_mandatory (
- GNUNET_GETOPT_option_string ('e',
- "exchange-account",
- "SECTION",
- "configuration section specifying the exchange account to use, mandatory",
- &exchange_account)),
- GNUNET_GETOPT_option_uint ('p',
- "payments-number",
- "PN",
- "will generate PN payments, defaults to 1",
- &payments_number),
- GNUNET_GETOPT_option_string ('a',
- "apikey",
- "APIKEY",
- "HTTP 'Authorization' header to send to the merchant",
- &apikey),
- GNUNET_GETOPT_option_uint ('t',
- "tracks-number",
- "TN",
- "will perform TN /track operations, defaults to 1",
- &tracks_number),
+ GNUNET_GETOPT_option_uint (
+ 'p',
+ "payments-number",
+ "PN",
+ "will generate PN payments, defaults to 1",
+ &payments_number),
+ GNUNET_GETOPT_option_uint (
+ 't',
+ "tracks-number",
+ "TN",
+ "will perform TN /track operations, defaults to 1",
+ &tracks_number),
GNUNET_GETOPT_option_version (PACKAGE_VERSION "-" VCS_VERSION),
GNUNET_GETOPT_OPTION_END
};
@@ -638,10 +657,10 @@ main (int argc,
GNUNET_CONFIGURATION_destroy (cfg);
}
- GNUNET_assert (0 < GNUNET_asprintf (&alt_instance_url,
- "%sinstances/%s/",
- merchant_url,
- alt_instance_id));
+ GNUNET_asprintf (&alt_instance_url,
+ "%sinstances/%s/",
+ merchant_url,
+ alt_instance_id);
{
enum GNUNET_GenericReturnValue result;