62 "Bad timings for `%s'\n",
72 for (
unsigned int i = 0;
76 if (0 == strncmp (timings[i].
prefix,
78 strlen (timings[i].
prefix)))
82 timings[i].total_duration);
85 timings[i].success_latency);
117 for (
unsigned int j = 0;
118 NULL != (*bcmd)[j].run;
static struct GNUNET_TESTING_Interpreter * is
static int prefix
If printing the value of PREFIX has been requested.
static struct GNUNET_TIME_Relative duration
Option '-d': duration of the mapping.
void GNUNET_TESTING_interpreter_commands_iterate(struct GNUNET_TESTING_Interpreter *is, bool asc, GNUNET_TESTING_CommandIterator cb, void *cb_cls)
Iterates over all of the top-level commands of an interpreter.
#define GNUNET_TESTING_command_new(cls, label, run, cleanup, traits)
Create a new command.
enum GNUNET_GenericReturnValue GNUNET_TESTING_get_trait_batch_cmds(const struct GNUNET_TESTING_Command *cmd, struct GNUNET_TESTING_Command ***ret)
#define GNUNET_log(kind,...)
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
@ GNUNET_ERROR_TYPE_ERROR
struct GNUNET_TIME_Relative GNUNET_TIME_relative_add(struct GNUNET_TIME_Relative a1, struct GNUNET_TIME_Relative a2)
Add relative times together.
#define GNUNET_TIME_absolute_cmp(t1, op, t2)
Compare two absolute times.
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_difference(struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Absolute end)
Compute the time difference between the given start and end times.
A command to be run by the interpreter.
struct GNUNET_TIME_Absolute finish_time
When did the execution of this command finish?
struct GNUNET_TESTING_CommandLabel label
Label for the command.
struct GNUNET_TIME_Absolute last_req_time
When did we start the last run of this command? Delta to finish_time gives the latency for the last s...
GNUNET_TESTING_CommandRunRoutine run
Runs the command.
unsigned int num_tries
How often did we try to execute this command? (In case it is a request that is repated....
struct GNUNET_TIME_Absolute start_time
When did the execution of this command start?
void * cls
Closure for all commands with command-specific context information.
Global state of the interpreter, used by a command to access information about other commands.
unsigned int num_commands
Number of commands summed up.
const char * prefix
For which type of commands.
struct GNUNET_TIME_Relative total_duration
Total time spend in all commands of this type.
unsigned int num_retries
Number of retries summed up.
struct GNUNET_TIME_Relative success_latency
Total time spend waiting for the successful execution in all commands of this type.
Time for relative time used by GNUnet, in microseconds.
bool GNUNET_TESTING_cmd_is_batch_(const struct GNUNET_TESTING_Command *cmd)
Test if this command is a batch command.
static void stat_cmd(struct GNUNET_TESTING_Timer *timings, const struct GNUNET_TESTING_Command *cmd)
Add the time cmd took to the respective duration in timings.
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_stat(const char *label, struct GNUNET_TESTING_Timer *timers)
Obtain performance data from the interpreter.
static void stat_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
Run a "stat" CMD.
static void do_stat(void *cls, const struct GNUNET_TESTING_Command *cmd)
Obtain statistics for timings of cmd.