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

Use more realistic cap factor in simtest #19862

Merged
merged 1 commit into from
Oct 15, 2024
Merged
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
7 changes: 5 additions & 2 deletions crates/sui-benchmark/tests/simtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ mod test {
let checkpoint_budget_factor; // The checkpoint congestion control budget in respect to transaction budget.
let txn_count_limit; // When using transaction count as congestion control mode, the limit of transactions per object per commit.
let max_deferral_rounds;
let cap_factor_denominator;
{
let mut rng = thread_rng();
mode = if rng.gen_bool(0.33) {
Expand All @@ -478,7 +479,9 @@ mod test {
rng.gen_range(0..20) // Short deferral round (testing cancellation)
} else {
rng.gen_range(1000..10000) // Large deferral round (testing liveness)
}
};

cap_factor_denominator = rng.gen_range(1..100);
}

info!(
Expand Down Expand Up @@ -514,7 +517,7 @@ mod test {
* TEST_ONLY_GAS_UNIT_FOR_HEAVY_COMPUTATION_STORAGE;
config.set_max_accumulated_txn_cost_per_object_in_narwhal_commit_for_testing(total_gas_limit);
config.set_max_accumulated_txn_cost_per_object_in_mysticeti_commit_for_testing(total_gas_limit);
config.set_gas_budget_based_txn_cost_cap_factor_for_testing(total_gas_limit); // Not sure what to set here.
config.set_gas_budget_based_txn_cost_cap_factor_for_testing(total_gas_limit/cap_factor_denominator);
},
}
config.set_max_deferral_rounds_for_congestion_control_for_testing(max_deferral_rounds);
Expand Down
Loading