struct StatsContext
{
- unsigned long long total_nse_messages;
+ /**
+ * How many messages have peers received during the test.
+ */
+ unsigned long long total_nse_received_messages;
+ /**
+ * How many messages have peers send during the test (should be == received).
+ */
+ unsigned long long total_nse_sent_messages;
};
/* Stats lookup successful, write out data */
buf = NULL;
buf_len =
- GNUNET_asprintf (&buf, "TOTAL_NSE_MESSAGES: %u\n",
- stats_context->total_nse_messages);
+ GNUNET_asprintf (&buf, "TOTAL_NSE_RECEIVED_MESSAGES: %u\n",
+ stats_context->total_nse_received_messages);
+ if (buf_len > 0)
+ {
+ GNUNET_DISK_file_write (data_file, buf, buf_len);
+ }
+ GNUNET_free_non_null (buf);
+ buf = NULL;
+ buf_len =
+ GNUNET_asprintf (&buf, "TOTAL_NSE_SENT_MESSAGES: %u\n",
+ stats_context->total_nse_sent_messages);
if (buf_len > 0)
{
GNUNET_DISK_file_write (data_file, buf, buf_len);
{
struct StatsContext *stats_context = cls;
- if ((0 == strcmp (subsystem, "nse")) &&
- (0 == strcmp (name, "# flood messages received")))
+ if (0 == strcmp (subsystem, "nse"))
{
- stats_context->total_nse_messages += value;
-#if VERBOSE
- if (data_file != NULL)
+ if (0 == strcmp (name, "# flood messages received"))
{
- char *buf;
- int buf_len;
-
- buf = NULL;
- buf_len =
- GNUNET_asprintf (&buf, "Peer %s: %u\n", GNUNET_i2s(peer), value);
- if (buf_len > 0)
+ stats_context->total_nse_received_messages += value;
+#if VERBOSE
+ if (data_file != NULL)
{
- GNUNET_DISK_file_write (data_file, buf, buf_len);
+ char *buf;
+ int buf_len;
+
+ buf = NULL;
+ buf_len =
+ GNUNET_asprintf (&buf, "%s %u RECEIVED\n", GNUNET_i2s(peer), value);
+ if (buf_len > 0)
+ {
+ GNUNET_DISK_file_write (data_file, buf, buf_len);
+ }
+ GNUNET_free_non_null (buf);
}
- GNUNET_free_non_null (buf);
+#endif
}
+ if (0 == strcmp (name, "# flood messages sent"))
+ {
+ stats_context->total_nse_sent_messages += value;
+#if VERBOSE
+ if (data_file != NULL)
+ {
+ char *buf;
+ int buf_len;
+
+ buf = NULL;
+ buf_len =
+ GNUNET_asprintf (&buf, "%s %u SENT\n", GNUNET_i2s(peer), value);
+ if (buf_len > 0)
+ {
+ GNUNET_DISK_file_write (data_file, buf, buf_len);
+ }
+ GNUNET_free_non_null (buf);
+ }
#endif
+ }
}
return GNUNET_OK;
}
[PATHS]
-SERVICEHOME = /tmp/nse-profiler/
+SERVICEHOME = /tmp/nse-profiler2/
DEFAULTCONFIG = nse_profiler_test.conf
[nse]
#NUM_PEERINFO_PER_HOST = 10
#SINGLE_STATISTICS_PER_HOST = YES
#NUM_STATISTICS_PER_HOST = 10
-DELETE_FILES = NO
+DELETE_FILES = YES
[nse-profiler]
OUTPUT_FILE = nse_output_4000_peers.dat
TOPOLOGY_OUTPUT_FILE = nse_topo_4000_peers
DATA_OUTPUT_FILE = nse_topo_4000_peers_stats
-#ROUND0 = 90
-#ROUND1 = 100
-#ROUND2 = 50
-#ROUND3 = 100
-#ROUND2 = 500
-#ROUND3 = 1000
-WAIT_TIME = 19200 s
+ROUND0 = 4000
+ROUND1 = 4000
+ROUND2 = 4000
+ROUND3 = 4000
+ROUND4 = 4000
+ROUND5 = 4000
+ROUND6 = 4000
+ROUND7 = 4000
+ROUND8 = 4000
+ROUND9 = 4000
+ROUND10 = 4000
+ROUND11 = 1000
+ROUND12 = 1000
+ROUND13 = 1000
+ROUND14 = 1000
+ROUND15 = 1000
+ROUND16 = 1000
+ROUND17 = 1000
+ROUND18 = 1000
+ROUND19 = 1000
+ROUND20 = 1000
+ROUND21 = 2000
+ROUND22 = 2000
+ROUND23 = 2000
+ROUND24 = 2000
+ROUND25 = 2000
+ROUND26 = 2000
+ROUND27 = 2000
+ROUND28 = 2000
+ROUND29 = 2000
+ROUND30 = 2000
+WAIT_TIME = 1920 s
CONNECTION_LIMIT = 10