strest 0.1.10

Blazing-fast async HTTP load tester in Rust - lock-free design, real-time stats, distributed runs, and optional chart exports for high-load API testing.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::fmt::Write as _;

use crate::error::{AppError, AppResult, SinkError};

pub(super) fn write_line(output: &mut String, line: &str) -> AppResult<()> {
    writeln!(output, "{}", line).map_err(|err| AppError::sink(SinkError::WriteLine { source: err }))
}

pub(super) fn format_x100(value: u64) -> String {
    format!("{}.{:02}", value / 100, value % 100)
}