mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 13:57:58 +00:00
Additional benchmark-storage flags (#11004)
* Fix typos * Enable overwriting handlebars template * Optionally name json output or disable json altogether * Don't write to json by default * Include block id in handlebars output * Include warmups for write benchmarks * PR comments * Drop unnecessary file extension * Use more appropriate types * Use more appropriate error message * More use of more appropriate types * Rework write benchmark warmups * Run same benchmark for both read and write
This commit is contained in:
@@ -49,17 +49,6 @@ impl StorageCmd {
|
||||
let mut rng = Self::setup_rng();
|
||||
keys.shuffle(&mut rng);
|
||||
|
||||
// Run some rounds of the benchmark as warmup.
|
||||
for i in 0..self.params.warmups {
|
||||
info!("Warmup round {}/{}", i + 1, self.params.warmups);
|
||||
for key in keys.clone() {
|
||||
let _ = client
|
||||
.storage(&block, &key)
|
||||
.expect("Checked above to exist")
|
||||
.ok_or("Value unexpectedly empty")?;
|
||||
}
|
||||
}
|
||||
|
||||
// Interesting part here:
|
||||
// Read all the keys in the database and measure the time it takes to access each.
|
||||
info!("Reading {} keys", keys.len());
|
||||
|
||||
Reference in New Issue
Block a user