#include "fs_test_lib.h"
#include "gnunet_testing_lib.h"
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_YES
/**
* File-size we use for testing.
/**
* How long until we give up on transmitting the message?
*/
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 3)
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 300)
#define NUM_DAEMONS 2
*/
static struct StatValues stats[] =
{
- { "fs", "queries forwarded"},
- { "fs", "replies received and matched"},
- { "core", "bytes decrypted"},
- { "core", "bytes encrypted"},
- { "transport", "bytes received via TCP"},
- { "transport", "bytes transmitted via TCP"},
- { "datacache", "bytes stored"},
- { "dht", "DHT ROUTE Requests Seen"},
- { "dht", "DHT ROUTE Requests Forwarded"},
+ { "fs", "# queries forwarded"},
+ { "fs", "# replies received and matched"},
+ { "fs", "# results found locally"},
+ { "fs", "# requests forwarded due to high load"},
+ { "fs", "# requests done for free (low load)"},
+ { "fs", "# P2P searches received"},
+ { "fs", "# replies received for local clients"},
+ { "fs", "# P2P searches discarded (queue length bound)"},
+ { "fs", "# requests dropped due to high load"},
+ { "fs", "# requests dropped by datastore (queue length limit)"},
+ { "fs", "# queries retransmitted to same target"},
+ { "fs", "cummulative artificial delay introduced (ms)"},
+ { "core", "# bytes decrypted"},
+ { "core", "# bytes encrypted"},
+ { "core", "# transmissions delayed due to corking"},
+ { "transport", "# bytes received via TCP"},
+ { "transport", "# bytes transmitted via TCP"},
+ { "datacache", "# bytes stored"},
+ { "dht", "# DHT ROUTE Requests Seen"},
+ { "dht", "# DHT ROUTE Requests Forwarded"},
{ NULL, NULL}
};
{
struct StatMaster *sm = cls;
fprintf (stderr,
- "Peer %3u: %8s/%40s = %llu\n",
+ "Peer %2u: %12s/%50s = %12llu\n",
sm->daemon,
subsystem,
name,
return GNUNET_OK;
}
+
/**
* Function that gathers stats from all daemons.
*/
stat_run (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc);
+
/**
* Function called when GET operation on stats is done.
*/
GNUNET_SCHEDULER_add_now (sched, &stat_run, sm);
}
+
/**
* Function that gathers stats from all daemons.
*/
if (stats[sm->value].name != NULL)
{
GNUNET_STATISTICS_get (sm->stat,
+#if 0
+ NULL, NULL,
+#else
stats[sm->value].subsystem,
stats[sm->value].name,
+#endif
GNUNET_TIME_UNIT_FOREVER_REL,
&get_done,
&print_stat, sm);
}
else
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Timeout during download, shutting down with error\n");
ok = 1;
GNUNET_SCHEDULER_add_now (sched, &do_stop, NULL);
GNUNET_FS_TEST_daemons_stop (sched,
NUM_DAEMONS,
daemons);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Timeout during upload attempt, shutting down with error\n");
ok = 1;
return;
GNUNET_FS_TEST_daemons_stop (sched,
NUM_DAEMONS,
daemons);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Error trying to connect: %s\n",
emsg);
ok = 1;
GNUNET_GETOPT_OPTION_END
};
- GNUNET_DISK_directory_remove ("/tmp/gnunet-perf-fs-lib/");
+ GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-lib/");
GNUNET_log_setup ("perf_gnunet_service_fs_p2p",
#if VERBOSE
"DEBUG",
GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1,
argvx, "perf-gnunet-service-fs-p2p",
"nohelp", options, &run, NULL);
- GNUNET_DISK_directory_remove ("/tmp/gnunet-perf-fs-lib/");
+ GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-lib/");
return ok;
}