Skip to content

Commit

Permalink
enable
Browse files Browse the repository at this point in the history
  • Loading branch information
msmouse committed Jun 22, 2024
1 parent d4ce110 commit a899233
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
8 changes: 6 additions & 2 deletions consensus/src/transaction_shuffler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,18 @@ pub fn create_transaction_shuffler(
entry_fun_conflict_window_size: entry_fun_conflict_window_size as usize,
})
},
UseCaseAware { sender_spread_factor, platform_use_case_spread_factor, user_use_case_spread_factor } => {
UseCaseAware {
sender_spread_factor,
platform_use_case_spread_factor,
user_use_case_spread_factor,
} => {
info!("Using use case aware transaction shuffling");
Arc::new(use_case_aware::UseCaseAwareShuffler {
config: use_case_aware::Config {
sender_spread_factor,
platform_use_case_spread_factor,
user_use_case_spread_factor,
}
},
})
},
}
Expand Down
20 changes: 19 additions & 1 deletion testsuite/forge-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,25 @@ fn realistic_env_fairness_workload_sweep() -> ForgeConfig {
.with_genesis_helm_config_fn(Arc::new(|helm_values| {
// no epoch change.
helm_values["chain"]["epoch_duration_secs"] = (24 * 3600).into();
let mut on_chain_execution_config = OnChainExecutionConfig::default_for_genesis();
// Need to update if the default changes
match &mut on_chain_execution_config {
OnChainExecutionConfig::Missing
| OnChainExecutionConfig::V1(_)
| OnChainExecutionConfig::V2(_)
| OnChainExecutionConfig::V3(_) => {
unreachable!("Unexpected on-chain execution config type, if OnChainExecutionConfig::default_for_genesis() has been updated, this test must be updated too.")
}
OnChainExecutionConfig::V4(config_v4) => {
config_v4.transaction_shuffler_type = TransactionShufflerType::UseCaseAware {
sender_spread_factor: 32,
platform_use_case_spread_factor: 0,
user_use_case_spread_factor: 2,
}
}
}
helm_values["chain"]["on_chain_execution_config"] =
serde_yaml::to_value(on_chain_execution_config).expect("must serialize");
}))
}

Expand Down Expand Up @@ -1184,7 +1203,6 @@ fn realistic_env_graceful_workload_sweep() -> ForgeConfig {
TransactionWorkload::new_const_tps(TransactionTypeArg::VectorPicture30k, 3 * 150),
// Very low gas
TransactionWorkload::new_const_tps(TransactionTypeArg::ModifyGlobalFlagAggV2, 3 * 3500),

// TransactionWorkload::new_const_tps(TransactionTypeArg::ModifyGlobalFlagAggV2, 3 * 3500)
// .with_transactions_per_account(1),
// TransactionWorkload::new_const_tps(TransactionTypeArg::ModifyGlobalFlagAggV2, 3 * 3500)
Expand Down
17 changes: 11 additions & 6 deletions testsuite/testcases/src/load_vs_perf_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use aptos_forge::{
EmitJob, EmitJobMode, EmitJobRequest, NetworkContext, NetworkTest, Result, Test, TxnStats,
WorkflowProgress,
};
use aptos_logger::{info, error};
use aptos_logger::{error, info};
use rand::SeedableRng;
use std::{fmt::Debug, time::Duration};
use tokio::runtime::Runtime;
Expand Down Expand Up @@ -68,10 +68,7 @@ impl Workloads {
Self::TPS(tpss) => {
format!("TPS({})", tpss[index])
},
Self::TRANSACTIONS(workloads) => format!(
"TRANSACTIONS({:?})",
workloads[index]
),
Self::TRANSACTIONS(workloads) => format!("TRANSACTIONS({:?})", workloads[index]),
}
}

Expand Down Expand Up @@ -349,7 +346,15 @@ impl NetworkTest for LoadVsPerfBenchmark {
.checked_mul(self.workloads.num_phases(index) as u32)
.unwrap(),
continous_job.as_mut(),
).inspect_err(|e| error!("Failed evaluating single run [{}]: {:?} with {:?}", index, self.workloads.desc(index), e))?,
)
.inspect_err(|e| {
error!(
"Failed evaluating single run [{}]: {:?} with {:?}",
index,
self.workloads.desc(index),
e
)
})?,
);

let table = to_table(self.workloads.type_name(), &results);
Expand Down

0 comments on commit a899233

Please sign in to comment.