Discover Packages
github.com/StrangeNoob/speed-test-cli
internal
speedtest
package
Version:
v0.1.9
Opens a new window with list of versions in this module.
Published: Jun 8, 2026
License: MIT
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Mbps converts a byte count over a duration into megabits per second.
Client holds endpoint URLs and the HTTP client used for measurement.
NewClient returns a Client pointed at Cloudflare with sane HTTP defaults.
Run executes the configured measurements and returns a populated Result.
Latency runs first, then download and/or upload per cfg flags.
Config holds tunable run parameters.
Phase identifies which measurement is in progress.
const (
PhaseLatency Phase = "latency"
PhaseDownload Phase = "download"
PhaseUpload Phase = "upload"
)
Progress is reported to the callback as bytes flow.
ProgressFunc receives live progress; may be nil.
type Result struct {
Timestamp time .Time `json:"timestamp"`
ServerColo string `json:"server_colo"`
Latency time .Duration `json:"latency_ns"`
Jitter time .Duration `json:"jitter_ns"`
DownloadMbps float64 `json:"download_mbps"`
UploadMbps float64 `json:"upload_mbps"`
}
Result is the single contract between measurement and consumers.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.