GNUnet 0.24.1-14-gdb0ea5ed9
plugin_testing_transport_simple_send_performance.c File Reference
Include dependency graph for plugin_testing_transport_simple_send_performance.c:

Go to the source code of this file.

Data Structures

struct  Sender
 

Macros

#define LOG(kind, ...)   GNUNET_log (kind, __VA_ARGS__)
 Generic logging shortcut. More...
 
#define BASE_DIR   "testdir"
 
#define TOPOLOGY_CONFIG   "test_transport_simple_send_topo.conf"
 
#define TIMEOUT   GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 600)
 
#define MAX_RECEIVED   1000
 
#define MESSAGE_SIZE   65000
 

Functions

static int check_test (void *cls, const struct GNUNET_TRANSPORT_TESTING_PerformanceTestMessage *message)
 Function called to check a message of type GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE being received. More...
 
static void handle_test (void *cls, const struct GNUNET_TRANSPORT_TESTING_PerformanceTestMessage *message)
 Function called to handle a message of type GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE being received. More...
 
struct GNUNET_TESTING_BarrierList * get_waiting_for_barriers ()
 
static void handle_result (void *cls, enum GNUNET_GenericReturnValue rv)
 Function called with the final result of the test. More...
 
static void * notify_connect (struct GNUNET_TESTING_Interpreter *is, const struct GNUNET_PeerIdentity *peer)
 Callback from start peer cmd for signaling a peer got connected. More...
 
static struct GNUNET_TESTING_Interpreterstart_testcase (GNUNET_TESTING_cmd_helper_write_cb write_message, const char *router_ip, const char *node_ip, const char *m, const char *n, const char *local_m, const char *topology_data, unsigned int *read_file, GNUNET_TESTING_cmd_helper_finish_cb finished_cb)
 Function to start a local test case. More...
 
void * libgnunet_test_transport_plugin_cmd_simple_send_performance_init (void *cls)
 Entry point for the plugin. More...
 
void * libgnunet_test_transport_plugin_cmd_simple_send_performance_done (void *cls)
 Exit point from the plugin. More...
 

Variables

static struct GNUNET_TESTING_Command block_send
 
static struct GNUNET_TESTING_Command block_receive
 
static struct GNUNET_TESTING_Command connect_peers
 
static struct GNUNET_TESTING_Command local_prepared
 
static struct GNUNET_TESTING_Command start_peer
 
static struct GNUNET_TESTING_Interpreteris
 
static struct GNUNET_CONTAINER_MultiPeerMapsenders
 

Macro Definition Documentation

◆ LOG

#define LOG (   kind,
  ... 
)    GNUNET_log (kind, __VA_ARGS__)

Generic logging shortcut.

Definition at line 36 of file plugin_testing_transport_simple_send_performance.c.

◆ BASE_DIR

#define BASE_DIR   "testdir"

◆ TOPOLOGY_CONFIG

#define TOPOLOGY_CONFIG   "test_transport_simple_send_topo.conf"

◆ TIMEOUT

◆ MAX_RECEIVED

#define MAX_RECEIVED   1000

◆ MESSAGE_SIZE

#define MESSAGE_SIZE   65000

Function Documentation

◆ check_test()

static int check_test ( void *  cls,
const struct GNUNET_TRANSPORT_TESTING_PerformanceTestMessage message 
)
static

Function called to check a message of type GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE being received.

Definition at line 86 of file plugin_testing_transport_simple_send_performance.c.

89{
90 return GNUNET_OK;
91}
@ GNUNET_OK

References GNUNET_OK.

◆ handle_test()

static void handle_test ( void *  cls,
const struct GNUNET_TRANSPORT_TESTING_PerformanceTestMessage message 
)
static

Function called to handle a message of type GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE being received.

Definition at line 100 of file plugin_testing_transport_simple_send_performance.c.

