[axel-devel] [axel-Bugs][310903] Extra newlines created with --alternate flag and through put > 10000.0KB/s
axel-bugs at alioth.debian.org
axel-bugs at alioth.debian.org
Fri Sep 12 09:31:21 UTC 2008
Bugs item #310903, was opened at 2008-06-16 21:05
Status: Closed
Priority: 3
Submitted By: Nobody (None)
Assigned to: Y Giridhar Appaji Nag (appaji-guest)
Summary: Extra newlines created with --alternate flag and through put > 10000.0KB/s
Initial Comment:
The alternative mode a very nice display mode (and more like wget), but on a fast connection (local net) the line ends up longer than default console and scrolls the text, instead of keeping on one line:
...
[ 7%] [0 1 2 3 ] [10298.2KB/s] [02:51
[ 7%] [0 1 2 3 ] [10298.3KB/s] [02:51
[ 7%] [0 1 2 3 ] [10294.4KB/s] [02:51
...
Suggestions:
Subtract one character from thread display and give it to through put section, to allow up to 99999.9KB/s
or
If throughput goes > 10000KB/s then switch to MB/s, to allow up to 9999.9MB/s.
Tried on both 1.0b and 1.1.
----------------------------------------------------------------------
>Comment By: Y Giridhar Appaji Nag (appaji-guest)
Date: 2008-09-12 15:01
Message:
Fixed in svn r35
$ svn diff
Index: text.c
===================================================================
--- text.c (revision 32)
+++ text.c (working copy)
@@ -493,7 +493,12 @@
putchar(' ');
}
- printf( "] [%6.1fKB/s]", (double) axel->bytes_per_second / 1024 );
+ if(axel->bytes_per_second > 1048576)
+ printf( "] [%6.1fMB/s]", (double) axel->bytes_per_second / 1024*1024 );
+ else if(axel->bytes_per_second > 1024)
+ printf( "] [%6.1fKB/s]", (double) axel->bytes_per_second / 1024 );
+ else
+ printf( "] [%6.1fB/s]", (double) axel->bytes_per_second );
if(done<total)
{
----------------------------------------------------------------------
Comment By: Y Giridhar Appaji Nag (appaji-guest)
Date: 2008-09-12 14:57
Message:
Fixed in svn r35
$ svn diff
Index: text.c
===================================================================
--- text.c (revision 32)
+++ text.c (working copy)
@@ -493,7 +493,12 @@
putchar(' ');
}
- printf( "] [%6.1fKB/s]", (double) axel->bytes_per_second / 1024 );
+ if(axel->bytes_per_second > 1048576)
+ printf( "] [%6.1fMB/s]", (double) axel->bytes_per_second / 1024*1024 );
+ else if(axel->bytes_per_second > 1024)
+ printf( "] [%6.1fKB/s]", (double) axel->bytes_per_second / 1024 );
+ else
+ printf( "] [%6.1fB/s]", (double) axel->bytes_per_second );
if(done<total)
{
----------------------------------------------------------------------
You can respond by visiting:
http://alioth.debian.org/tracker/?func=detail&atid=413085&aid=310903&group_id=100070
More information about the axel-devel
mailing list