Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bindings/rust/standard/benchmarks/benches/throughput.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ fn bench_throughput_for_library<T>(
}

pub fn bench_throughput_cipher_suites(c: &mut Criterion) {
// arbitrarily large to cut across TLS record boundaries
let mut shared_buf = [0u8; 100000];
// 10MB buffer - arbitrarily large to cut across TLS record boundaries.
let mut shared_buf = vec![0u8; 10_000_000];
Comment on lines 45 to +47
Copy link
Contributor

@lrstewart lrstewart Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right 10MB? I'm not super familiar with the benchmark tests, and I also see

let mut buf = [0x56u8; 1000000];

Did you just test that all benchmarks passed, or did you somehow confirm that all benchmark tests now send more data / take longer? Can you expand your "Testing" section with more details about how you know this change achieves what you're trying to achieve?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the right 10 MB to configure buffer size for throughput benchmarks. To address the second point, I inspected the benchmark results more closely and found that s2n-tls performs significantly faster than expected at 10 MB. I'm currently exploring this and will follow up once I've gathered sufficient data and have more clarity on this behavior.


for cipher_suite in CipherSuite::iter() {
let mut bench_group = c.benchmark_group(format!("throughput-{cipher_suite:?}"));
Expand Down
Loading