diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-12-31 00:14:27 +0900 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-12-31 00:14:27 +0900 |
commit | b82fedab2505eccef3161d225473a5c75dd012cd (patch) | |
tree | 33c2166a25498eedb72ba2658f303e8238276a32 | |
parent | b8e7ad71eed2ded7dd977be2a79fa6c29824a1f4 (diff) | |
download | gnunet-b82fedab2505eccef3161d225473a5c75dd012cd.tar.gz gnunet-b82fedab2505eccef3161d225473a5c75dd012cd.zip |
more accurate calculation
-rw-r--r-- | src/transport/test_communicator_basic.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/transport/test_communicator_basic.c b/src/transport/test_communicator_basic.c index e11fb09eb..0d6df751a 100644 --- a/src/transport/test_communicator_basic.c +++ b/src/transport/test_communicator_basic.c | |||
@@ -366,12 +366,8 @@ incoming_message_cb (void *cls, | |||
366 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, | 366 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
367 | "Short size packet test done.\n"); | 367 | "Short size packet test done.\n"); |
368 | char *goodput = GNUNET_STRINGS_byte_size_fancy ((SHORT_MESSAGE_SIZE | 368 | char *goodput = GNUNET_STRINGS_byte_size_fancy ((SHORT_MESSAGE_SIZE |
369 | * num_received) | 369 | * num_received * 1000 * 1000) |
370 | / (GNUNET_MAX (1, | 370 | / duration.rel_value_us); |
371 | duration. | ||
372 | rel_value_us | ||
373 | / (1000 | ||
374 | * 1000)))); | ||
375 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, | 371 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
376 | "%lu/%lu packets in %llu us (%s/s) -- avg latency: %llu us\n", | 372 | "%lu/%lu packets in %llu us (%s/s) -- avg latency: %llu us\n", |
377 | (unsigned long) num_received, | 373 | (unsigned long) num_received, |
@@ -406,12 +402,8 @@ incoming_message_cb (void *cls, | |||
406 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, | 402 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
407 | "Long size packet test done.\n"); | 403 | "Long size packet test done.\n"); |
408 | char *goodput = GNUNET_STRINGS_byte_size_fancy ((LONG_MESSAGE_SIZE | 404 | char *goodput = GNUNET_STRINGS_byte_size_fancy ((LONG_MESSAGE_SIZE |
409 | * num_received) | 405 | * num_received * 1000 * 1000) |
410 | / (GNUNET_MAX (1, | 406 | / duration.rel_value_us); |
411 | duration. | ||
412 | rel_value_us | ||
413 | / (1000 | ||
414 | * 1000)))); | ||
415 | 407 | ||
416 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, | 408 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
417 | "%lu/%lu packets in %llu us (%s/s) -- avg latency: %llu us\n", | 409 | "%lu/%lu packets in %llu us (%s/s) -- avg latency: %llu us\n", |