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_auditor_deposit_confirmation.c | |
parent | 7a1c6769e428f6f8bb413fb74383c82e16871d2c (diff) | |
download | exchange-10c56bcea05df9ac5a7036850039900fbe435e00.tar.gz exchange-10c56bcea05df9ac5a7036850039900fbe435e00.tar.bz2 exchange-10c56bcea05df9ac5a7036850039900fbe435e00.zip |
improving benchmarking logic, including more timings
Diffstat (limited to 'src/testing/testing_api_cmd_auditor_deposit_confirmation.c')
-rw-r--r-- | src/testing/testing_api_cmd_auditor_deposit_confirmation.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/testing/testing_api_cmd_auditor_deposit_confirmation.c b/src/testing/testing_api_cmd_auditor_deposit_confirmation.c index bcef59c59..9981bc593 100644 --- a/src/testing/testing_api_cmd_auditor_deposit_confirmation.c +++ b/src/testing/testing_api_cmd_auditor_deposit_confirmation.c @@ -30,6 +30,12 @@ #include "backoff.h" /** + * How long do we wait AT MOST when retrying? + */ +#define MAX_BACKOFF GNUNET_TIME_relative_multiply ( \ + GNUNET_TIME_UNIT_MILLISECONDS, 100) + +/** * How often do we retry before giving up? */ #define NUM_RETRIES 5 @@ -160,7 +166,8 @@ deposit_confirmation_cb (void *cls, if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == ec) dcs->backoff = GNUNET_TIME_UNIT_ZERO; else - dcs->backoff = EXCHANGE_LIB_BACKOFF (dcs->backoff); + dcs->backoff = GNUNET_TIME_randomized_backoff (dcs->backoff, + MAX_BACKOFF); dcs->retry_task = GNUNET_SCHEDULER_add_delayed (dcs->backoff, &do_retry, dcs); |