0
Is the second-by-second output in curl accurate "enough"? What is the period that the "current rate" is calculated over?
I am currently using the second-by-second status output in Curl as a general measure of current bandwidth on that connection.
If you don't know what this "status output" means, then there's no point in describing it :-)
I figure it's "good enough"...spot tests have shown it to be pretty close, but I want to make sure. Also, is the second-by-second current rate over the last second? I am assuming so, although the manuals seem somewhat unclear about this.
What's accurate to you? The rate over the last second, or the rate from the whole download? Maybe somewhere in between? – Brad – 2015-03-02T05:25:39.987
The claim is that the bitrate is over the last second. It could be that it's just random stuff that is printed out to keep the downloader happy that something is happening. The best possible result would be the actual-bits-from-the-last-60-seconds/60-seconds – Mark Gerolimatos – 2015-03-03T01:16:08.203
It's accurate. You can test this yourself with a packet sniffer. – Brad – 2015-03-03T01:17:21.950
Thanks! That's EXACTLY what I needed to know! If you state it in the form of an answer, I'll give you credit :-) – Mark Gerolimatos – 2015-03-03T01:18:47.133
Maybe, but what I can't answer is what is the time period being quantized. And, I see now that you edited your comment asking about the data from the last 60 seconds. I think your first comment is correct, that it's probably the average bitrate over the last second as I see it swing up and down wildly sometimes. But, you would have to inspect the source to be sure. In any case, I promise you that it isn't just some made up number. It's a count of data transferred over time... just what time period I'm not sure. – Brad – 2015-03-03T01:20:26.607
Thank you. I don't have the bandwidth (excuse the pun) for verification, and frankly do not need super accuracy, just want to make sure that the RELATIVE numbers are accurate. When you graph this data, it often becomes immediately apparent as to the cause of the download slowness (ISP limiting, tail drop, good ol' congestion or CDN funny business). And that is why accuracy was somewhat important, so that statements made about the graphs would hold. From what I see here, that is true. – Mark Gerolimatos – 2015-03-03T20:56:02.213