Skip to main content

Module formatter

Module formatter 

Source
Expand description

Output formatting for speed test results.

This module is organized into submodules:

  • ratings — Rating helper functions (ping, speed, connection, bufferbloat)
  • sections — Output section formatters (latency, download, upload, etc.)
  • stability — Speed stability analysis and latency percentiles
  • estimates — Usage check targets and download time estimates

Re-exports§

pub use estimates::format_targets;
pub use estimates::show;
pub use ratings::BufferbloatGrade;
pub use ratings::bufferbloat_colorized;
pub use ratings::bufferbloat_grade;
pub use ratings::colorize_rating;
pub use ratings::connection_rating;
pub use ratings::degradation_str;
pub use ratings::format_duration;
pub use ratings::format_overall_rating;
pub use ratings::format_speed_colored;
pub use ratings::format_speed_plain;
pub use ratings::ping_rating;
pub use ratings::speed_rating_mbps;
pub use sections::build_elapsed_time;
pub use sections::format_connection_info;
pub use sections::format_download_section;
pub use sections::format_elapsed_time;
pub use sections::format_latency_section;
pub use sections::format_list;
pub use sections::format_test_summary;
pub use sections::format_upload_section;
pub use stability::compute_cv;
pub use stability::compute_percentiles;
pub use stability::format_stability_line;

Modules§

dashboard
Dashboard output formatting — rich single-screen summary with gauges and sparklines.
estimates
Usage check targets and real-world download time estimates.
ratings
Rating helper functions for speed test results.
scenarios
Grouped, category-based internet usage scenario display.
sections
Output section formatters for detailed test results.
stability
Speed stability analysis and latency percentiles.

Structs§

FormatterFactory
Factory for creating formatter instances.
SkipState
Which test phases were skipped by the user (e.g. --no-download).

Enums§

OutputFormat
Output format selection — Strategy pattern. Add new variants here to extend output formats (OCP).

Traits§

Formatter
Trait for output formatting strategies.

Functions§

format_compact
Compact mode — key metrics with ratings and brief summary. Middle ground between simple (too minimal) and detailed (too verbose).
format_csv
Output test results as CSV to stdout.
format_detailed
Detailed mode — clean key/value pairs.
format_json
Output test results as JSON to stdout.
format_jsonl
JSONL mode — one JSON object per line, ideal for logging/parsing.
format_minimal
Minimal mode — ultra-compact: just “B+ 150.5↓ 25.3↑ 12ms”
format_simple
Simple mode — single line.
format_verbose_sections
Format additional verbose output sections: stability, latency percentiles, and historical comparison. Only used in detailed (verbose) mode.