Skip to content

Commit

Permalink
Fix integer overflow in bench for total size calculation (#1474)
Browse files Browse the repository at this point in the history
  • Loading branch information
hubcio authored Jan 30, 2025
1 parent 8534815 commit 6ee955a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bench/report/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "iggy-benchmark-report"
version = "0.1.2"
version = "0.1.3"
edition = "2021"
description = "Benchmark report and chart generation library for iggy-bench binary and iggy-benchmarks-dashboard web app"
license = "Apache-2.0"
Expand Down
5 changes: 3 additions & 2 deletions bench/report/src/prints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ use crate::{
impl BenchmarkReport {
pub fn print_summary(&self) {
let kind = self.params.benchmark_kind;
let total_messages = self.params.messages_per_batch * self.params.message_batches;
let total_size_bytes = total_messages * self.params.message_size;
let total_messages: u64 =
self.params.messages_per_batch as u64 * self.params.message_batches as u64;
let total_size_bytes: u64 = total_messages * self.params.message_size as u64;
let streams = self.params.streams;
let messages_per_batch = self.params.messages_per_batch;
let message_batches = self.params.message_batches;
Expand Down

0 comments on commit 6ee955a

Please sign in to comment.