Reduce sample size to 100000

This commit is contained in:
2024-05-15 11:12:57 +02:00
parent c52c1bb844
commit 03128a7804

View File

@@ -12,6 +12,8 @@ use x25519_dalek::StaticSecret;
use zerocopy::byteorder::U32; use zerocopy::byteorder::U32;
use zerocopy::{AsBytes, FromBytes, FromZeroes}; use zerocopy::{AsBytes, FromBytes, FromZeroes};
const SAMPLE_SIZE: usize = 100_000;
const SIZE_TAG: usize = 16; // poly1305 tag const SIZE_TAG: usize = 16; // poly1305 tag
const SIZE_X25519_POINT: usize = 32; // x25519 public key const SIZE_X25519_POINT: usize = 32; // x25519 public key
const SIZE_TIMESTAMP: usize = 12; const SIZE_TIMESTAMP: usize = 12;
@@ -124,7 +126,7 @@ struct Record {
fn main() -> Result<()> { fn main() -> Result<()> {
let mut wtr = csv::Writer::from_writer(io::stdout()); let mut wtr = csv::Writer::from_writer(io::stdout());
for _ in 0..1_000_000 { for _ in 0..SAMPLE_SIZE {
wtr.serialize(Record { wtr.serialize(Record {
time: perform_handshake()?, time: perform_handshake()?,
})?; })?;