mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Reset benchmarks by removing post-genesis changes (#5435)
* Reset by removing pos-genesis changes * CLI option for DB cache size * Update Cargo.lock Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -91,6 +91,10 @@ pub struct BenchmarkCmd {
|
||||
default_value = "Interpreted"
|
||||
)]
|
||||
pub wasm_method: WasmExecutionMethod,
|
||||
|
||||
/// Limit the memory the database cache can use.
|
||||
#[structopt(long = "db-cache", value_name = "MiB", default_value = "128")]
|
||||
pub database_cache_size: u32,
|
||||
}
|
||||
|
||||
impl BenchmarkCmd {
|
||||
@@ -116,7 +120,8 @@ impl BenchmarkCmd {
|
||||
|
||||
let genesis_storage = spec.build_storage()?;
|
||||
let mut changes = Default::default();
|
||||
let state = BenchmarkingState::<BB>::new(genesis_storage)?;
|
||||
let cache_size = Some(self.database_cache_size as usize);
|
||||
let state = BenchmarkingState::<BB>::new(genesis_storage, cache_size)?;
|
||||
let executor = NativeExecutor::<ExecDispatch>::new(
|
||||
wasm_method,
|
||||
None, // heap pages
|
||||
|
||||
Reference in New Issue
Block a user