diff options
author | nevans <nevans@140774ce-b5e7-0310-ab8b-a85725594a96> | 2010-08-10 15:18:18 +0000 |
---|---|---|
committer | nevans <nevans@140774ce-b5e7-0310-ab8b-a85725594a96> | 2010-08-10 15:18:18 +0000 |
commit | 39375a9e39c64dcc6264b5342c6c0d543726ec7f (patch) | |
tree | 602b4454ca83c6d0db30671a4546ffcbc4c2f465 /src/include/gnunet_testing_lib.h | |
parent | 70561ec3ed13f3760635a0c97bcef1d9c066bccb (diff) |
testing function definitions, minor stuff
git-svn-id: https://gnunet.org/svn/gnunet@12507 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/include/gnunet_testing_lib.h')
-rw-r--r-- | src/include/gnunet_testing_lib.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h index 479cb07e09..5145e2e098 100644 --- a/src/include/gnunet_testing_lib.h +++ b/src/include/gnunet_testing_lib.h @@ -33,6 +33,7 @@ #define GNUNET_TESTING_LIB_H #include "gnunet_util_lib.h" +#include "gnunet_statistics_service.h" #ifdef __cplusplus extern "C" @@ -615,6 +616,32 @@ GNUNET_TESTING_daemons_churn (struct GNUNET_TESTING_PeerGroup *pg, GNUNET_TESTING_NotifyCompletion cb, void *cb_cls); +/** + * Callback function to process statistic values. + * + * @param cls closure + * @param peer the peer the statistics belong to + * @param subsystem name of subsystem that created the statistic + * @param name the name of the datum + * @param value the current value + * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not + * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration + */ +typedef int (*GNUNET_TESTING_STATISTICS_Iterator) (void *cls, + const struct GNUNET_PeerIdentity *peer, + const char *subsystem, + const char *name, + uint64_t value, + int is_persistent); + +/** + * Iterate over all (running) peers in the peer group, retrieve + * all statistics from each. + */ +void +GNUNET_TESTING_get_statistics (struct GNUNET_TESTING_PeerGroup *pg, + GNUNET_STATISTICS_Callback cont, + GNUNET_TESTING_STATISTICS_Iterator proc, void *cls); /** * Topologies supported for testbeds. |