ddsol / speedtest.net

node.js SpeedTest.net client module
MIT License
610 stars 125 forks source link

How about an example or explanation of how the following, bandwidth: 3701179, bytes: 35468808, elapsed: 9703, related to each other? #136

Closed Jibun-no-Kage closed 6 months ago

Jibun-no-Kage commented 1 year ago

How about an example or explanation of how the following, bandwidth: 3701179, bytes: 35468808, elapsed: 9703, related to each other? The CLI does this but you just expose the raw results in NR. How do you have NR, match what the CLI does?

Why not have NR data structure return results comparable the CLI? Such as download, 31.64 Mbps, and upload 11.71 Mbps for example?

adamk commented 1 year ago

Bandwidth - Actual internet download speed in Bps (Bytes per second), from man speedtest:

The human-readable format defaults to Mbps and any machine-readable formats (csv, tsv, json, jsonl, json-pretty) use bytes as the unit of measure with max precision.

To get value in Mbps, as in following image you have to divide it by 125000:

The bytes per second measurements can be transformed into the human-readable output format default unit of megabits (Mbps) by dividing the bytes per second value by 125,000.

Bytes - Volume of data used during the test (also in bytes)

Elapsed - Duration of testing download speed, in ms - how much time the testing took.