Skip to content

Commit

Permalink
fix: Error rate in console is always null.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugoch committed Oct 10, 2024
1 parent 72673e6 commit 9e52ea1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ pub fn results_table(benchmark: BenchmarkReport) -> tabled::Table {
result.inter_token_latency_avg().unwrap().as_micros() as f64 / 1000.0
);
let throughput = format!("{:.2} tokens/sec", result.token_throughput_secs().unwrap());
let error_rate = result.failed_requests() / result.total_requests();
let error_rate = format!("{:.2}%", error_rate as f64 * 100.0);
let error_rate = result.failed_requests() as f64 / result.total_requests() as f64 * 100.0;
let error_rate = format!("{:.2}%", error_rate * 100.0);
builder.push_record(vec![
result.id.as_str(),
qps.as_str(),
Expand Down

0 comments on commit 9e52ea1

Please sign in to comment.