103{
104 struct GNUNET_PeerIdentity *peer = cls;
106 struct Sender *sender;
107 struct GNUNET_TIME_Absolute time_send;
108 struct GNUNET_TIME_Absolute now;
109 struct GNUNET_TIME_Relative time_traveled;
110 uint32_t num;
112 const struct GNUNET_TESTING_StartPeerState *sps;
113
114
116 &sps);
117 ch = sps->th;
118 num = ntohl (message->num);
119 GNUNET_TESTING_get_trait_async_context (&block_receive,
120 &ac);
121 GNUNET_assert (NULL != ac);
122
124
126 time_send = GNUNET_TIME_absolute_ntoh (message->time_send);
127
128 time_traveled = GNUNET_TIME_absolute_get_difference (time_send, now);
129
130 if (NULL == sender)
131 {
133 "time traveled init %s\n",
134 GNUNET_i2s (peer));
135 sender = GNUNET_new (struct Sender);
136 sender->time_first = time_send;
139 peer, sender,
141 }
142
143 if (GNUNET_TIME_UNIT_ZERO.rel_value_us == sender->mean_time.rel_value_us)
144 {
146 "time traveld mean zero\n");
147 sender->mean_time = time_traveled;
148 }
149 else
150 {
151 double factor = (double) sender->num_received
152 / ((double) sender->num_received + 1.0);
153 struct GNUNET_TIME_Relative s1;
154 struct GNUNET_TIME_Relative s2;
155
157 factor);
158 s2 = GNUNET_TIME_relative_divide (time_traveled,
159 sender->num_received + 1);
160 sender->mean_time = GNUNET_TIME_relative_add (s1, s2);
161 }
162
163 sender->num_received++;
164
166 "time traveled: %llu\n",
167 (unsigned long long) time_traveled.rel_value_us);
169 "mean time traveled: %s %llu messages received with message number %u\n",
171 false),
172 sender->num_received,
173 num);
174 if (floor (MAX_RECEIVED * (1 - 1.0 / 200)) < sender->num_received && NULL ==
175 ac->cont)
176 {
178 "time traveled failed\n");
179 // GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac);
180 }
181 else if (floor (MAX_RECEIVED * (1 - 1.0 / 200)) < sender->num_received &&
182 GNUNET_NO == ac->finished)
183 {
185 "time traveled finish\n");
187 }
189 "time traveled end\n");
190 GNUNET_TRANSPORT_core_receive_continue (ch, peer);
191}
static struct GNUNET_CADET_Channel * ch
Channel handle.
Definition: gnunet-cadet.c:117
void GNUNET_TESTING_async_finish(struct GNUNET_TESTING_AsyncContext *ac)
The asynchronous command of ac has finished.
enum GNUNET_GenericReturnValue GNUNET_TRANSPORT_TESTING_get_trait_state(const struct GNUNET_TESTING_Command *cmd, const struct GNUNET_TESTING_StartPeerState **ret)
void * GNUNET_CONTAINER_multipeermap_get(const struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key)
Given a key find a value in the map matching the key.
int GNUNET_CONTAINER_multipeermap_put(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY
There must only be one value per key; storing a value should fail if a value under the same key alrea...
#define GNUNET_log(kind,...)
@ GNUNET_NO
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
@ GNUNET_ERROR_TYPE_DEBUG
@ GNUNET_ERROR_TYPE_INFO
#define GNUNET_new(type)
Allocate a struct or union of the given type.
const char * GNUNET_STRINGS_relative_time_to_string(struct GNUNET_TIME_Relative delta, int do_round)
Give relative time in human-readable fancy format.
Definition: strings.c:583
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
Definition: time.c:111
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_ntoh(struct GNUNET_TIME_AbsoluteNBO a)
Convert absolute time from network byte order.
Definition: time.c:741
struct GNUNET_TIME_Relative GNUNET_TIME_relative_add(struct GNUNET_TIME_Relative a1, struct GNUNET_TIME_Relative a2)
Add relative times together.
Definition: time.c:587
struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply(struct GNUNET_TIME_Relative rel, unsigned long long factor)
Multiply relative time by a given factor.
Definition: time.c:486
#define GNUNET_TIME_UNIT_ZERO
Relative time zero.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_divide(struct GNUNET_TIME_Relative rel, unsigned long long factor)
Divide relative time by a given factor.
Definition: time.c:552
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.
Definition: time.c:423
static struct GNUNET_TESTING_Command block_receive
static struct GNUNET_TESTING_Command start_peer
static struct GNUNET_CONTAINER_MultiPeerMap * senders
The identity of the host (wraps the signing key of the peer).
State each asynchronous command must have in its closure.
enum GNUNET_GenericReturnValue finished
Indication if the command finished (GNUNET_OK).
Handle for a peer controlled via ARM.
struct GNUNET_TESTING_AsyncContext ac
Context for our asynchronous completion.
struct GNUNET_TESTING_Peer * peer
struct GNUNET_TESTING_Peer returned by GNUNET_TESTING_peer_configure.
struct GNUNET_TRANSPORT_CoreHandle * th
Peer's transport service handle.
Time for absolute times used by GNUnet, in microseconds.
Time for relative time used by GNUnet, in microseconds.
uint64_t rel_value_us
The actual value.
Handle for the transport service (includes all of the state for the transport service).
uint32_t num
Monotonically increasing counter throughout the test.
struct GNUNET_TIME_AbsoluteNBO time_send
Time this message was send via transport api.
unsigned long long num_received
Number of received messages from sender.
struct GNUNET_TIME_Absolute time_first
Time the first message was send.
struct GNUNET_TIME_Relative mean_time
Sample mean time the message traveled.

References GNUNET_TESTING_StartPeerState::ac, block_receive, ch, GNUNET_TESTING_AsyncContext::finished, GNUNET_assert, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY, GNUNET_CONTAINER_multipeermap_get(), GNUNET_CONTAINER_multipeermap_put(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_INFO, GNUNET_i2s(), GNUNET_log, GNUNET_new, GNUNET_NO, GNUNET_OK, GNUNET_STRINGS_relative_time_to_string(), GNUNET_TESTING_async_finish(), GNUNET_TIME_absolute_get(), GNUNET_TIME_absolute_get_difference(), GNUNET_TIME_absolute_ntoh(), GNUNET_TIME_relative_add(), GNUNET_TIME_relative_divide(), GNUNET_TIME_relative_multiply(), GNUNET_TIME_UNIT_ZERO, GNUNET_TRANSPORT_TESTING_get_trait_state(), MAX_RECEIVED, Sender::mean_time, GNUNET_TRANSPORT_TESTING_PerformanceTestMessage::num, Sender::num_received, GNUNET_TESTING_StartPeerState::peer, GNUNET_TIME_Relative::rel_value_us, senders, start_peer, GNUNET_TESTING_StartPeerState::th, Sender::time_first, and GNUNET_TRANSPORT_TESTING_PerformanceTestMessage::time_send.

Here is the call graph for this function:

◆ get_waiting_for_barriers()

struct GNUNET_TESTING_BarrierList * get_waiting_for_barriers ( )

Definition at line 195 of file plugin_testing_transport_simple_send_performance.c.

196{
197 struct GNUNET_TESTING_BarrierList*barriers;
198 struct GNUNET_TESTING_BarrierListEntry *ble;
199
200 barriers = GNUNET_new (struct GNUNET_TESTING_BarrierList);
201 ble = GNUNET_new (struct GNUNET_TESTING_BarrierListEntry);
202 ble->barrier_name = "ready-to-connect";
203 ble->expected_reaches = 1;
204 GNUNET_CONTAINER_DLL_insert (barriers->head,
205 barriers->tail,
206 ble);
207
208 ble = GNUNET_new (struct GNUNET_TESTING_BarrierListEntry);
209 ble->barrier_name = "test-case-finished";
210 ble->expected_reaches = 1;
211 GNUNET_CONTAINER_DLL_insert (barriers->head,
212 barriers->tail,
213 ble);
214 return barriers;
215}
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.

References GNUNET_CONTAINER_DLL_insert, and GNUNET_new.

Referenced by libgnunet_test_transport_plugin_cmd_simple_send_performance_init().

Here is the caller graph for this function:

◆ handle_result()

static void handle_result ( void *  cls,
enum GNUNET_GenericReturnValue  rv 
)
static

Function called with the final result of the test.

Parameters
clsthe struct MainParams
rvGNUNET_OK if the test passed

Definition at line 225 of file plugin_testing_transport_simple_send_performance.c.

227{
228 struct TestState *ts = cls;
229
231 "Local test exits with status %d\n",
232 rv);
233
234 ts->finished_cb (rv);
235 GNUNET_free (ts->testdir);
236 GNUNET_free (ts->cfgname);
238 GNUNET_free (ts);
239}
#define GNUNET_free(ptr)
Wrapper around free.
char * cfgname
The name for the configuration file of the specific node.
char * testdir
The name for a specific test environment directory.
struct GNUNET_TESTING_NetjailTopology * topology
The complete topology information.
void GNUNET_TESTING_free_topology(struct GNUNET_TESTING_NetjailTopology *topology)
Deallocate memory of the struct GNUNET_TESTING_NetjailTopology.

References TestState::cfgname, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_TESTING_free_topology(), TestState::testdir, and TestState::topology.

Referenced by start_testcase().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ notify_connect()

static void * notify_connect ( struct GNUNET_TESTING_Interpreter is,
const struct GNUNET_PeerIdentity peer 
)
static

Callback from start peer cmd for signaling a peer got connected.

Definition at line 247 of file plugin_testing_transport_simple_send_performance.c.

249{
250 const struct ConnectPeersState *cps;
251 const struct GNUNET_TESTING_Command *cmd;
252
254 "connect-peers");
255 GNUNET_TRANSPORT_TESTING_get_trait_connect_peer_state (cmd,
256 &cps);
257 void *ret = NULL;
258
259 cps->notify_connect (is,
260 peer);
261 return ret;
262}
static int ret
Final status code.
Definition: gnunet-arm.c:93
const struct GNUNET_TESTING_Command * GNUNET_TESTING_interpreter_lookup_command(struct GNUNET_TESTING_Interpreter *is, const char *label)
Lookup command by label.
static struct GNUNET_TESTING_Interpreter * is
Struct to store information needed in callbacks.
GNUNET_TESTING_notify_connect_cb notify_connect
A command to be run by the interpreter.

