scp: rounding bug in displayed transfer rate?

Brolin Empey brolin at brolin.be
Fri Mar 20 18:23:33 EST 2009


2009/3/19 Peter Stuge <peter at stuge.se>
>
> Brolin Empey wrote:
> > > > Why is the transfer rate "0.0KB/s"?
> > >
> > > Maybe it took less than one second, so no /s average is available?
> >
> > So what?  After 1 second, it had still transferred 6 bytes.
>
> But the transfer didn't last one full second. Had it done so, the
> actual transfer rate would quite likely be higher than 6b/s.

You mean 6 B/s.  6 b/s is less than 1 B/s. :P

Anyway, you are correct;  I thought of that after I sent my message.

> Are you suggesting that the program should wait idle until one full
> second has passed from start of transfer - or that it should
> fabricate a number which isn't accurate?

As opposed to fabricating an accurate number? ;)

Seriously:  no, I am not suggesting either of those changes.

> Sorry, but neither seems like an improvement to me.

I agree.

> It's simply impossible to calculate an average when there isn't an
> excess of data. Here, the transfer rate resolution is one second.

Then why does scp try to calculate an average when it has insufficient data?

> Would you consider an "unmeasurable" style message to be an
> improvement for cases when no transfer rate can be calculated?

No, I do not think scp should say anything in these cases because such
a message violates the Rule of Silence:
<http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#id2878450>

Incidentally, I think this discussion list should allow rich
(hyper)text mail so I can link parts of my prose instead of pasting
URLs:  in the case of the previous paragraph, the pasted URL is almost
as long as the sentence on the previous line — even when using a
proportional font.  Why am I limited to plain text when using a
computer to write about computer software?

Perhaps I am too contemporary for this discussion list:  I am writing
this message in a proportional font in Gmail's Web interface in
Mozilla Firefox on Windows Vista with subpixel font antialiasing on a
widescreen LCD monitor. ;)


More information about the openssh-unix-dev mailing list