Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: benchmark default bytesizes #4356

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async-trait = { version = "0.1.41", default-features = false }
base64 = "0.22.0"
blocking = "1.1.0"
bytes = "1.7.2"
bytesize = "1.1.0"
bytesize = "1.3.0"
cargo_toml = "0.20.3"
cargo-generate = { version = "0.21", default-features = false }
cfg-if = "1.0.0"
Expand Down
12 changes: 6 additions & 6 deletions crates/fluvio-benchmark/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ use bytesize::ByteSize;

use crate::utils;

const DEFAULT_BATCH_SIZE: ByteSize = ByteSize::kib(16);
const DEFAULT_BATCH_SIZE: &str = "16kib";
const DEFAULT_QUEUE_SIZE: u64 = 10;
const DEFAULT_MAX_REQUEST_SIZE: ByteSize = ByteSize::mib(32);
const DEFAULT_MAX_REQUEST_SIZE: &str = "32mib";
const DEFAULT_LINGER: &str = "0ms";
const DEFAULT_SERVER_TIMEOUT: &str = "5000ms";
const DEFAULT_COMPRESSION: Compression = Compression::None;
Expand All @@ -23,7 +23,7 @@ const DEFAULT_WORKER_TIMEOUT: &str = "3000s";
const DEFAULT_RECORD_KEY_ALLOCATION_STRATEGY: RecordKeyAllocationStrategy =
RecordKeyAllocationStrategy::NoKey;
const DEFAULT_NUM_PRODUCERS: u64 = 1;
const DEFAULT_RECORD_SIZE: ByteSize = ByteSize::kib(5);
const DEFAULT_RECORD_SIZE: &str = "5kib";
const DEFAULT_NUM_RECORDS: u64 = 10_000;
const DEFAULT_PARTITIONS: u32 = 1;
const DEFAULT_REPLICAS: u32 = 1;
Expand All @@ -38,13 +38,13 @@ pub enum BenchmarkConfig {
#[derive(Debug, Parser, Clone, Builder)]
pub struct ProducerConfig {
/// Size of each batch
#[arg(short, long, value_name = "bytes", default_value_t = DEFAULT_BATCH_SIZE)]
#[arg(short, long, value_name = "bytes", default_value = DEFAULT_BATCH_SIZE)]
pub batch_size: ByteSize,
/// Number of records to send
#[arg(short, long, default_value_t = DEFAULT_QUEUE_SIZE)]
pub queue_size: u64,
/// Maximum size of a request
#[arg(long, value_name = "bytes", default_value_t = DEFAULT_MAX_REQUEST_SIZE)]
#[arg(long, value_name = "bytes", default_value = DEFAULT_MAX_REQUEST_SIZE)]
pub max_request_size: ByteSize,
/// Time to wait for new records
#[arg(short, long, value_parser = humantime::parse_duration, default_value = DEFAULT_LINGER)]
Expand Down Expand Up @@ -75,7 +75,7 @@ pub struct ProducerConfig {
#[clap(long, default_value_t = DEFAULT_NUM_RECORDS)]
pub num_records: u64,
/// Size of each record in bytes
#[arg(long, value_name = "bytes", default_value_t = DEFAULT_RECORD_SIZE)]
#[arg(long, value_name = "bytes", default_value = DEFAULT_RECORD_SIZE)]
pub record_size: ByteSize,

/// Number of partitions for the topic
Expand Down
Loading