pallet_robonomics_datalog/
weights.rs

1///////////////////////////////////////////////////////////////////////////////
2//
3//  Copyright 2018-2025 Robonomics Network <research@robonomics.network>
4//
5//  Licensed under the Apache License, Version 2.0 (the "License");
6//  you may not use this file except in compliance with the License.
7//  You may obtain a copy of the License at
8//
9//      http://www.apache.org/licenses/LICENSE-2.0
10//
11//  Unless required by applicable law or agreed to in writing, software
12//  distributed under the License is distributed on an "AS IS" BASIS,
13//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14//  See the License for the specific language governing permissions and
15//  limitations under the License.
16//
17///////////////////////////////////////////////////////////////////////////////
18//! Autogenerated weights for `pallet_robonomics_datalog`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
21//! DATE: 2025-10-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! CPU: `DO-Premium-AMD`
24//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
25
26// Executed Command:
27// frame-omni-bencher
28// v1
29// benchmark
30// pallet
31// --runtime
32// ./target/release/wbuild/robonomics-runtime/robonomics_runtime.compact.compressed.wasm
33// --pallet
34// pallet_robonomics_datalog
35// --extrinsic
36// 
37// --template
38// ./scripts/weights/frame-weight-template.hbs
39// --output
40// frame/datalog/src/weights.rs
41
42#![cfg_attr(rustfmt, rustfmt_skip)]
43#![allow(unused_parens)]
44#![allow(unused_imports)]
45#![allow(missing_docs)]
46
47use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
48use core::marker::PhantomData;
49
50/// Weight functions needed for `pallet_robonomics_datalog`.
51pub trait WeightInfo {
52	fn record() -> Weight;
53	fn erase() -> Weight;
54}
55
56/// Weights for `pallet_robonomics_datalog` using the Substrate node and recommended hardware.
57pub struct SubstrateWeight<T>(PhantomData<T>);
58impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
59	/// Storage: `Timestamp::Now` (r:1 w:0)
60	/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
61	/// Storage: `Datalog::DatalogIndex` (r:1 w:1)
62	/// Proof: `Datalog::DatalogIndex` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
63	/// Storage: `Datalog::DatalogItem` (r:0 w:1)
64	/// Proof: `Datalog::DatalogItem` (`max_values`: None, `max_size`: Some(570), added: 3045, mode: `MaxEncodedLen`)
65	fn record() -> Weight {
66		// Proof Size summary in bytes:
67		//  Measured:  `148`
68		//  Estimated: `3521`
69		// Minimum execution time: 30_900_000 picoseconds.
70		Weight::from_parts(36_430_000, 3521)
71			.saturating_add(T::DbWeight::get().reads(2_u64))
72			.saturating_add(T::DbWeight::get().writes(2_u64))
73	}
74	/// Storage: `Datalog::DatalogIndex` (r:1 w:1)
75	/// Proof: `Datalog::DatalogIndex` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
76	/// Storage: `Datalog::DatalogItem` (r:0 w:127)
77	/// Proof: `Datalog::DatalogItem` (`max_values`: None, `max_size`: Some(570), added: 3045, mode: `MaxEncodedLen`)
78	fn erase() -> Weight {
79		// Proof Size summary in bytes:
80		//  Measured:  `106`
81		//  Estimated: `3521`
82		// Minimum execution time: 308_956_000 picoseconds.
83		Weight::from_parts(384_426_000, 3521)
84			.saturating_add(T::DbWeight::get().reads(1_u64))
85			.saturating_add(T::DbWeight::get().writes(128_u64))
86	}
87}
88
89// For backwards compatibility and tests.
90impl WeightInfo for () {
91	/// Storage: `Timestamp::Now` (r:1 w:0)
92	/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
93	/// Storage: `Datalog::DatalogIndex` (r:1 w:1)
94	/// Proof: `Datalog::DatalogIndex` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
95	/// Storage: `Datalog::DatalogItem` (r:0 w:1)
96	/// Proof: `Datalog::DatalogItem` (`max_values`: None, `max_size`: Some(570), added: 3045, mode: `MaxEncodedLen`)
97	fn record() -> Weight {
98		// Proof Size summary in bytes:
99		//  Measured:  `148`
100		//  Estimated: `3521`
101		// Minimum execution time: 30_900_000 picoseconds.
102		Weight::from_parts(36_430_000, 3521)
103			.saturating_add(RocksDbWeight::get().reads(2_u64))
104			.saturating_add(RocksDbWeight::get().writes(2_u64))
105	}
106	/// Storage: `Datalog::DatalogIndex` (r:1 w:1)
107	/// Proof: `Datalog::DatalogIndex` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
108	/// Storage: `Datalog::DatalogItem` (r:0 w:127)
109	/// Proof: `Datalog::DatalogItem` (`max_values`: None, `max_size`: Some(570), added: 3045, mode: `MaxEncodedLen`)
110	fn erase() -> Weight {
111		// Proof Size summary in bytes:
112		//  Measured:  `106`
113		//  Estimated: `3521`
114		// Minimum execution time: 308_956_000 picoseconds.
115		Weight::from_parts(384_426_000, 3521)
116			.saturating_add(RocksDbWeight::get().reads(1_u64))
117			.saturating_add(RocksDbWeight::get().writes(128_u64))
118	}
119}