aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testing_lib.h
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-08-10 15:18:18 +0000
committerNathan S. Evans <evans@in.tum.de>2010-08-10 15:18:18 +0000
commit98d0dea1af964cd623279f027bc63d54e5775ab7 (patch)
tree602b4454ca83c6d0db30671a4546ffcbc4c2f465 /src/include/gnunet_testing_lib.h
parent49f3bd45e74b2723ef94f66ca5077e23c00685d5 (diff)
downloadgnunet-98d0dea1af964cd623279f027bc63d54e5775ab7.tar.gz
gnunet-98d0dea1af964cd623279f027bc63d54e5775ab7.zip
testing function definitions, minor stuff
Diffstat (limited to 'src/include/gnunet_testing_lib.h')
-rw-r--r--src/include/gnunet_testing_lib.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h
index 479cb07e0..5145e2e09 100644
--- a/src/include/gnunet_testing_lib.h
+++ b/src/include/gnunet_testing_lib.h
@@ -33,6 +33,7 @@
33#define GNUNET_TESTING_LIB_H 33#define GNUNET_TESTING_LIB_H
34 34
35#include "gnunet_util_lib.h" 35#include "gnunet_util_lib.h"
36#include "gnunet_statistics_service.h"
36 37
37#ifdef __cplusplus 38#ifdef __cplusplus
38extern "C" 39extern "C"
@@ -615,6 +616,32 @@ GNUNET_TESTING_daemons_churn (struct GNUNET_TESTING_PeerGroup *pg,
615 GNUNET_TESTING_NotifyCompletion cb, 616 GNUNET_TESTING_NotifyCompletion cb,
616 void *cb_cls); 617 void *cb_cls);
617 618
619/**
620 * Callback function to process statistic values.
621 *
622 * @param cls closure
623 * @param peer the peer the statistics belong to
624 * @param subsystem name of subsystem that created the statistic
625 * @param name the name of the datum
626 * @param value the current value
627 * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not
628 * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration
629 */
630typedef int (*GNUNET_TESTING_STATISTICS_Iterator) (void *cls,
631 const struct GNUNET_PeerIdentity *peer,
632 const char *subsystem,
633 const char *name,
634 uint64_t value,
635 int is_persistent);
636
637/**
638 * Iterate over all (running) peers in the peer group, retrieve
639 * all statistics from each.
640 */
641void
642GNUNET_TESTING_get_statistics (struct GNUNET_TESTING_PeerGroup *pg,
643 GNUNET_STATISTICS_Callback cont,
644 GNUNET_TESTING_STATISTICS_Iterator proc, void *cls);
618 645
619/** 646/**
620 * Topologies supported for testbeds. 647 * Topologies supported for testbeds.