Skip to content

Commit

Permalink
fix: reduce benchmarknet config values (#12971)
Browse files Browse the repository at this point in the history
  • Loading branch information
mooori authored Feb 21, 2025
1 parent 50841ef commit baf4929
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions core/parameters/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,14 @@ impl BandwidthSchedulerConfig {
/// Creates a config that effectively disables BandwidthScheduler related limits by setting them
/// to max values. This can be useful for tests and benchmarks.
pub fn test_disabled() -> Self {
// Using `u64::MAX` would lead to overflows as these numbers are used in additions and
// multiplications. The values below are still high enough to effectively disable limits.
let one_tb = 1_000_000_000_000;
Self {
max_shard_bandwidth: u64::MAX,
max_single_grant: u64::MAX,
max_allowance: u64::MAX,
max_base_bandwidth: u64::MAX,
max_shard_bandwidth: 100 * one_tb,
max_single_grant: one_tb,
max_allowance: one_tb,
max_base_bandwidth: one_tb,
}
}
}

0 comments on commit baf4929

Please sign in to comment.