mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 23:11:08 +00:00
add pallet macro kitchensink example/template (#14052)
* add pallet macro kitchen-sink pallet * update * Adds benchmarking setup * Updates APIs * Fixes benchmark * Uses derive_impl for frame_system * Adds benchmarks * Minor update * Adds license * Adds examples crate * ".git/.scripts/commands/fmt/fmt.sh" * Update frame/examples/kitchensink/src/tests.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/examples/kitchensink/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/examples/kitchensink/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Addresses review comments * Addresses review comments * ".git/.scripts/commands/fmt/fmt.sh" --------- Co-authored-by: Nikhil Gupta <17176722+gupnik@users.noreply.github.com> Co-authored-by: command-bot <> Co-authored-by: command-bot <ci@gitlab.parity.io>
This commit is contained in:
+68
@@ -0,0 +1,68 @@
|
||||
|
||||
//! Autogenerated weights for `pallet_example_kitchensink`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-02, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `MacBook.local`, CPU: `<UNKNOWN>`
|
||||
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/release/node-template
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain
|
||||
// dev
|
||||
// --pallet
|
||||
// pallet_example_kitchensink
|
||||
// --extrinsic
|
||||
// *
|
||||
// --steps
|
||||
// 20
|
||||
// --repeat
|
||||
// 10
|
||||
// --output
|
||||
// frame/examples/kitchensink/src/weights.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions needed for pallet_template.
|
||||
pub trait WeightInfo {
|
||||
fn set_foo_benchmark() -> Weight;
|
||||
}
|
||||
|
||||
/// Weight functions for `pallet_example_kitchensink`.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Storage: Kitchensink OtherFoo (r:0 w:1)
|
||||
/// Proof Skipped: Kitchensink OtherFoo (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn set_foo_benchmark() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_000_000 picoseconds.
|
||||
Weight::from_parts(1_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
|
||||
impl WeightInfo for () {
|
||||
/// Storage: Kitchensink OtherFoo (r:0 w:1)
|
||||
/// Proof Skipped: Kitchensink OtherFoo (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn set_foo_benchmark() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_000_000 picoseconds.
|
||||
Weight::from_parts(1_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(RocksDbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user