pub async fn run_bandwidth_test<F, Fut>(
config: &Config,
server: &Server,
test_label: &str,
is_verbose: bool,
test_fn: F,
) -> Result<TestRunResult, SpeedtestError>Expand description
Run a bandwidth test with latency-under-load monitoring.
This is a template method that handles:
- Progress bar setup
- Background latency monitoring
- Test execution via the provided closure
- Result aggregation
§Arguments
config- Configuration for HTTP client creationserver- Server to test againsttest_label- Label for progress display (e.g., “Download”, “Upload”)is_verbose- Whether to show visible progresstest_fn- Async closure that runs the actual bandwidth test
§Errors
Returns SpeedtestError if the test fails.