2 This file is part of GNUnet.
3 (C) 2011 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
21 * @file mesh/gnunet-mesh-profiler.c
23 * @brief Profiler for mesh experiments.
27 #include "mesh_test_lib.h"
28 #include "gnunet_mesh_service.h"
29 #include "gnunet_statistics_service.h"
36 * How many peers to run
38 #define TOTAL_PEERS 10
41 * How many peers do pinging
47 * Duration of each round.
49 #define ROUND_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
52 * Paximum ping period in milliseconds. Real period = rand (0, PING_PERIOD)
54 #define PING_PERIOD 2000
57 * How long until we give up on connecting the peers?
59 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 120)
62 * Time to wait for stuff that should be rather fast
64 #define SHORT_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
66 static float rounds[] = {0.8, 0.7, 0.6, 0.5, 0.0};
69 * Message type for pings.
71 struct MeshPingMessage
74 * Header. Type PING/PONG.
76 struct GNUNET_MessageHeader header;
84 * Time the message was sent.
86 struct GNUNET_TIME_AbsoluteNBO timestamp;
95 * Testbed Operation (to get peer id, etc).
97 struct GNUNET_TESTBED_Operation *op;
102 struct GNUNET_PeerIdentity id;
105 * Mesh handle for the root peer
107 struct GNUNET_MESH_Handle *mesh;
110 * Channel handle for the root peer
112 struct GNUNET_MESH_Channel *ch;
115 * Channel handle for the dest peer
117 struct GNUNET_MESH_Channel *incoming_ch;
120 * Number of payload packes sent
125 * Number of payload packets received
132 * Destinaton to ping.
134 struct MeshPeer *dest;
137 * Incoming channel for pings.
139 struct MeshPeer *incoming;
142 * Task to do the next ping.
144 GNUNET_SCHEDULER_TaskIdentifier ping_task;
148 * GNUNET_PeerIdentity -> MeshPeer
150 static struct GNUNET_CONTAINER_MultiPeerMap *ids;
153 * Testbed peer handles.
155 static struct GNUNET_TESTBED_Peer **testbed_handles;
158 * Testbed Operation (to get stats).
160 static struct GNUNET_TESTBED_Operation *stats_op;
163 * How many events have happened
168 * Number of events expected to conclude the test successfully.
173 * Operation to get peer ids.
175 struct MeshPeer peers[TOTAL_PEERS];
180 static unsigned int p_ids;
183 * Total number of currently running peers.
185 static unsigned long long peers_running;
188 * Test context (to shut down).
190 static struct GNUNET_MESH_TEST_Context *test_ctx;
193 * Task called to shutdown test.
195 static GNUNET_SCHEDULER_TaskIdentifier shutdown_handle;
198 * Task called to disconnect peers, before shutdown.
200 static GNUNET_SCHEDULER_TaskIdentifier disconnect_task;
203 * Task to perform tests
205 static GNUNET_SCHEDULER_TaskIdentifier test_task;
209 * Flag to notify callbacks not to generate any new traffic anymore.
211 static int test_finished;
214 * Calculate a random delay.
216 * @param max Exclusive maximum, in ms.
218 * @return A time between 0 a max-1 ms.
220 static struct GNUNET_TIME_Relative
221 delay_ms_rnd (unsigned int max)
225 rnd = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, max);
226 return GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, rnd);
231 * Get the index of a peer in the peers array.
233 * @param peer Peer whose index to get.
235 * @return Index of peer in peers.
238 get_index (struct MeshPeer *peer)
245 * Show the results of the test (banwidth acheived) and log them to GAUGER
254 * Shut down peergroup, clean up.
256 * @param cls Closure (unused).
257 * @param tc Task Context.
260 shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
262 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Ending test.\n");
263 shutdown_handle = GNUNET_SCHEDULER_NO_TASK;
268 * Disconnect from mesh services af all peers, call shutdown.
270 * @param cls Closure (unused).
271 * @param tc Task Context.
274 disconnect_mesh_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
276 long line = (long) cls;
279 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
280 "disconnecting mesh service, called from line %ld\n", line);
281 disconnect_task = GNUNET_SCHEDULER_NO_TASK;
282 for (i = 0; i < TOTAL_PEERS; i++)
284 if (NULL != peers[i].op)
285 GNUNET_TESTBED_operation_done (peers[i].op);
287 if (peers[i].up != GNUNET_YES)
290 if (NULL != peers[i].ch)
292 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u: channel %p\n", i, peers[i].ch);
293 GNUNET_MESH_channel_destroy (peers[i].ch);
295 if (NULL != peers[i].incoming_ch)
297 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u: incoming channel %p\n",
298 i, peers[i].incoming_ch);
299 GNUNET_MESH_channel_destroy (peers[i].incoming_ch);
302 GNUNET_MESH_TEST_cleanup (test_ctx);
303 if (GNUNET_SCHEDULER_NO_TASK != shutdown_handle)
305 GNUNET_SCHEDULER_cancel (shutdown_handle);
307 shutdown_handle = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
312 * Finish test normally: schedule disconnect and shutdown
314 * @param line Line in the code the abort is requested from (__LINE__).
317 abort_test (long line)
319 if (disconnect_task != GNUNET_SCHEDULER_NO_TASK)
321 GNUNET_SCHEDULER_cancel (disconnect_task);
322 disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_mesh_peers,
328 * Stats callback. Finish the stats testbed operation and when all stats have
329 * been iterated, shutdown the test.
332 * @param op the operation that has been finished
333 * @param emsg error message in case the operation has failed; will be NULL if
334 * operation has executed successfully.
337 stats_cont (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg)
339 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "... collecting statistics done.\n");
340 GNUNET_TESTBED_operation_done (stats_op);
342 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
343 GNUNET_SCHEDULER_cancel (disconnect_task);
344 disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_mesh_peers,
351 * Process statistic values.
354 * @param peer the peer the statistic belong to
355 * @param subsystem name of subsystem that created the statistic
356 * @param name the name of the datum
357 * @param value the current value
358 * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not
359 * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration
362 stats_iterator (void *cls, const struct GNUNET_TESTBED_Peer *peer,
363 const char *subsystem, const char *name,
364 uint64_t value, int is_persistent)
368 i = GNUNET_TESTBED_get_index (peer);
369 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " STATS %u - %s [%s]: %llu\n",
370 i, subsystem, name, value);
377 * Task check that keepalives were sent and received.
379 * @param cls Closure (NULL).
380 * @param tc Task Context.
383 collect_stats (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
385 if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0)
388 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Start collecting statistics...\n");
389 stats_op = GNUNET_TESTBED_get_statistics (TOTAL_PEERS, testbed_handles,
391 stats_iterator, stats_cont, NULL);
396 * @brief Finish profiler normally. Signal finish and start collecting stats.
398 * @param cls Closure (unused).
399 * @param tc Task context.
402 finish_profiler (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
404 if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0)
407 test_finished = GNUNET_YES;
409 GNUNET_SCHEDULER_add_now (&collect_stats, NULL);
413 * Set the total number of running peers.
415 * @param target Desired number of running peers.
418 adjust_running_peers (unsigned int target)
420 struct GNUNET_TESTBED_Operation *op;
426 GNUNET_assert (target <= TOTAL_PEERS);
428 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "adjust peers to %u\n", target);
429 if (target > peers_running)
431 delta = target - peers_running;
436 delta = peers_running - target;
440 for (i = 0; i < delta; i++)
443 r = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
444 TOTAL_PEERS - PING_PEERS);
446 } while (peers[r].up == run || NULL != peers[r].incoming);
447 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "St%s peer %u: %s\n",
448 run ? "arting" : "opping", r, GNUNET_i2s (&peers[r].id));
450 if (GNUNET_SCHEDULER_NO_TASK != peers[r].ping_task)
451 GNUNET_SCHEDULER_cancel (peers[r].ping_task);
452 peers[r].ping_task = GNUNET_SCHEDULER_NO_TASK;
456 if (NULL != peers[r].ch)
457 GNUNET_MESH_channel_destroy (peers[r].ch);
459 if (NULL != peers[r].dest)
461 if (NULL != peers[r].dest->incoming_ch)
462 GNUNET_MESH_channel_destroy (peers[r].dest->incoming_ch);
463 peers[r].dest->incoming_ch = NULL;
466 op = GNUNET_TESTBED_peer_manage_service (&peers[r], testbed_handles[r],
467 "mesh", NULL, NULL, run);
468 GNUNET_break (NULL != op);
469 peers_running += run ? 1 : -1;
470 GNUNET_assert (peers_running > 0);
476 * @brief Move to next round.
478 * @param cls Closure (round #).
479 * @param tc Task context.
482 next_rnd (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
484 long round = (long) cls;
486 if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0)
489 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "ROUND %ld\n", round);
490 if (0.0 == rounds[round])
492 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Finishing\n");
493 GNUNET_SCHEDULER_add_now (&finish_profiler, NULL);
496 adjust_running_peers (rounds[round] * TOTAL_PEERS);
498 GNUNET_SCHEDULER_add_delayed (ROUND_TIME, &next_rnd, (void *) (round + 1));
503 * Transmit ping callback.
505 * @param cls Closure (peer for PING, NULL for PONG).
506 * @param size Size of the tranmist buffer.
507 * @param buf Pointer to the beginning of the buffer.
509 * @return Number of bytes written to buf.
512 tmt_rdy_ping (void *cls, size_t size, void *buf);
516 * Transmit pong callback.
518 * @param cls Closure (copy of PING message, to be freed).
519 * @param size Size of the buffer we have.
520 * @param buf Buffer to copy data to.
523 tmt_rdy_pong (void *cls, size_t size, void *buf)
525 struct MeshPingMessage *ping = cls;
526 struct MeshPingMessage *pong;
528 if (0 == size || NULL == buf)
533 pong = (struct MeshPingMessage *) buf;
534 memcpy (pong, ping, sizeof (*ping));
535 pong->header.type = htons (PONG);
538 return sizeof (*ping);
543 * @brief Send a ping to destination
545 * @param cls Closure (peer).
546 * @param tc Task context.
549 ping (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
551 struct MeshPeer *peer = (struct MeshPeer *) cls;
553 peer->ping_task = GNUNET_SCHEDULER_NO_TASK;
555 if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0
556 || GNUNET_YES == test_finished)
559 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u -> %u (%u)\n",
560 get_index (peer), get_index (peer->dest), peer->data_sent);
562 GNUNET_MESH_notify_transmit_ready (peer->ch, GNUNET_NO,
563 GNUNET_TIME_UNIT_FOREVER_REL,
564 sizeof (struct MeshPingMessage),
565 &tmt_rdy_ping, peer);
569 * @brief Reply with a pong to origin.
571 * @param cls Closure (peer).
572 * @param tc Task context.
575 pong (struct GNUNET_MESH_Channel *channel, const struct MeshPingMessage *ping)
577 struct MeshPingMessage *copy;
579 copy = GNUNET_new (struct MeshPingMessage);
580 memcpy (copy, ping, sizeof (*ping));
581 GNUNET_MESH_notify_transmit_ready (channel, GNUNET_NO,
582 GNUNET_TIME_UNIT_FOREVER_REL,
583 sizeof (struct MeshPingMessage),
584 &tmt_rdy_pong, copy);
589 * Transmit ping callback
591 * @param cls Closure (peer).
592 * @param size Size of the buffer we have.
593 * @param buf Buffer to copy data to.
596 tmt_rdy_ping (void *cls, size_t size, void *buf)
598 struct MeshPeer *peer = (struct MeshPeer *) cls;
599 struct MeshPingMessage *msg = buf;
601 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tmt_rdy called, filling buffer\n");
602 if (size < sizeof (struct MeshPingMessage) || NULL == buf)
605 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
606 "size %u, buf %p, data_sent %u, data_received %u\n",
607 size, buf, peer->data_sent, peer->data_received);
611 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending: msg %d\n", peer->data_sent);
612 msg->header.size = htons (size);
613 msg->header.type = htons (PING);
614 msg->counter = htonl (peer->data_sent++);
615 msg->timestamp = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
616 peer->ping_task = GNUNET_SCHEDULER_add_delayed (delay_ms_rnd (PING_PERIOD),
619 return sizeof (struct MeshPingMessage);
624 * Function is called whenever a PING message is received.
626 * @param cls closure (peer #, set from GNUNET_MESH_connect)
627 * @param channel connection to the other end
628 * @param channel_ctx place to store local state associated with the channel
629 * @param message the actual message
630 * @return GNUNET_OK to keep the connection open,
631 * GNUNET_SYSERR to close it (signal serious error)
634 ping_handler (void *cls, struct GNUNET_MESH_Channel *channel,
636 const struct GNUNET_MessageHeader *message)
640 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%u got PING\n", n);
641 GNUNET_MESH_receive_done (channel);
642 if (GNUNET_NO == test_finished)
643 pong (channel, (struct MeshPingMessage *) message);
650 * Function is called whenever a PONG message is received.
652 * @param cls closure (peer #, set from GNUNET_MESH_connect)
653 * @param channel connection to the other end
654 * @param channel_ctx place to store local state associated with the channel
655 * @param message the actual message
656 * @return GNUNET_OK to keep the connection open,
657 * GNUNET_SYSERR to close it (signal serious error)
660 pong_handler (void *cls, struct GNUNET_MESH_Channel *channel,
662 const struct GNUNET_MessageHeader *message)
665 struct MeshPeer *peer;
666 struct MeshPingMessage *msg;
667 struct GNUNET_TIME_Absolute send_time;
668 struct GNUNET_TIME_Relative latency;
670 GNUNET_MESH_receive_done (channel);
673 msg = (struct MeshPingMessage *) message;
675 send_time = GNUNET_TIME_absolute_ntoh (msg->timestamp);
676 latency = GNUNET_TIME_absolute_get_duration (send_time);
677 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u <- %u (%u) latency: %s\n",
678 get_index (peer), get_index (peer->dest), ntohl (msg->counter),
679 GNUNET_STRINGS_relative_time_to_string (latency, GNUNET_NO));
686 * Handlers, for diverse services
688 static struct GNUNET_MESH_MessageHandler handlers[] = {
689 {&ping_handler, PING, sizeof (struct MeshPingMessage)},
690 {&pong_handler, PONG, sizeof (struct MeshPingMessage)},
696 * Method called whenever another peer has added us to a channel
697 * the other peer initiated.
699 * @param cls Closure.
700 * @param channel New handle to the channel.
701 * @param initiator Peer that started the channel.
702 * @param port Port this channel is connected to.
703 * @param options channel option flags
704 * @return Initial channel context for the channel
705 * (can be NULL -- that's not an error).
708 incoming_channel (void *cls, struct GNUNET_MESH_Channel *channel,
709 const struct GNUNET_PeerIdentity *initiator,
710 uint32_t port, enum GNUNET_MESH_ChannelOption options)
713 struct MeshPeer *peer;
715 peer = GNUNET_CONTAINER_multipeermap_get (ids, initiator);
716 GNUNET_assert (NULL != peer);
717 GNUNET_assert (peer == peers[n].incoming);
718 GNUNET_assert (peer->dest == &peers[n]);
719 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u <= %u %p\n",
720 n, get_index (peer), channel);
721 peers[n].incoming_ch = channel;
727 * Function called whenever an inbound channel is destroyed. Should clean up
728 * any associated state.
730 * @param cls closure (set from GNUNET_MESH_connect)
731 * @param channel connection to the other end (henceforth invalid)
732 * @param channel_ctx place where local state associated
733 * with the channel is stored
736 channel_cleaner (void *cls, const struct GNUNET_MESH_Channel *channel,
740 struct MeshPeer *peer = &peers[n];
742 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
743 "Channel %p disconnected at peer %ld\n", channel, n);
744 if (peer->ch == channel)
749 static struct MeshPeer *
750 select_random_peer (struct MeshPeer *peer)
756 r = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, TOTAL_PEERS);
757 } while (NULL != peers[r].incoming);
758 peers[r].incoming = peer;
764 * START THE TEST ITSELF, AS WE ARE CONNECTED TO THE MESH SERVICES.
766 * Testcase continues when the root receives confirmation of connected peers,
767 * on callback funtion ch.
769 * @param cls Closure (unsued).
770 * @param tc Task Context.
773 start_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
775 enum GNUNET_MESH_ChannelOption flags;
778 if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0)
781 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Start profiler\n");
783 flags = GNUNET_MESH_OPTION_DEFAULT;
784 for (i = 0; i < PING_PEERS; i++)
787 peers[i].dest = select_random_peer (&peers[i]);
788 peers[i].ch = GNUNET_MESH_channel_create (peers[i].mesh, NULL,
791 if (NULL == peers[i].ch)
793 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Channel %lu failed\n", i);
794 GNUNET_SCHEDULER_shutdown ();
797 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u => %u %p\n",
798 i, get_index (peers[i].dest), peers[i].ch);
799 peers[i].ping_task = GNUNET_SCHEDULER_add_delayed (delay_ms_rnd (2000),
802 peers_running = TOTAL_PEERS;
803 GNUNET_SCHEDULER_add_delayed (ROUND_TIME, &next_rnd, NULL);
808 * Callback to be called when the requested peer information is available
810 * @param cls the closure from GNUNET_TESTBED_peer_get_information()
811 * @param op the operation this callback corresponds to
812 * @param pinfo the result; will be NULL if the operation has failed
813 * @param emsg error message if the operation has failed;
814 * NULL if the operation is successfull
817 peer_id_cb (void *cls,
818 struct GNUNET_TESTBED_Operation *op,
819 const struct GNUNET_TESTBED_PeerInformation *pinfo,
824 if (NULL == pinfo || NULL != emsg)
826 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "pi_cb: %s\n", emsg);
827 abort_test (__LINE__);
830 peers[n].id = *(pinfo->result.id);
831 GNUNET_log (GNUNET_ERROR_TYPE_INFO, " %u id: %s\n",
832 n, GNUNET_i2s (&peers[n].id));
833 GNUNET_break (GNUNET_OK ==
834 GNUNET_CONTAINER_multipeermap_put (ids, &peers[n].id, &peers[n],
835 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST));
837 GNUNET_TESTBED_operation_done (peers[n].op);
841 if (p_ids < TOTAL_PEERS)
843 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Got all IDs, starting profiler\n");
844 test_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
849 * test main: start test when all peers are connected
851 * @param cls Closure.
852 * @param ctx Argument to give to GNUNET_MESH_TEST_cleanup on test end.
853 * @param num_peers Number of peers that are running.
854 * @param testbed_peers Array of peers.
855 * @param meshes Handle to each of the MESHs of the peers.
859 struct GNUNET_MESH_TEST_Context *ctx,
860 unsigned int num_peers,
861 struct GNUNET_TESTBED_Peer **testbed_peers,
862 struct GNUNET_MESH_Handle **meshes)
866 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test main\n");
869 GNUNET_assert (TOTAL_PEERS > 2 * PING_PEERS);
870 GNUNET_assert (TOTAL_PEERS == num_peers);
871 peers_running = num_peers;
872 testbed_handles = testbed_peers;
873 disconnect_task = GNUNET_SCHEDULER_add_delayed (SHORT_TIME,
874 &disconnect_mesh_peers,
876 shutdown_handle = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
877 &shutdown_task, NULL);
878 for (i = 0; i < TOTAL_PEERS; i++)
880 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "requesting id %ld\n", i);
881 peers[i].up = GNUNET_YES;
882 peers[i].mesh = meshes[i];
884 GNUNET_TESTBED_peer_get_information (testbed_handles[i],
885 GNUNET_TESTBED_PIT_IDENTITY,
886 &peer_id_cb, (void *) i);
888 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "requested peer ids\n");
889 /* Continues from pi_cb -> do_test */
894 * Main: start profiler.
897 main (int argc, char *argv[])
899 static uint32_t ports[2];
900 const char *config_file;
902 config_file = "test_mesh.conf";
904 ids = GNUNET_CONTAINER_multipeermap_create (2 * TOTAL_PEERS, GNUNET_YES);
905 GNUNET_assert (NULL != ids);
907 test_finished = GNUNET_NO;
910 GNUNET_MESH_TEST_run ("mesh-profiler", config_file, TOTAL_PEERS,
911 &tmain, NULL, /* tmain cls */
912 &incoming_channel, &channel_cleaner,
917 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
918 "FAILED! (%d/%d)\n", ok, ok_goal);
921 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "success\n");
925 /* end of gnunet-mesh-profiler.c */