mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
* Fix types Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix import * ".git/.scripts/commands/fmt/fmt.sh" * Fix more Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Actually fix stuff Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * update glutton genesis script * Update Substrate and Polkadot Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: NachoPal <ignacio.palacios.santos@gmail.com> Co-authored-by: command-bot <>
This commit is contained in:
committed by
GitHub
parent
49815cee3c
commit
6a4063917d
@@ -19,7 +19,10 @@ use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
|
||||
|
||||
use sc_client_api::UsageProvider;
|
||||
use sp_api::{Core, ProvideRuntimeApi};
|
||||
use sp_arithmetic::Perbill;
|
||||
use sp_arithmetic::{
|
||||
traits::{One, Zero},
|
||||
FixedPointNumber,
|
||||
};
|
||||
|
||||
use core::time::Duration;
|
||||
use cumulus_primitives_core::ParaId;
|
||||
@@ -46,15 +49,12 @@ fn benchmark_block_import(c: &mut Criterion) {
|
||||
group.measurement_time(Duration::from_secs(120));
|
||||
|
||||
let mut initialize_glutton_pallet = true;
|
||||
for (compute_percent, storage_percent) in &[
|
||||
(Perbill::from_percent(100), Perbill::from_percent(0)),
|
||||
(Perbill::from_percent(100), Perbill::from_percent(100)),
|
||||
] {
|
||||
for (compute_ratio, storage_ratio) in &[(One::one(), Zero::zero()), (One::one(), One::one())] {
|
||||
let block = utils::set_glutton_parameters(
|
||||
&client,
|
||||
initialize_glutton_pallet,
|
||||
compute_percent,
|
||||
storage_percent,
|
||||
compute_ratio,
|
||||
storage_ratio,
|
||||
);
|
||||
initialize_glutton_pallet = false;
|
||||
|
||||
@@ -73,8 +73,9 @@ fn benchmark_block_import(c: &mut Criterion) {
|
||||
|
||||
group.bench_function(
|
||||
format!(
|
||||
"(compute = {:?}, storage = {:?}) block import",
|
||||
compute_percent, storage_percent
|
||||
"(compute = {:?} %, storage = {:?} %) block import",
|
||||
compute_ratio.saturating_mul_int(100),
|
||||
storage_ratio.saturating_mul_int(100)
|
||||
),
|
||||
|b| {
|
||||
b.iter_batched(
|
||||
|
||||
Reference in New Issue
Block a user