diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-06-10 11:07:06 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-06-10 11:07:06 +0200 |
commit | 70bfe0ed1b9a5dbb6cc487465ef3c3df4cdb0436 (patch) | |
tree | 5f32b30f5b58dfc502c273bebecffbcb79fc3c4b /src/testing/testing_api_cmd_stat.c | |
parent | 46188ae07e97d12b73269167459707844b3c2486 (diff) | |
parent | d8f8c550bd7ad85f9da9bc5edba619e533eabcc8 (diff) |
Merge branch 'master' into age-withdraw
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); } |