aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testbed_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-09-10 18:58:23 +0000
committerChristian Grothoff <christian@grothoff.org>2012-09-10 18:58:23 +0000
commitad85dcdd218b4c710793bea68f1a54d0b07e3cf3 (patch)
tree51acd0ef9508d8b752550862b81f49111de80bd2 /src/include/gnunet_testbed_service.h
parentd7251969415f00a5f80f2667088c31b3630b3792 (diff)
downloadgnunet-ad85dcdd218b4c710793bea68f1a54d0b07e3cf3.tar.gz
gnunet-ad85dcdd218b4c710793bea68f1a54d0b07e3cf3.zip
adding another testbed API function: convenience function to get all stats from all peers
Diffstat (limited to 'src/include/gnunet_testbed_service.h')
-rw-r--r--src/include/gnunet_testbed_service.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/include/gnunet_testbed_service.h b/src/include/gnunet_testbed_service.h
index 0c1cf985f..bd9e51bfa 100644
--- a/src/include/gnunet_testbed_service.h
+++ b/src/include/gnunet_testbed_service.h
@@ -1202,6 +1202,44 @@ GNUNET_TESTBED_destroy (struct GNUNET_TESTBED_Testbed *testbed);
1202 1202
1203 1203
1204/** 1204/**
1205 * Callback function to process statistic values from all peers.
1206 *
1207 * @param cls closure
1208 * @param peer the peer the statistic belong to
1209 * @param subsystem name of subsystem that created the statistic
1210 * @param name the name of the datum
1211 * @param value the current value
1212 * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not
1213 * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration
1214 */
1215typedef int (*GNUNET_TESTBED_StatisticsIterator) (void *cls,
1216 const struct GNUNET_TESTBED_Peer *peer,
1217 const char *subsystem,
1218 const char *name,
1219 uint64_t value,
1220 int is_persistent);
1221
1222
1223/**
1224 * Convenience method that iterates over all (running) peers
1225 * and retrieves all statistics from each peer.
1226 *
1227 * @param num_peers number of peers to iterate over
1228 * @param peers array of peers to iterate over
1229 * @param proc processing function for each statistic retrieved
1230 * @param cont continuation to call once call is completed(?)
1231 * @param cls closure to pass to proc and cont
1232 * @return operation handle to cancel the operation
1233 */
1234struct GNUNET_TESTBED_Operation *
1235GNUNET_TESTBED_get_statistics (unsigned int num_peers,
1236 struct GNUNET_TESTBED_Peer **peers,
1237 GNUNET_TESTBED_StatisticsIterator proc,
1238 GNUNET_TESTBED_OperationCompletionCallback cont,
1239 void *cls);
1240
1241
1242/**
1205 * Convenience method for running a testbed with 1243 * Convenience method for running a testbed with
1206 * a single call. Underlay and overlay topology 1244 * a single call. Underlay and overlay topology
1207 * are configured using the "UNDERLAY" and "OVERLAY" 1245 * are configured using the "UNDERLAY" and "OVERLAY"