cloudflare / speedtest

Component to perform network speed tests against Cloudflare's edge network
https://speed.cloudflare.com
MIT License
459 stars 34 forks source link

I am missing units in the documentation #40

Closed stoefln closed 2 months ago

stoefln commented 2 months ago

Sorry I am a bit confused about the units of the result set:

{
    "download": 986662.2690849561,
    "upload": 1345525.1535724057,
    "latency": 47.5825734990873,
    "jitter": 182.43999794812132,
    "downLoadedLatency": 56.520166052638345,
    "downLoadedJitter": 360.4513059548779,
    "upLoadedLatency": 39.500082931547794,
    "upLoadedJitter": 19.959669623410758,
    "packetLoss": 0.281
}

What the unit of "download" and "upload"? Kbits transferred? (I guess not, since it's a float). Kbits per second? Kbyte per second? average bytes transferred accross all measurements? It would be great if I didn't have to do guesswork.

Same for other properties...

Can you tell me? I'd be happy to contribute a PR!

stoefln commented 2 months ago

OK, it seems to be "bits per second". I figured it out by running a speed test of another provider and then comparing the numbers trying different division factors. download / 1000 / 1000 gives you the Mbits per second.