diff options
author | 2012-01-29 17:58:10 +0000 | |
---|---|---|
committer | 2012-01-29 17:58:10 +0000 | |
commit | 3e667f11eb3247475e88041804d647193bca24a4 (patch) | |
tree | 459f95f163ccabb314e612db81686269ddf98d22 /usr.bin/tcpbench/tcpbench.c | |
parent | .Ar tweak. ok jmc@ schwarze@. (diff) | |
download | wireguard-openbsd-3e667f11eb3247475e88041804d647193bca24a4.tar.xz wireguard-openbsd-3e667f11eb3247475e88041804d647193bca24a4.zip |
Don't use floating precision while printing PPS in UDP mode.
"go for it" mikeb@
"looks good to me" henning@
Diffstat (limited to 'usr.bin/tcpbench/tcpbench.c')
-rw-r--r-- | usr.bin/tcpbench/tcpbench.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tcpbench/tcpbench.c b/usr.bin/tcpbench/tcpbench.c index 6cddd5801a5..1e1d5fa2bce 100644 --- a/usr.bin/tcpbench/tcpbench.c +++ b/usr.bin/tcpbench/tcpbench.c @@ -571,8 +571,8 @@ static void udp_process_slice(int fd, short event, void *v_sc) { struct statctx *sc = v_sc; - unsigned long long total_elapsed, since_last; - long double slice_mbps, pps; + unsigned long long total_elapsed, since_last, pps; + long double slice_mbps; struct timeval t_cur, t_diff; if (clock_gettime_tv(CLOCK_MONOTONIC, &t_cur) == -1) @@ -586,7 +586,7 @@ udp_process_slice(int fd, short event, void *v_sc) pps = (sc->udp_slice_pkts * 1000) / since_last; if (slice_mbps > mainstats.peak_mbps) mainstats.peak_mbps = slice_mbps; - printf("Elapsed: %11llu Mbps: %11.3Lf Peak Mbps: %11.3Lf %s PPS: %10.3Lf\n", + printf("Elapsed: %11llu Mbps: %11.3Lf Peak Mbps: %11.3Lf %s PPS: %7llu\n", total_elapsed, slice_mbps, mainstats.peak_mbps, ptb->sflag ? "Rx" : "Tx", pps); |