References GNUNET_TESTING_interpreter_lookup_command(), is, ConnectPeersState::notify_connect, and ret.

Referenced by start_testcase().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_testcase()

static struct GNUNET_TESTING_Interpreter * start_testcase ( GNUNET_TESTING_cmd_helper_write_cb  write_message,
const char *  router_ip,
const char *  node_ip,
const char *  m,
const char *  n,
const char *  local_m,
const char *  topology_data,
unsigned int *  read_file,
GNUNET_TESTING_cmd_helper_finish_cb  finished_cb 
)
static

Function to start a local test case.

Parameters
write_messageCallback to send a message to the master loop.
router_ipGlobal address of the network namespace.
node_ipThe IP address of the node.
mThe number of the node in a network namespace.
nThe number of the network namespace.
local_mThe number of nodes in a network namespace.
topology_dataA file name for the file containing the topology configuration, or a string containing the topology configuration.
read_fileIf read_file is GNUNET_YES this string is the filename for the topology configuration, if read_file is GNUNET_NO the string contains the topology configuration.
finish_cbCallback function which writes a message from the helper process running on a netjail node to the master process * signaling that the test case running on the netjail node finished.
Returns
Returns the struct GNUNET_TESTING_Interpreter of the command loop running on this netjail node.

Definition at line 283 of file plugin_testing_transport_simple_send_performance.c.

