Skip to content

Commit

Permalink
chore: change throughput measure
Browse files Browse the repository at this point in the history
use Bytes.len, not the size of the Bytes struct!
  • Loading branch information
joshuef committed Sep 1, 2022
1 parent 5194123 commit 388cd22
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sn_client/benches/serialize.rs
Expand Up @@ -105,9 +105,8 @@ fn criterion_benchmark(c: &mut Criterion) {
Err(_error) => panic!("Could not serialize the msg bytes"),
};

group.throughput(Throughput::Bytes(
(std::mem::size_of_val(&msg_bytes) * dsts.len()) as u64,
));
group.throughput(Throughput::Bytes((&msg_bytes.len() * dsts.len()) as u64));

// upload and read
group.bench_with_input(
"generating bytes to send the same msg to various Dsts",
Expand Down

0 comments on commit 388cd22

Please sign in to comment.