summaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_reliability.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-10-18 12:37:02 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-10-18 12:37:02 +0000
commit18642e4b759b39aa644d8a232c31c2a755d707bb (patch)
treed49d6df6e161ce47ea66d8aa1f2411dff9bef6dc /src/transport/test_transport_api_reliability.c
parent0205ef3adaf5aca84807cec3e83ea41eda8df889 (diff)
Diffstat (limited to 'src/transport/test_transport_api_reliability.c')
-rw-r--r--src/transport/test_transport_api_reliability.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index d129350c2..7bad5ff4e 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -118,16 +118,19 @@ static void
end ()
{
unsigned long long delta;
-
+ unsigned long long rate;
char *value_name;
+
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n");
delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value_us;
- FPRINTF (stderr, "\nThroughput was %llu kb/s\n",
- total_bytes * 1024 / delta);
+ rate = (1000LL * 1000LL * total_bytes) / (1024 * delta);
+ FPRINTF (stderr, "\nThroughput was %llu KiBytes/s\n",
+ rate);
+
GNUNET_asprintf (&value_name, "reliable_%s", test_plugin);
- GAUGER ("TRANSPORT", value_name, (int) (total_bytes / 1024 / delta),
+ GAUGER ("TRANSPORT", value_name, (int) rate,
"kb/s");
GNUNET_free (value_name);