diff options
Diffstat (limited to 'src/testbed')
-rw-r--r-- | src/testbed/Makefile.am | 1 | ||||
-rw-r--r-- | src/testbed/testbed_api_statistics.c | 56 |
2 files changed, 57 insertions, 0 deletions
diff --git a/src/testbed/Makefile.am b/src/testbed/Makefile.am index a94193305..5efaef97e 100644 --- a/src/testbed/Makefile.am +++ b/src/testbed/Makefile.am | |||
@@ -51,6 +51,7 @@ libgnunettestbed_la_SOURCES = \ | |||
51 | testbed_api_operations.c testbed_api_operations.h \ | 51 | testbed_api_operations.c testbed_api_operations.h \ |
52 | testbed_api_peers.c testbed_api_peers.h \ | 52 | testbed_api_peers.c testbed_api_peers.h \ |
53 | testbed_api_services.c \ | 53 | testbed_api_services.c \ |
54 | testbed_api_statistics.c \ | ||
54 | testbed_api_testbed.c \ | 55 | testbed_api_testbed.c \ |
55 | testbed_api_test.c \ | 56 | testbed_api_test.c \ |
56 | testbed_api_topology.c | 57 | testbed_api_topology.c |
diff --git a/src/testbed/testbed_api_statistics.c b/src/testbed/testbed_api_statistics.c new file mode 100644 index 000000000..8fe104be2 --- /dev/null +++ b/src/testbed/testbed_api_statistics.c | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | (C) 2008--2012 Christian Grothoff (and other contributing authors) | ||
4 | |||
5 | GNUnet is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published | ||
7 | by the Free Software Foundation; either version 3, or (at your | ||
8 | option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with GNUnet; see the file COPYING. If not, write to the | ||
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
18 | Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * @file testbed/testbed_api_statistics.c | ||
23 | * @brief high-level statistics function | ||
24 | * @author Christian Grothoff | ||
25 | * @author Sree Harsha Totakura | ||
26 | */ | ||
27 | #include "platform.h" | ||
28 | #include "gnunet_testbed_service.h" | ||
29 | |||
30 | |||
31 | /** | ||
32 | * Convenience method that iterates over all (running) peers | ||
33 | * and retrieves all statistics from each peer. | ||
34 | * | ||
35 | * @param num_peers number of peers to iterate over | ||
36 | * @param peers array of peers to iterate over | ||
37 | * @param proc processing function for each statistic retrieved | ||
38 | * @param cont continuation to call once call is completed(?) | ||
39 | * @param cls closure to pass to proc and cont | ||
40 | * @return operation handle to cancel the operation | ||
41 | */ | ||
42 | struct GNUNET_TESTBED_Operation * | ||
43 | GNUNET_TESTBED_get_statistics (unsigned int num_peers, | ||
44 | struct GNUNET_TESTBED_Peer **peers, | ||
45 | GNUNET_TESTBED_StatisticsIterator proc, | ||
46 | GNUNET_TESTBED_OperationCompletionCallback cont, | ||
47 | void *cls) | ||
48 | { | ||
49 | // FIXME: not implemented, but clients will kind-of work if we do this: | ||
50 | GNUNET_break (0); | ||
51 | cont (cls, NULL, NULL); | ||
52 | return NULL; | ||
53 | } | ||
54 | |||
55 | |||
56 | /* end of testbed_api_statistics.c */ | ||