292{
293
294 unsigned int n_int;
295 unsigned int m_int;
296 unsigned int local_m_int;
297 unsigned int num;
298 struct TestState *ts = GNUNET_new (struct TestState);
299 struct GNUNET_TESTING_NetjailTopology *topology;
300 unsigned int sscanf_ret = 0;
301
303 ts->finished_cb = finished_cb;
305 "n %s m %s\n",
306 n,
307 m);
308
309 if (GNUNET_YES == *read_file)
310 {
312 "read from file\n");
313 topology = GNUNET_TESTING_get_topo_from_file (topology_data);
314 }
315 else
316 topology = GNUNET_TESTING_get_topo_from_string (topology_data);
317
318 ts->topology = topology;
319
320 errno = 0;
321 sscanf_ret = sscanf (m, "%u", &m_int);
322 if (errno != 0)
323 {
325 }
326 GNUNET_assert (0 < sscanf_ret);
327 errno = 0;
328 sscanf_ret = sscanf (n, "%u", &n_int);
329 if (errno != 0)
330 {
332 }
333 GNUNET_assert (0 < sscanf_ret);
334 errno = 0;
335 sscanf_ret = sscanf (local_m, "%u", &local_m_int);
336 if (errno != 0)
337 {
339 }
340 GNUNET_assert (0 < sscanf_ret);
341
342 if (0 == n_int)
343 num = m_int;
344 else
345 num = (n_int - 1) * local_m_int + m_int + topology->nodes_x;
346
347 block_send = GNUNET_TESTING_cmd_block_until_external_trigger (
348 "block");
349 block_receive = GNUNET_TESTING_cmd_block_until_external_trigger (
350 "block-receive");
352 "start-peer",
353 "system-create",
354 num,
355 topology,
356 0,
357 GNUNET_YES);
358 local_prepared = GNUNET_TESTING_cmd_local_test_prepared (
359 "local-test-prepared",
361
362
364 "test_transport_api_tcp_node1.conf");
365
367 "plugin cfgname: %s\n",
368 ts->cfgname);
369
371 "node ip: %s\n",
372 node_ip);
373
375 "%s%s%s",
376 BASE_DIR,
377 m,
378 n);
379
383 struct
385 ts),
387 };
388
390 "system-create",
391 num,
392 node_ip,
393 handlers,
394 ts->cfgname,
396 GNUNET_NO);
397
399 GNUNET_TESTING_cmd_system_create ("system-create",
400 ts->testdir),
402 GNUNET_TESTING_cmd_barrier_reached ("ready-to-connect-reached",
403 "ready-to-connect",
404 GNUNET_NO,
405 num,
406 GNUNET_NO,
410 "start-peer",
411 "system-create",
412 num,
415 topology),
417 GNUNET_TESTING_cmd_barrier_reached ("test-case-finished-reached",
418 "test-case-finished",
419 GNUNET_NO,
420 num,
421 GNUNET_NO,
424 "start-peer"),
425 GNUNET_TESTING_cmd_system_destroy ("system-destroy",
426 "system-create"),
428 };
429
430 ts->write_message = write_message;
431
433 TIMEOUT,
435 ts);
436 return is;
437}
struct GNUNET_MQ_MessageHandlers handlers[]
Definition: 003.c:1
static struct GNUNET_ARM_MonitorHandle * m
Monitor connection with ARM.
Definition: gnunet-arm.c:103
static void write_message(const struct GNUNET_MessageHeader *message)
Callback to write a message to the parent process.
static void finished_cb(void *cls, enum GNUNET_GenericReturnValue rv)
static struct VoipCommand commands[]
List of supported commands.
struct GNUNET_TESTING_Interpreter * GNUNET_TESTING_run(const struct GNUNET_TESTING_Command *commands, struct GNUNET_TIME_Relative timeout, GNUNET_TESTING_ResultCallback rc, void *rc_cls)
Run the testsuite.
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_end(void)
Create command array terminator.
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_barrier_reached(const char *label, const char *barrier_label)
If this command is executed the the process is signaling the master process that it reached a barrier...
struct GNUNET_CONTAINER_MultiPeerMap * GNUNET_CONTAINER_multipeermap_create(unsigned int len, int do_not_copy_keys)
Create a multi peer map (hash map for public keys of peers).
@ GNUNET_YES
#define GNUNET_log_strerror(level, cmd)
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the mess...
@ GNUNET_ERROR_TYPE_ERROR
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_MQ_handler_end()
End-marker for the handlers array.
#define GNUNET_MQ_hd_var_size(name, code, str, ctx)
enum GNUNET_GenericReturnValue read_file(char const *const filename, char **buffer)
Definition: pabc_helper.c:71
static struct GNUNET_TESTING_Command block_send
static void handle_result(void *cls, enum GNUNET_GenericReturnValue rv)
Function called with the final result of the test.
static struct GNUNET_TESTING_Command local_prepared
static struct GNUNET_TESTING_Command connect_peers
static void * notify_connect(struct GNUNET_TESTING_Interpreter *is, const struct GNUNET_PeerIdentity *peer)
Callback from start peer cmd for signaling a peer got connected.
#define LOG(kind,...)
Generic logging shortcut.
Message handler for a specific message type.
Topology of our netjail setup.
unsigned int nodes_x
Number of global known nodes.
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)
struct GNUNET_TESTING_Command GNUNET_TRANSPORT_cmd_stop_peer(const char *label, const char *start_label)
Create command.
struct GNUNET_TESTING_Command GNUNET_TRANSPORT_cmd_connect_peers(const char *label, const char *start_peer_label, const char *create_label, uint32_t num, struct GNUNET_TESTING_NetjailTopology *topology, unsigned int additional_connects, unsigned int wait_for_connect)
Create command.
struct GNUNET_TESTING_Command GNUNET_TRANSPORT_cmd_start_peer(const char *label, const char *system_label, uint32_t no, const char *node_ip, struct GNUNET_MQ_MessageHandler *handlers, const char *cfgname, GNUNET_TRANSPORT_notify_connect_cb notify_connect, unsigned int broadcast)
Create command.
#define GNUNET_TRANSPORT_TESTING_SIMPLE_PERFORMANCE_MTYPE
Message type used by #().

