aboutsummaryrefslogtreecommitdiff
path: root/src/nse/gnunet-nse-profiler.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-25 21:42:11 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-25 21:42:11 +0000
commit78ad97319349e9881653684f276dd620a0a423e9 (patch)
treecded8f0063f6848429706a36bd51174e62417b7e /src/nse/gnunet-nse-profiler.c
parentb968c5926b205c3cdd467474753746ef21522b32 (diff)
downloadgnunet-78ad97319349e9881653684f276dd620a0a423e9.tar.gz
gnunet-78ad97319349e9881653684f276dd620a0a423e9.zip
-misc fixes based on cppcheck
Diffstat (limited to 'src/nse/gnunet-nse-profiler.c')
-rw-r--r--src/nse/gnunet-nse-profiler.c45
1 files changed, 7 insertions, 38 deletions
diff --git a/src/nse/gnunet-nse-profiler.c b/src/nse/gnunet-nse-profiler.c
index e03da6d6e..fa0b97440 100644
--- a/src/nse/gnunet-nse-profiler.c
+++ b/src/nse/gnunet-nse-profiler.c
@@ -84,39 +84,6 @@ struct NSEPeer
84 84
85 85
86/** 86/**
87 * Context for the stats task?
88 */
89struct StatsContext
90{
91
92 /**
93 * How many messages have peers received during the test.
94 */
95 unsigned long long total_nse_received_messages;
96
97 /**
98 * How many messages have peers send during the test (should be == received).
99 */
100 unsigned long long total_nse_transmitted_messages;
101
102 /**
103 * How many messages have travelled an edge in both directions.
104 */
105 unsigned long long total_nse_cross;
106
107 /**
108 * How many extra messages per edge (corrections) have been received.
109 */
110 unsigned long long total_nse_extra;
111
112 /**
113 * How many messages have been discarded.
114 */
115 unsigned long long total_discarded;
116};
117
118
119/**
120 * Operation map entry 87 * Operation map entry
121 */ 88 */
122struct OpListEntry 89struct OpListEntry
@@ -413,16 +380,18 @@ nse_disconnect_adapter (void *cls,
413/** 380/**
414 * Callback function to process statistic values. 381 * Callback function to process statistic values.
415 * 382 *
416 * @param cls struct StatsContext 383 * @param cls `struct NSEPeer`
417 * @param subsystem name of subsystem that created the statistic 384 * @param subsystem name of subsystem that created the statistic
418 * @param name the name of the datum 385 * @param name the name of the datum
419 * @param value the current value 386 * @param value the current value
420 * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not 387 * @param is_persistent #GNUNET_YES if the value is persistent, #GNUNET_NO if not
421 * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration 388 * @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration
422 */ 389 */
423static int 390static int
424stat_iterator (void *cls, const char *subsystem, const char *name, 391stat_iterator (void *cls,
425 uint64_t value, int is_persistent) 392 const char *subsystem,
393 const char *name,
394 uint64_t value, int is_persistent)
426{ 395{
427 char *output_buffer; 396 char *output_buffer;
428 struct GNUNET_TIME_Absolute now; 397 struct GNUNET_TIME_Absolute now;