tool to benchmark/profile file-sharing More...
Go to the source code of this file.
Functions | |
static void | shutdown_task (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg) |
Function called after we've collected the statistics. More... | |
static int | process_stats (void *cls, const struct GNUNET_TESTBED_Peer *peer, const char *subsystem, const char *name, uint64_t value, int is_persistent) |
Callback function to process statistic values from all peers. More... | |
static void | terminate_task (void *cls) |
Task run on shutdown to terminate. More... | |
static void | timeout_task (void *cls) |
Task run on timeout to terminate. More... | |
static void | test_master (void *cls, struct GNUNET_TESTBED_RunHandle *h, unsigned int num_peers, struct GNUNET_TESTBED_Peer **peers, unsigned int links_succeeded, unsigned int links_failed) |
Signature of a main function for a testcase. More... | |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) |
Main function that will be run by the scheduler. More... | |
int | main (int argc, char *const *argv) |
Program to run a file-sharing testbed. More... | |
Variables | |
static int | ret |
Final status code. More... | |
static char * | host_filename |
Data file with the hosts for the testbed. More... | |
static unsigned int | num_peers |
Number of peers to run in the experiment. More... | |
static struct GNUNET_TIME_Relative | timeout |
After how long do we abort the test? More... | |
static struct GNUNET_SCHEDULER_Task * | terminate_taskid |
Handle to the task run during termination. More... | |
tool to benchmark/profile file-sharing
Definition in file gnunet-fs-profiler.c.
|
static |
Function called after we've collected the statistics.
cls | NULL |
op | the operation that has been finished |
emsg | error message in case the operation has failed; will be NULL if operation has executed successfully. |
Definition at line 65 of file gnunet-fs-profiler.c.
References GNUNET_SCHEDULER_shutdown().
Referenced by terminate_task().
|
static |
Callback function to process statistic values from all peers.
Prints them out.
cls | closure |
peer | the peer the statistic belong to |
subsystem | name of subsystem that created the statistic |
name | the name of the datum |
value | the current value |
is_persistent | GNUNET_YES if the value is persistent, GNUNET_NO if not |
Definition at line 90 of file gnunet-fs-profiler.c.
References GNUNET_OK, name, subsystem, and value.
Referenced by terminate_task().
|
static |
Task run on shutdown to terminate.
Triggers printing out all statistics.
cls | NULL |
Definition at line 114 of file gnunet-fs-profiler.c.
References GNUNET_SCHEDULER_cancel(), process_stats(), shutdown_task(), and terminate_taskid.
Referenced by test_master().
|
static |
Task run on timeout to terminate.
Triggers printing out all statistics.
cls | NULL |
Definition at line 136 of file gnunet-fs-profiler.c.
References GNUNET_SCHEDULER_shutdown(), and terminate_taskid.
Referenced by test_master().
|
static |
Signature of a main function for a testcase.
cls | closure |
h | the run handle |
num_peers | number of peers in 'peers' |
peers | handle to peers run in the testbed |
links_succeeded | the number of overlay link connection attempts that succeeded |
links_failed | the number of overlay link connection attempts that failed |
Definition at line 156 of file gnunet-fs-profiler.c.
References GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_TIME_Relative::rel_value_us, terminate_task(), terminate_taskid, timeout, and timeout_task().
Referenced by run().
|
static |
Main function that will be run by the scheduler.
cls | closure |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
cfg | configuration |
Definition at line 185 of file gnunet-fs-profiler.c.
References cfg, host_filename, num_peers, and test_master().
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
Program to run a file-sharing testbed.
argc | number of arguments from the command line |
argv | command line arguments |
Definition at line 204 of file gnunet-fs-profiler.c.
References gettext_noop, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_relative_time(), GNUNET_GETOPT_option_string(), GNUNET_GETOPT_option_uint(), GNUNET_OK, GNUNET_PROGRAM_run(), host_filename, num_peers, options, ret, run(), and timeout.
|
static |
|
static |
Data file with the hosts for the testbed.
Definition at line 38 of file gnunet-fs-profiler.c.
|
static |
Number of peers to run in the experiment.
Definition at line 43 of file gnunet-fs-profiler.c.
|
static |
After how long do we abort the test?
Definition at line 48 of file gnunet-fs-profiler.c.
Referenced by main(), and test_master().
|
static |
Handle to the task run during termination.
Definition at line 53 of file gnunet-fs-profiler.c.
Referenced by terminate_task(), test_master(), and timeout_task().