References BASE_DIR, block_receive, block_send, TestState::cfgname, commands, connect_peers, finished_cb(), GNUNET_asprintf(), GNUNET_assert, GNUNET_CONTAINER_multipeermap_create(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log_strerror, GNUNET_MQ_handler_end, GNUNET_MQ_hd_var_size, GNUNET_new, GNUNET_NO, GNUNET_TESTING_cmd_barrier_reached(), GNUNET_TESTING_cmd_end(), GNUNET_TESTING_run(), GNUNET_TRANSPORT_cmd_connect_peers(), GNUNET_TRANSPORT_cmd_send_simple_performance(), GNUNET_TRANSPORT_cmd_start_peer(), GNUNET_TRANSPORT_cmd_stop_peer(), GNUNET_TRANSPORT_TESTING_SIMPLE_PERFORMANCE_MTYPE, GNUNET_YES, handle_result(), handlers, is, local_prepared, LOG, m, MAX_RECEIVED, MESSAGE_SIZE, GNUNET_TESTING_NetjailTopology::nodes_x, notify_connect(), read_file(), senders, start_peer, TestState::testdir, TIMEOUT, TestState::topology, and write_message().

Referenced by libgnunet_test_transport_plugin_cmd_simple_send_performance_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ libgnunet_test_transport_plugin_cmd_simple_send_performance_init()

void * libgnunet_test_transport_plugin_cmd_simple_send_performance_init ( void *  cls)

Entry point for the plugin.

Parameters
clsNULL
Returns
the exported block API

Definition at line 447 of file plugin_testing_transport_simple_send_performance.c.

448{
450
451 GNUNET_log_setup ("simple-send",
452 "DEBUG",
453 NULL);
454
457 api->get_waiting_for_barriers = get_waiting_for_barriers;
458 return api;
459}
enum GNUNET_GenericReturnValue GNUNET_log_setup(const char *comp, const char *loglevel, const char *logfile)
Setup logging.
struct GNUNET_TESTING_BarrierList * get_waiting_for_barriers()
static struct GNUNET_TESTING_Interpreter * start_testcase(GNUNET_TESTING_cmd_helper_write_cb write_message, const char *router_ip, const char *node_ip, const char *m, const char *n, const char *local_m, const char *topology_data, unsigned int *read_file, GNUNET_TESTING_cmd_helper_finish_cb finished_cb)
Function to start a local test case.
The plugin API every test case plugin has to implement.
struct GNUNET_TESTING_Interpreter *(* start_testcase)(void *cls, const char *topology_data, uint32_t barrier_count, const struct GNUNET_ShortHashCode *barriers, GNUNET_TESTING_cmd_helper_write_cb write_message, GNUNET_TESTING_ResultCallback finish_cb, void *finish_cb_cls)
Function to be implemented for each test case plugin which starts the test case on a netjail node.

References get_waiting_for_barriers(), GNUNET_log_setup(), GNUNET_new, start_testcase(), and GNUNET_TESTING_PluginFunctions::start_testcase.

Here is the call graph for this function:

◆ libgnunet_test_transport_plugin_cmd_simple_send_performance_done()

void * libgnunet_test_transport_plugin_cmd_simple_send_performance_done ( void *  cls)

Exit point from the plugin.

Parameters
clsthe return value from #libgnunet_test_transport_plugin_simple_send_performance_init
Returns
NULL

Definition at line 469 of file plugin_testing_transport_simple_send_performance.c.

470{
472
473 GNUNET_free (api);
474 return NULL;
475}
void * cls
Closure to pass to start_testcase.

References GNUNET_TESTING_PluginFunctions::cls, and GNUNET_free.

Variable Documentation

◆ block_send

struct GNUNET_TESTING_Command block_send
static

Definition at line 48 of file plugin_testing_transport_simple_send_performance.c.

Referenced by start_testcase().

◆ block_receive

struct GNUNET_TESTING_Command block_receive
static

◆ connect_peers

struct GNUNET_TESTING_Command connect_peers
static

Definition at line 52 of file plugin_testing_transport_simple_send_performance.c.

Referenced by start_testcase().

◆ local_prepared

struct GNUNET_TESTING_Command local_prepared
static

Definition at line 54 of file plugin_testing_transport_simple_send_performance.c.

Referenced by start_testcase().

◆ start_peer

struct GNUNET_TESTING_Command start_peer
static

◆ is

◆ senders

struct GNUNET_CONTAINER_MultiPeerMap* senders
static