Skip to content

Commit

Permalink
feat: update oss benchmark (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
ytqaljn authored Jan 15, 2024
1 parent 83be259 commit 8a3be14
Show file tree
Hide file tree
Showing 15 changed files with 1,360 additions and 1,249 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk.git", bra
sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0", default-features = false }
sp-staking = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0", default-features = false }
sp-session = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0", default-features = false }
sp-storage = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0", default-features = false }
sp-statement-store = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0", default-features = false }
sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0", default-features = false }
sp-version = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.1.0", default-features = false }
Expand Down
498 changes: 249 additions & 249 deletions pallets/audit/src/benchmarking.rs

Large diffs are not rendered by default.

90 changes: 90 additions & 0 deletions pallets/audit/src/weights_demo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@

//! Autogenerated weights for `pallet_cacher`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-01-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ytqaljn-virtual-machine`, CPU: `12th Gen Intel(R) Core(TM) i5-12400`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("cess-initial-devnet")`, DB CACHE: 1024
// Executed Command:
// ./target/release/cess-node
// benchmark
// pallet
// --chain
// cess-initial-devnet
// --execution=wasm
// --wasm-execution=compiled
// --pallet
// pallet_cacher
// --extrinsic
// *
// --steps
// 50
// --repeat
// 20
// --output=./pallets/audit/src/weights_demo.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;

/// Weight functions for `pallet_cacher`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_cacher::WeightInfo for WeightInfo<T> {
/// Storage: `Cacher::Cachers` (r:1 w:1)
/// Proof: `Cacher::Cachers` (`max_values`: None, `max_size`: Some(115), added: 2590, mode: `MaxEncodedLen`)
fn register() -> Weight {
// Proof Size summary in bytes:
// Measured: `80`
// Estimated: `3580`
// Minimum execution time: 11_975_000 picoseconds.
Weight::from_parts(13_053_000, 0)
.saturating_add(Weight::from_parts(0, 3580))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Cacher::Cachers` (r:1 w:1)
/// Proof: `Cacher::Cachers` (`max_values`: None, `max_size`: Some(115), added: 2590, mode: `MaxEncodedLen`)
fn update() -> Weight {
// Proof Size summary in bytes:
// Measured: `211`
// Estimated: `3580`
// Minimum execution time: 14_386_000 picoseconds.
Weight::from_parts(18_079_000, 0)
.saturating_add(Weight::from_parts(0, 3580))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Cacher::Cachers` (r:1 w:1)
/// Proof: `Cacher::Cachers` (`max_values`: None, `max_size`: Some(115), added: 2590, mode: `MaxEncodedLen`)
fn logout() -> Weight {
// Proof Size summary in bytes:
// Measured: `185`
// Estimated: `3580`
// Minimum execution time: 12_361_000 picoseconds.
Weight::from_parts(15_192_000, 0)
.saturating_add(Weight::from_parts(0, 3580))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `v` is `[0, 10]`.
fn pay(v: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `205`
// Estimated: `6196`
// Minimum execution time: 8_558_000 picoseconds.
Weight::from_parts(15_485_833, 0)
.saturating_add(Weight::from_parts(0, 6196))
// Standard Error: 79_154
.saturating_add(Weight::from_parts(29_876_773, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
Loading

0 comments on commit 8a3be14

Please sign in to comment.