aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2018-11-02 12:59:57 +0100
committerJulius Bünger <buenger@mytum.de>2018-11-23 00:22:19 +0100
commit7b3d14aa405f2060132aee4987d085ade74bad37 (patch)
tree007e4c89c5ed41842428dbf7897fca8439b46ca3
parentfbc5f3876a2ed52f18e2a2810e3cdda497cc99ea (diff)
downloadgnunet-7b3d14aa405f2060132aee4987d085ade74bad37.tar.gz
gnunet-7b3d14aa405f2060132aee4987d085ade74bad37.zip
RPS profiler: Dump more statistics
-rw-r--r--src/rps/gnunet-rps-profiler.c144
1 files changed, 135 insertions, 9 deletions
diff --git a/src/rps/gnunet-rps-profiler.c b/src/rps/gnunet-rps-profiler.c
index b17fb6a50..85e776df1 100644
--- a/src/rps/gnunet-rps-profiler.c
+++ b/src/rps/gnunet-rps-profiler.c
@@ -83,14 +83,28 @@ enum STAT_TYPE
83 STAT_TYPE_BLOCKS_NO_PUSH_NO_PULL, /* 6 */ 83 STAT_TYPE_BLOCKS_NO_PUSH_NO_PULL, /* 6 */
84 STAT_TYPE_ISSUED_PUSH_SEND, /* 7 */ 84 STAT_TYPE_ISSUED_PUSH_SEND, /* 7 */
85 STAT_TYPE_ISSUED_PULL_REQ, /* 8 */ 85 STAT_TYPE_ISSUED_PULL_REQ, /* 8 */
86 STAT_TYPE_ISSUED_PULL_REP, /* 9 */ 86 STAT_TYPE_ISSUED_PULL_REQ_MH, /* 9 */
87 STAT_TYPE_SENT_PUSH_SEND, /* 10 */ 87 STAT_TYPE_ISSUED_PULL_REP, /* 10 */
88 STAT_TYPE_SENT_PULL_REQ, /* 11 */ 88 STAT_TYPE_SENT_PUSH_SEND, /* 11 */
89 STAT_TYPE_SENT_PULL_REP, /* 12 */ 89 STAT_TYPE_SENT_PULL_REQ, /* 12 */
90 STAT_TYPE_RECV_PUSH_SEND, /* 13 */ 90 STAT_TYPE_SENT_PULL_REQ_MH, /* 13 */
91 STAT_TYPE_RECV_PULL_REQ, /* 14 */ 91 STAT_TYPE_SENT_PULL_REP, /* 14 */
92 STAT_TYPE_RECV_PULL_REP, /* 15 */ 92 STAT_TYPE_RECV_PUSH_SEND, /* 15 */
93 STAT_TYPE_MAX, /* 16 */ 93 STAT_TYPE_RECV_PULL_REQ, /* 16 */
94 STAT_TYPE_RECV_PULL_REQ_MH, /* 17 */
95 STAT_TYPE_RECV_PULL_REP, /* 18 */
96 STAT_TYPE_RECV_PULL_REP_MH, /* 19 */
97 STAT_TYPE_VIEW_SIZE, /* 20 */
98 STAT_TYPE_KNOWN_PEERS, /* 21 */
99 STAT_TYPE_VALID_PEERS, /* 22 */
100 STAT_TYPE_LEARND_PEERS, /* 23 */
101 STAT_TYPE_PENDING_ONLINE_CHECKS, /* 24 */
102 STAT_TYPE_UNREQUESTED_PULL_REPLIES, /* 25 */
103 STAT_TYPE_PEERS_IN_PUSH_MAP, /* 26 */
104 STAT_TYPE_PEERS_IN_PULL_MAP, /* 27 */
105 STAT_TYPE_PEERS_IN_VIEW, /* 28 */
106 STAT_TYPE_VIEW_SIZE_AIM, /* 29 */
107 STAT_TYPE_MAX, /* 30 */
94}; 108};
95 109
96static char* stat_type_strings[] = { 110static char* stat_type_strings[] = {
@@ -103,13 +117,27 @@ static char* stat_type_strings[] = {
103 "# rounds blocked - no pushes, no pull replies", 117 "# rounds blocked - no pushes, no pull replies",
104 "# push send issued", 118 "# push send issued",
105 "# pull request send issued", 119 "# pull request send issued",
120 "# pull request send issued (multi-hop peer)",
106 "# pull reply send issued", 121 "# pull reply send issued",
107 "# pushes sent", 122 "# pushes sent",
108 "# pull requests sent", 123 "# pull requests sent",
124 "# pull requests sent (multi-hop peer)",
109 "# pull replys sent", 125 "# pull replys sent",
110 "# push message received", 126 "# push message received",
111 "# pull request message received", 127 "# pull request message received",
128 "# pull request message received (multi-hop peer)",
112 "# pull reply messages received", 129 "# pull reply messages received",
130 "# pull reply messages received (multi-hop peer)",
131 "view size",
132 "# known peers",
133 "# valid peers",
134 "# learnd peers",
135 "# pending online checks",
136 "# unrequested pull replies",
137 "# peers in push map at end of round",
138 "# peers in pull map at end of round",
139 "# peers in view at end of round",
140 "view size aim",
113}; 141};
114 142
115struct STATcls 143struct STATcls
@@ -182,6 +210,12 @@ enum STAT_TYPE stat_str_2_type (const char *stat_str)
182 { 210 {
183 return STAT_TYPE_ISSUED_PULL_REQ; 211 return STAT_TYPE_ISSUED_PULL_REQ;
184 } 212 }
213 else if (0 == strncmp (stat_type_strings[STAT_TYPE_ISSUED_PULL_REQ_MH],
214 stat_str,
215 strlen (stat_type_strings[STAT_TYPE_ISSUED_PULL_REQ_MH])))
216 {
217 return STAT_TYPE_ISSUED_PULL_REQ_MH;
218 }
185 else if (0 == strncmp (stat_type_strings[STAT_TYPE_ISSUED_PULL_REP], 219 else if (0 == strncmp (stat_type_strings[STAT_TYPE_ISSUED_PULL_REP],
186 stat_str, 220 stat_str,
187 strlen (stat_type_strings[STAT_TYPE_ISSUED_PULL_REP]))) 221 strlen (stat_type_strings[STAT_TYPE_ISSUED_PULL_REP])))
@@ -200,6 +234,12 @@ enum STAT_TYPE stat_str_2_type (const char *stat_str)
200 { 234 {
201 return STAT_TYPE_SENT_PULL_REQ; 235 return STAT_TYPE_SENT_PULL_REQ;
202 } 236 }
237 else if (0 == strncmp (stat_type_strings[STAT_TYPE_SENT_PULL_REQ_MH],
238 stat_str,
239 strlen (stat_type_strings[STAT_TYPE_SENT_PULL_REQ_MH])))
240 {
241 return STAT_TYPE_SENT_PULL_REQ_MH;
242 }
203 else if (0 == strncmp (stat_type_strings[STAT_TYPE_SENT_PULL_REP], 243 else if (0 == strncmp (stat_type_strings[STAT_TYPE_SENT_PULL_REP],
204 stat_str, 244 stat_str,
205 strlen (stat_type_strings[STAT_TYPE_SENT_PULL_REP]))) 245 strlen (stat_type_strings[STAT_TYPE_SENT_PULL_REP])))
@@ -218,12 +258,84 @@ enum STAT_TYPE stat_str_2_type (const char *stat_str)
218 { 258 {
219 return STAT_TYPE_RECV_PULL_REQ; 259 return STAT_TYPE_RECV_PULL_REQ;
220 } 260 }
261 else if (0 == strncmp (stat_type_strings[STAT_TYPE_RECV_PULL_REQ_MH],
262 stat_str,
263 strlen (stat_type_strings[STAT_TYPE_RECV_PULL_REQ_MH])))
264 {
265 return STAT_TYPE_RECV_PULL_REQ_MH;
266 }
221 else if (0 == strncmp (stat_type_strings[STAT_TYPE_RECV_PULL_REP], 267 else if (0 == strncmp (stat_type_strings[STAT_TYPE_RECV_PULL_REP],
222 stat_str, 268 stat_str,
223 strlen (stat_type_strings[STAT_TYPE_RECV_PULL_REP]))) 269 strlen (stat_type_strings[STAT_TYPE_RECV_PULL_REP])))
224 { 270 {
225 return STAT_TYPE_RECV_PULL_REP; 271 return STAT_TYPE_RECV_PULL_REP;
226 } 272 }
273 else if (0 == strncmp (stat_type_strings[STAT_TYPE_RECV_PULL_REP_MH],
274 stat_str,
275 strlen (stat_type_strings[STAT_TYPE_RECV_PULL_REP_MH])))
276 {
277 return STAT_TYPE_RECV_PULL_REP_MH;
278 }
279 else if (0 == strncmp (stat_type_strings[STAT_TYPE_VIEW_SIZE],
280 stat_str,
281 strlen (stat_type_strings[STAT_TYPE_VIEW_SIZE])))
282 {
283 return STAT_TYPE_VIEW_SIZE;
284 }
285 else if (0 == strncmp (stat_type_strings[STAT_TYPE_KNOWN_PEERS],
286 stat_str,
287 strlen (stat_type_strings[STAT_TYPE_KNOWN_PEERS])))
288 {
289 return STAT_TYPE_KNOWN_PEERS;
290 }
291 else if (0 == strncmp (stat_type_strings[STAT_TYPE_VALID_PEERS],
292 stat_str,
293 strlen (stat_type_strings[STAT_TYPE_VALID_PEERS])))
294 {
295 return STAT_TYPE_VALID_PEERS;
296 }
297 else if (0 == strncmp (stat_type_strings[STAT_TYPE_LEARND_PEERS],
298 stat_str,
299 strlen (stat_type_strings[STAT_TYPE_LEARND_PEERS])))
300 {
301 return STAT_TYPE_LEARND_PEERS;
302 }
303 else if (0 == strncmp (stat_type_strings[STAT_TYPE_PENDING_ONLINE_CHECKS],
304 stat_str,
305 strlen (stat_type_strings[STAT_TYPE_PENDING_ONLINE_CHECKS])))
306 {
307 return STAT_TYPE_PENDING_ONLINE_CHECKS;
308 }
309 else if (0 == strncmp (stat_type_strings[STAT_TYPE_UNREQUESTED_PULL_REPLIES],
310 stat_str,
311 strlen (stat_type_strings[STAT_TYPE_UNREQUESTED_PULL_REPLIES])))
312 {
313 return STAT_TYPE_UNREQUESTED_PULL_REPLIES;
314 }
315 else if (0 == strncmp (stat_type_strings[STAT_TYPE_PEERS_IN_PUSH_MAP],
316 stat_str,
317 strlen (stat_type_strings[STAT_TYPE_PEERS_IN_PUSH_MAP])))
318 {
319 return STAT_TYPE_PEERS_IN_PUSH_MAP;
320 }
321 else if (0 == strncmp (stat_type_strings[STAT_TYPE_PEERS_IN_PULL_MAP],
322 stat_str,
323 strlen (stat_type_strings[STAT_TYPE_PEERS_IN_PULL_MAP])))
324 {
325 return STAT_TYPE_PEERS_IN_PULL_MAP;
326 }
327 else if (0 == strncmp (stat_type_strings[STAT_TYPE_PEERS_IN_VIEW],
328 stat_str,
329 strlen (stat_type_strings[STAT_TYPE_PEERS_IN_VIEW])))
330 {
331 return STAT_TYPE_PEERS_IN_VIEW;
332 }
333 else if (0 == strncmp (stat_type_strings[STAT_TYPE_VIEW_SIZE_AIM],
334 stat_str,
335 strlen (stat_type_strings[STAT_TYPE_VIEW_SIZE_AIM])))
336 {
337 return STAT_TYPE_VIEW_SIZE_AIM;
338 }
227 return STAT_TYPE_MAX; 339 return STAT_TYPE_MAX;
228} 340}
229 341
@@ -2681,13 +2793,27 @@ run (void *cls,
2681 BIT(STAT_TYPE_BLOCKS_NO_PUSH_NO_PULL) | 2793 BIT(STAT_TYPE_BLOCKS_NO_PUSH_NO_PULL) |
2682 BIT(STAT_TYPE_ISSUED_PUSH_SEND) | 2794 BIT(STAT_TYPE_ISSUED_PUSH_SEND) |
2683 BIT(STAT_TYPE_ISSUED_PULL_REQ) | 2795 BIT(STAT_TYPE_ISSUED_PULL_REQ) |
2796 BIT(STAT_TYPE_ISSUED_PULL_REQ_MH) |
2684 BIT(STAT_TYPE_ISSUED_PULL_REP) | 2797 BIT(STAT_TYPE_ISSUED_PULL_REP) |
2685 BIT(STAT_TYPE_SENT_PUSH_SEND) | 2798 BIT(STAT_TYPE_SENT_PUSH_SEND) |
2686 BIT(STAT_TYPE_SENT_PULL_REQ) | 2799 BIT(STAT_TYPE_SENT_PULL_REQ) |
2800 BIT(STAT_TYPE_SENT_PULL_REQ_MH) |
2687 BIT(STAT_TYPE_SENT_PULL_REP) | 2801 BIT(STAT_TYPE_SENT_PULL_REP) |
2688 BIT(STAT_TYPE_RECV_PUSH_SEND) | 2802 BIT(STAT_TYPE_RECV_PUSH_SEND) |
2689 BIT(STAT_TYPE_RECV_PULL_REQ) | 2803 BIT(STAT_TYPE_RECV_PULL_REQ) |
2690 BIT(STAT_TYPE_RECV_PULL_REP); 2804 BIT(STAT_TYPE_RECV_PULL_REQ_MH) |
2805 BIT(STAT_TYPE_RECV_PULL_REP) |
2806 BIT(STAT_TYPE_RECV_PULL_REP_MH) |
2807 BIT(STAT_TYPE_VIEW_SIZE) |
2808 BIT(STAT_TYPE_KNOWN_PEERS) |
2809 BIT(STAT_TYPE_VALID_PEERS) |
2810 BIT(STAT_TYPE_LEARND_PEERS) |
2811 BIT(STAT_TYPE_PENDING_ONLINE_CHECKS) |
2812 BIT(STAT_TYPE_UNREQUESTED_PULL_REPLIES) |
2813 BIT(STAT_TYPE_PEERS_IN_PUSH_MAP) |
2814 BIT(STAT_TYPE_PEERS_IN_PULL_MAP) |
2815 BIT(STAT_TYPE_PEERS_IN_VIEW) |
2816 BIT(STAT_TYPE_VIEW_SIZE_AIM);
2691 cur_test_run.have_collect_view = COLLECT_VIEW; 2817 cur_test_run.have_collect_view = COLLECT_VIEW;
2692 2818
2693 /* 'Clean' directory */ 2819 /* 'Clean' directory */