diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-03-20 02:36:50 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-03-20 02:36:50 +0100 |
commit | 10c56bcea05df9ac5a7036850039900fbe435e00 (patch) | |
tree | 858b5d691cfecbab0216eaf415ac462e4b07cc37 /src/testing/testing_api_cmd_deposit.c | |
parent | 7a1c6769e428f6f8bb413fb74383c82e16871d2c (diff) | |
download | exchange-10c56bcea05df9ac5a7036850039900fbe435e00.tar.xz |
improving benchmarking logic, including more timings
Diffstat (limited to 'src/testing/testing_api_cmd_deposit.c')
-rw-r--r-- | src/testing/testing_api_cmd_deposit.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/testing/testing_api_cmd_deposit.c b/src/testing/testing_api_cmd_deposit.c index 6781568a1..6404a94a4 100644 --- a/src/testing/testing_api_cmd_deposit.c +++ b/src/testing/testing_api_cmd_deposit.c @@ -34,6 +34,12 @@ */ #define NUM_RETRIES 5 +/** + * How long do we wait AT MOST when retrying? + */ +#define MAX_BACKOFF GNUNET_TIME_relative_multiply ( \ + GNUNET_TIME_UNIT_MILLISECONDS, 100) + /** * State for a "deposit" CMD. @@ -205,7 +211,8 @@ deposit_cb (void *cls, if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == ec) ds->backoff = GNUNET_TIME_UNIT_ZERO; else - ds->backoff = EXCHANGE_LIB_BACKOFF (ds->backoff); + ds->backoff = GNUNET_TIME_randomized_backoff (ds->backoff, + MAX_BACKOFF); ds->retry_task = GNUNET_SCHEDULER_add_delayed (ds->backoff, &do_retry, @@ -355,7 +362,6 @@ deposit_run (void *cls, &coin_sig, &deposit_cb, ds); - if (NULL == ds->dh) { GNUNET_break (0); |