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/include/taler_testing_lib.h | |
parent | 7a1c6769e428f6f8bb413fb74383c82e16871d2c (diff) | |
download | exchange-10c56bcea05df9ac5a7036850039900fbe435e00.tar.xz |
improving benchmarking logic, including more timings
Diffstat (limited to 'src/include/taler_testing_lib.h')
-rw-r--r-- | src/include/taler_testing_lib.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index 7e392f09b..9e32d72e6 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -495,6 +495,16 @@ struct TALER_TESTING_Command const char *trait, unsigned int index); + /** + * When did the execution of this command start? + */ + struct GNUNET_TIME_Absolute start_time; + + /** + * When did the execution of this command finish? + */ + struct GNUNET_TIME_Absolute finish_time; + }; @@ -1822,6 +1832,39 @@ TALER_TESTING_cmd_insert_deposit (const char *label, const char *amount_with_fee, const char *deposit_fee); + +/** + * Performance counter. + */ +struct TALER_TESTING_Timer +{ + /** + * For which type of commands. + */ + const char *prefix; + + /** + * Total time spend in all commands of this type. + */ + struct GNUNET_TIME_Relative total_duration; + + /** + * Number of commands summed up. + */ + unsigned int num_commands; +}; + + +/** + * Obtain performance data from the interpreter. + * + * @param timers what commands (by label) to obtain runtimes for + * @return the command + */ +struct TALER_TESTING_Command +TALER_TESTING_cmd_stat (struct TALER_TESTING_Timer *timers); + + /* *** Generic trait logic for implementing traits ********* */ /** |