#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_testing_ng_lib.h"
#include "gnunet_testing_netjail_lib.h"
#include "transport-testing2.h"
#include "transport-testing-cmds.h"
Go to the source code of this file.
Data Structures | |
struct | SendSimplePerfState |
Struct to hold information for callbacks. More... | |
struct | MQWrapper |
Macros | |
#define | LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__) |
Generic logging shortcut. More... | |
Functions | |
static void | send_simple_cleanup (void *cls) |
The cleanup function of this cmd frees resources the cmd allocated. More... | |
static void | send_simple_single (void *cls) |
static int | send_simple_cb (void *cls, const struct GNUNET_ShortHashCode *key, void *value) |
static void | send_simple_run (void *cls, struct GNUNET_TESTING_Interpreter *is) |
The run method of this cmd will send a simple message to the connected peers. More... | |
struct GNUNET_TESTING_Command | GNUNET_TRANSPORT_cmd_send_simple_performance (const char *label, const char *start_peer_label, const char *create_label, uint32_t num, int size, int max_send, struct GNUNET_TESTING_NetjailTopology *topology) |
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log (kind, __VA_ARGS__) |
Generic logging shortcut.
Definition at line 36 of file transport_api_cmd_send_simple_performance.c.
|
static |
The cleanup function of this cmd frees resources the cmd allocated.
Definition at line 100 of file transport_api_cmd_send_simple_performance.c.
References GNUNET_free.
Referenced by GNUNET_TRANSPORT_cmd_send_simple_performance().
|
static |
Definition at line 109 of file transport_api_cmd_send_simple_performance.c.
References SendSimplePerfState::ac, env, GNUNET_ERROR_TYPE_DEBUG, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_SCHEDULER_add_now(), GNUNET_TESTING_async_finish(), GNUNET_TIME_absolute_get(), GNUNET_TIME_absolute_hton(), GNUNET_TRANSPORT_TESTING_SIMPLE_PERFORMANCE_MTYPE, LOG, SendSimplePerfState::max_send, MQWrapper::mq, GNUNET_TRANSPORT_TESTING_PerformanceTestMessage::num, MQWrapper::num_send, send_simple_single(), SendSimplePerfState::size, MQWrapper::sss, and GNUNET_TRANSPORT_TESTING_PerformanceTestMessage::time_send.
Referenced by send_simple_cb(), and send_simple_single().
|
static |
Definition at line 143 of file transport_api_cmd_send_simple_performance.c.
References GNUNET_new, GNUNET_OK, mq, MQWrapper::mq, send_simple_single(), MQWrapper::sss, and value.
Referenced by send_simple_run().
|
static |
The run method of this cmd will send a simple message to the connected peers.
Definition at line 164 of file transport_api_cmd_send_simple_performance.c.
References SendSimplePerfState::create_label, GNUNET_CONTAINER_multishortmap_iterate(), GNUNET_TESTING_interpreter_lookup_command(), GNUNET_TRANSPORT_TESTING_get_trait_connected_peers_map(), is, send_simple_cb(), and SendSimplePerfState::start_peer_label.
Referenced by GNUNET_TRANSPORT_cmd_send_simple_performance().
struct GNUNET_TESTING_Command GNUNET_TRANSPORT_cmd_send_simple_performance | ( | const char * | label, |
const char * | start_peer_label, | ||
const char * | create_label, | ||
uint32_t | num, | ||
int | size, | ||
int | max_send, | ||
struct GNUNET_TESTING_NetjailTopology * | topology | ||
) |
label | name for command. |
start_peer_label | Label of the cmd to start a peer. |
create_label | Label of the cmd which started the test system. |
num | Number globally identifying the node. |
size | The size of the test message to send. |
max_send | The number of messages to send. |
topology | The topology for the test setup. |
Definition at line 192 of file transport_api_cmd_send_simple_performance.c.
References SendSimplePerfState::ac, GNUNET_TESTING_Command::asynchronous_finish, SendSimplePerfState::create_label, GNUNET_new, GNUNET_TESTING_command_new_ac(), GNUNET_YES, GNUNET_TESTING_Command::label, SendSimplePerfState::max_send, send_simple_cleanup(), send_simple_run(), size, SendSimplePerfState::size, SendSimplePerfState::start_peer_label, and SendSimplePerfState::topology.