jkorell / iperf

Automatically exported from code.google.com/p/iperf
Other
1 stars 0 forks source link

typo in bandwidth units #142

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Issue reported by user:

> Another little bug:  when thruput > 6 digits
> 
> [SUM]   0.00-10.04  sec   177 MBytes  147641 Kbis/sec              receiver
> 
> Note " Kbis/sec" rather than " Kbits/sec"

Original issue reported on code.google.com by AaronMat...@gmail.com on 21 Feb 2014 at 2:07

GoogleCodeExporter commented 9 years ago
This is a little tricky to reproduce, but what happened here seems to be that 
the user forced the format of the output units using the "--format k" option, 
thus causing longer-than-anticipated strings to be generated when the values 
were rendered for printing.  These strings were longer than the buffers that 
were allocated to hold them.  On a more positive note, the code used for 
formatting employed snprintf(3), so the buffers did *not* get overflowed.  We 
can just adjust the size of the buffers to make them large enough to hold any 
"conceivable" value.

On another note, I personally dislike the way we format numeric quantities.  In 
particular we seem to be wasting quite a lot of screen real estate by writing 
"GByte" instead of "GB", "Kbit" instead of "Kb", and so on.  "Fixing" this 
wouldn't be too hard, although it'd require tweaking of alignment of columns, 
etc.

Original comment by bmah@es.net on 21 Feb 2014 at 10:22

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 63759bd05c95.

Original comment by bmah@es.net on 21 Feb 2014 at 10:25