bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Some suggestions, logging and --report-speed="bits"


From: Tim Ruehsen
Subject: Re: [Bug-wget] Some suggestions, logging and --report-speed="bits"
Date: Tue, 15 Nov 2016 14:49:23 +0100
User-agent: KMail/5.2.3 (Linux/4.8.0-1-amd64; KDE/5.27.0; x86_64; ; )

On Friday, November 11, 2016 5:36:24 PM CET NP wrote:
> Hello
> 
> 1) I use wget to measure download speed. An option
> --report-speed="bits" is nice but it would be even nicer to have
> options like:
> --report-speed="kbits"
> --report-speed="Mbits"
> 
> 2)) Writing data to log file is messy. I simultaneosly write output to
> screen and log file. The 50K steps flood the screen and log file.
> There is also no real time download speed available. For me it would
> be better to print progress MB and % and download speed every second
> or so. Maybe --report-interval.
> 
> --2016-11-11 16:37:49--  http://speedtest.tele2.net/10MB.zip
> Resolving speedtest.tele2.net (speedtest.tele2.net)... 90.130.70.73
> Connecting to speedtest.tele2.net
> (speedtest.tele2.net)|90.130.70.73|:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 10485760 (10M) [application/zip]
> Saving to: 'nul'
> 
>      0K .......... .......... .......... .......... ..........  0%
> 1.16M 9s
>     50K .......... .......... .......... .......... ..........  0%
> 1.09M 9s
>    100K .......... .......... .......... .......... ..........  1%
> 1.95M 8s
>    150K .......... .......... .......... .......... ..........  1%
> 1.15M 8s
>    200K .......... .......... .......... .......... ..........  2%
> 1.24M 8s
>    250K .......... .......... .......... .......... ..........  2%
> 1.09M 8s
>    300K .......... .......... .......... .......... ..........  3%
> 1.83M 7s
>    350K .......... .......... .......... .......... ..........  3%
> 2.62M 7s
>    400K .......... .......... .......... .......... ..........  4%
> 2.69M 7s
>    450K .......... .......... .......... .......... ..........  4%
> 2.69M 6s
>    500K .......... .......... .......... .......... ..........  5%
> 2.38M 6s
>    550K .......... .......... .......... .......... ..........  5%
> 2.38M 6s
>    600K .......... .......... .......... .......... ..........  6%
> 2.93M 6s
>    650K .......... .......... .......... .......... ..........  6%
> 6.49M 5s
>    700K .......... .......... .......... .......... ..........  7%
> 2.70M 5s
> 
> 
> BR NP

Bits per second:

$ time wget -q http://www.speedtestx.de/testfiles/data_10mb.test
real    0m2.198s

$ echo|awk '{ printf "%.2f\n", 10485760 * 8 / 2.198 }'
38164731.57

DNS lookup should be (locally|router) cached (=negligible) if you run wget 
twice.
Then you have the TCP handshake (1 RTT) plus another RTT for HTTP request/
respone (plus server delay, but let's assume that is negligible).

Determine the RTT with 'ping' and subtract 2xRTT from the 'real' value above 
and do the calculation again. Then you know how exact your Bit/s value is.

I guess it takes you just a few minutes to write a script that automatically 
does the above for you. And ready is your 'speedtest utility'.

Be aware that RTT on HTTPS/TLS is different (depending on your  settings / the 
features enabled in the TLS stack).

Regards, Tim

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]