Permalink
Browse files

commit patches sent in by Radek. refs #443

  • Loading branch information...
synfinatic committed Aug 21, 2010
1 parent 8619602 commit 42722b8945209dcbb850eef39e0dbbd582eccc3d
Showing with 4 additions and 4 deletions.
  1. +3 −3 src/common/utils.c
  2. +1 −1 src/send_packets.c
View
@@ -141,14 +141,14 @@ packet_stats(struct timeval *begin, struct timeval *end,
if (timerisset(&diff)) {
if (bytes_sent){
bytes_sec = bytes_sent / frac_sec;
mb_sec = (bytes_sec * 8) / (1024 * 1024);
mb_sec = (bytes_sec * 8) / (1000 * 1000);
}
if (pkts_sent)
pkts_sec = pkts_sent / frac_sec;
}
printf("Actual: " COUNTER_SPEC " packets (" COUNTER_SPEC " bytes) sent in %.02f seconds.",
printf("Actual: " COUNTER_SPEC " packets (" COUNTER_SPEC " bytes) sent in %.02f seconds.\n",
pkts_sent, bytes_sent, frac_sec);
printf("\t\tRated: %.1f bps, %.2f Mbps, %.2f pps\n",
printf("Rated: %.1f Bps, %.2f Mbps, %.2f pps\n",
bytes_sec, mb_sec, pkts_sec);
if (failed)
View
@@ -618,7 +618,7 @@ do_sleep(struct timeval *time, struct timeval *last, int len, int accurate,
* a constant 'rate' (bytes per second).
*/
if (pkts_sent != 0) {
n = (float)len / (options.speed.speed * 1024 * 1024 / 8); /* convert Mbps to bps */
n = (float)len / (options.speed.speed * 1000 * 1000 / 8); /* convert Mbps to bps */
nap.tv_sec = n;
nap.tv_nsec = (n - nap.tv_sec) * 1000000000;

0 comments on commit 42722b8

Please sign in to comment.