quick-stats is a basic tool for quickly assessing a computer's performance and environment
- Benchmark CPU performance for floating-point operations per second (GFLOPS, FP64)
- Benchmark GPU performance for floating-point operations per second (TFLOPS, FP32)
- Support for CUDA GPUs and Metal Performance Shaders (MPS) for Apple Silicon
- Check if device has a battery and returns state of charge, charging state and capacity
- Check upload and download speeds, ping and public IP
Run all available benchmarks and features (default: cpu, gpu, battery, network):
cargo run --releaseThe application supports the following command-line options:
quick-stats [OPTIONS]
OPTIONS:
-f, --format <FORMAT> Sets the output format [default: plain] [possible values: plain, json]
-o, --outputFile <OUTPUT> Specifies the file to write the output to
-e, --features <FEATURE> Select which benchmarks/features to run [default: cpu,gpu,battery,network]
Possible values: cpu, gpu, battery, network (comma-separated)
--no-benchmark Skip CPU and GPU benchmarks, only collect device information
--no-bandwidth Skip internet speed measurement
-h, --help Print help information
-V, --version Print version informationRun only CPU and GPU benchmarks:
cargo run --release -- --features cpu,gpuGet output in JSON format:
cargo run --release -- --format jsonSave results to a file:
cargo run --release -- --outputFile results.txtRun only network tests and save as JSON:
cargo run --release -- --features network --format json --outputFile network_stats.jsonGet device information without running benchmarks (fast):
cargo run --release -- --no-benchmarkGet only GPU device info without benchmarks:
cargo run --release -- --features gpu --no-benchmark --format jsonGet network info without bandwidth measurement (faster):
cargo run --release -- --features network --no-bandwidth- cpu: CPU benchmark (GFLOPS) and system information (OS, architecture, memory)
- gpu: GPU benchmark (TFLOPS) — ONNX Runtime on Windows/Linux (CUDA, DirectML or
CPU execution provider, reported as
"ep"in the JSON output), Metal Performance Shaders (MPS) on Apple Silicon - battery: Battery status (charge level, charging state, capacity) if available
- network: Network diagnostics (ping, public IP, download/upload speeds)
Precision: both benchmarks are a 1024x1024 GEMM (flops = 2 * n^3 per iteration,
after a 10-iteration warm-up), but they do not measure the same precision: the CPU
benchmark runs FP64 (f64) while the GPU benchmark runs FP32 (f32). The two
FLOPS figures are therefore not directly comparable across precisions, and the CPU number
is typically well below that CPU's FP32 peak. The JSON output states this explicitly via
"precision" ("fp64" / "fp32") and "iterations", so a FLOPS value can be
recomputed from the reported duration:
flops = 2 * 1024^3 * iterations flops_per_second = flops / duration
Two ML backends, selected per platform at compile time:
- Windows / Linux — ONNX Runtime (
ortcrate,load-dynamic): nothing is linked or downloaded at build time; the onnxruntime shared library is located at runtime viaORT_DYLIB_PATH, falling back to a dylib sitting next to the executable. Without it the binary still runs — the GPU benchmark reportsep: "unavailable". Use onnxruntime 1.23.2 (on Linux, >= 1.23 is required: 1.20–1.22 segfault at process exit).- CUDA execution provider additionally needs CUDA 12 + cuDNN 9 installed;
- DirectML (Windows) needs a DX12 GPU;
- otherwise the benchmark runs on the CPU execution provider.
- macOS — libtorch (tch 0.17, libtorch 2.4.0, MPS):
cargo check/dev builds fetch libtorch automatically (download-libtorch) when noLIBTORCHenv var is set; release binaries are built by.dev_ops/publish_mac_binaries.shagainst the exact tree LinkMesh bundles (libtorch-2.4.0-mac-cpu-arm64).
No environment variables are required to build — onnxruntime is resolved at runtime:
cargo build --release
# to run the GPU benchmark, point at an onnxruntime 1.23.2 library:
export ORT_DYLIB_PATH=/path/to/onnxruntime-linux-x64-1.23.2/lib/libonnxruntime.so # linux
# $Env:ORT_DYLIB_PATH = "X:\path\to\onnxruntime-win-x64-1.23.2\onnxruntime.dll" # windows
./target/release/quick_stats -e gpu- Add support for ROCm (for AMD GPUs, via an ONNX Runtime ROCm execution provider)