scp: rounding bug in displayed transfer rate?

Peter Stuge peter at stuge.se
Thu Mar 19 22:25:33 EST 2009


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.

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?

Sorry, but neither seems like an improvement to me.

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

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


//Peter


More information about the openssh-unix-dev mailing list