From d9474aab0ff6636962ca44dfb90d597203bd98df Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 9 Aug 2018 20:25:30 +0200 Subject: fix benchmark tool output and time measurement --- .../.config/taler/account-2.json | 4 ++-- src/benchmark/taler-exchange-benchmark.c | 22 ++++++++++++---------- .../testing_api_cmd_fakebank_transfer.c | 8 ++++++-- src/exchange/taler-exchange-httpd.c | 3 ++- 4 files changed, 22 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/benchmark/exchange_benchmark_home/.config/taler/account-2.json b/src/benchmark/exchange_benchmark_home/.config/taler/account-2.json index b320bd946..aa7256a82 100644 --- a/src/benchmark/exchange_benchmark_home/.config/taler/account-2.json +++ b/src/benchmark/exchange_benchmark_home/.config/taler/account-2.json @@ -1,5 +1,5 @@ { "url": "payto://x-taler-bank/localhost:8082/2", - "salt": "NYZ2WR8CPT5PB58X10EZDJDY3MSWHAHTD0M99JJH54Z0A916NTX4P4AF5Y3KPGRYEVX3TV7J2ZG6PKZSKFYMSKMHCN83ZT3V2216YP8", - "master_sig": "0RF7GBGKGJQ0ZQVP0HJ516CC882RV6HVJZABN5S1YMF6WD94QJJRZSTFB669QTNW63DPRP0YYJ0RGCNXA3AHQ1HGYDGAMZX0S983020" + "salt": "KZCTEHKD39TDK9CR9DYHNA5C6RYK1QYCBE1Z0198PBXKK1XTJ3D06CE3Q2QD4ZCED5H16RB9V79QBP5VQ7QRCST36CC4H9P2WAYBMGR", + "master_sig": "55PBWD75WS0S9CKMGKXQPX9R22YM7CS3AARYXZ2GNZJ76EXB63DX9JY3NWWB4PHAZWRKS54VCHYT8HAYNSX294C0CC7XPQF1Y3Y1628" } \ No newline at end of file diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c index c7155fd34..342408d88 100644 --- a/src/benchmark/taler-exchange-benchmark.c +++ b/src/benchmark/taler-exchange-benchmark.c @@ -120,11 +120,6 @@ static struct GNUNET_TIME_Relative duration; */ static unsigned int result; -/** - * How many refreshes got executed. - */ -static unsigned int howmany_refreshes; - /** * How many coins we want to create. */ @@ -401,7 +396,6 @@ run (void *cls, char *melt_label; char *reveal_label; - howmany_refreshes++; GNUNET_asprintf (&melt_label, "refresh-melt-%u", i); @@ -435,7 +429,6 @@ run (void *cls, unit); } all_commands[1 + howmany_coins] = TALER_TESTING_cmd_end (); - start_time = GNUNET_TIME_absolute_get (); TALER_TESTING_run (is, all_commands); result = 1; @@ -536,7 +529,7 @@ parallel_benchmark (TALER_TESTING_Main main_cb, if (0 == fakebank) { GNUNET_SCHEDULER_run (&launch_fakebank, - NULL); + exchange_bank_account.bank_base_url); exit (0); } if (-1 == fakebank) @@ -546,9 +539,11 @@ parallel_benchmark (TALER_TESTING_Main main_cb, result = GNUNET_SYSERR; return 77; } + sleep (1); /* make sure fakebank process is ready before continuing */ /* FIXME: start wirewatch */ + start_time = GNUNET_TIME_absolute_get (); result = GNUNET_OK; for (unsigned int i=0;iinstance) { - GNUNET_assert (NULL != fts->config_filename); char *section; char *keys; struct GNUNET_CRYPTO_EddsaPrivateKey *priv; struct GNUNET_CONFIGURATION_Handle *cfg; - cfg = GNUNET_CONFIGURATION_create (); + GNUNET_assert (NULL != fts->config_filename); + cfg = GNUNET_CONFIGURATION_create (); if (GNUNET_OK != GNUNET_CONFIGURATION_load (cfg, fts->config_filename)) diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index cb8ba2833..e80ee5a72 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -944,10 +944,11 @@ main (int argc, } mhd - = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_PIPE_FOR_SHUTDOWN | MHD_USE_DEBUG | MHD_USE_DUAL_STACK, + = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_PIPE_FOR_SHUTDOWN | MHD_USE_DEBUG | MHD_USE_DUAL_STACK, // | MHD_USE_INTERNAL_POLLING_THREAD, (-1 == fh) ? serve_port : 0, NULL, NULL, &handle_mhd_request, NULL, + /* MHD_OPTION_THREAD_POOL_SIZE, (unsigned int) 8, */ MHD_OPTION_LISTEN_SOCKET, fh, MHD_OPTION_EXTERNAL_LOGGER, &handle_mhd_logs, NULL, MHD_OPTION_NOTIFY_COMPLETED, &handle_mhd_completion_callback, NULL, -- cgit v1.2.3