diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-06-07 23:11:05 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-06-07 23:11:05 +0200 |
commit | a2dde02b64a8ee75c9243632eb45a6ceb9b62dd5 (patch) | |
tree | 378cb6aefaf7f00894a7c8916fad9c3de84e31b4 /src/testing/testing_api_cmd_stat.c | |
parent | 015b08b0489d72f3fda587eec900bc4193a6a57e (diff) |
major libtalertesting API refactoring, including no longer having taler-specific logic in the test engine core
Diffstat (limited to 'src/testing/testing_api_cmd_stat.c')
-rw-r--r-- | src/testing/testing_api_cmd_stat.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/testing/testing_api_cmd_stat.c b/src/testing/testing_api_cmd_stat.c index 5d41c05c..f85072a1 100644 --- a/src/testing/testing_api_cmd_stat.c +++ b/src/testing/testing_api_cmd_stat.c @@ -74,13 +74,15 @@ stat_cmd (struct TALER_TESTING_Timer *timings, /** * Obtain statistics for @a timings of @a cmd * - * @param timings what timings to get + * @param[in,out] cls what timings to get * @param cmd command to process */ static void -do_stat (struct TALER_TESTING_Timer *timings, +do_stat (void *cls, const struct TALER_TESTING_Command *cmd) { + struct TALER_TESTING_Timer *timings = cls; + if (TALER_TESTING_cmd_is_batch (cmd)) { struct TALER_TESTING_Command **bcmd; @@ -121,13 +123,10 @@ stat_run (void *cls, { struct TALER_TESTING_Timer *timings = cls; - for (unsigned int i = 0; NULL != is->commands[i].label; i++) - { - if (cmd == &is->commands[i]) - break; /* skip at our current command */ - do_stat (timings, - &is->commands[i]); - } + TALER_TESTING_iterate (is, + true, + &do_stat, + timings); TALER_TESTING_interpreter_next (is); } |