[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r19362 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r19362 - gnunet/src/mesh |
Date: |
Wed, 25 Jan 2012 02:54:17 +0100 |
Author: bartpolot
Date: 2012-01-25 02:54:17 +0100 (Wed, 25 Jan 2012)
New Revision: 19362
Modified:
gnunet/src/mesh/test_mesh_small.c
Log:
- Added summary info for speed test
Modified: gnunet/src/mesh/test_mesh_small.c
===================================================================
--- gnunet/src/mesh/test_mesh_small.c 2012-01-25 01:26:42 UTC (rev 19361)
+++ gnunet/src/mesh/test_mesh_small.c 2012-01-25 01:54:17 UTC (rev 19362)
@@ -22,11 +22,12 @@
*
* @brief Test for the mesh service: retransmission of traffic.
*/
+#include <stdio.h>
#include "platform.h"
#include "gnunet_testing_lib.h"
#include "gnunet_mesh_service.h"
-#define VERBOSE GNUNET_YES
+#define VERBOSE GNUNET_NO
#define REMOVE_DIR GNUNET_YES
struct MeshPeer
@@ -172,7 +173,9 @@
static struct GNUNET_TIME_Absolute end_time;
+static struct GNUNET_TIME_Relative total_time;
+
static uint16_t *mesh_peers;
/**
@@ -359,9 +362,12 @@
if (data_ack < 1000)
return GNUNET_OK;
end_time = GNUNET_TIME_absolute_get();
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "***************** test time %u ms\n",
- GNUNET_TIME_absolute_get_difference(start_time,
end_time).rel_value);
+ total_time = GNUNET_TIME_absolute_get_difference(start_time, end_time);
+ FPRINTF (stderr, "\nTest time %lu ms\n", total_time.rel_value);
+ FPRINTF (stderr, "Test bandwidth: %f kb/s\n",
+ 4000.0 / total_time.rel_value);
+ FPRINTF (stderr, "Test throughput: %f packets/s\n",
+ 1000000.0 / total_time.rel_value);
}
GNUNET_MESH_tunnel_destroy (tunnel);
if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
@@ -1008,7 +1014,9 @@
test = SPEED_ACK;
ok_goal = 2003;
argv2 [3] = NULL; // remove -L DEBUG
+#if VERBOSE
argc2 -= 2;
+#endif
}
else if (strstr (argv[0], "test_mesh_small_speed") != NULL)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r19362 - gnunet/src/mesh,
gnunet <=