1
1
// This file is part of Substrate.
2
2
3
- // Copyright (C) 2021- 2022 Parity Technologies (UK) Ltd.
3
+ // Copyright (C) 2022 Parity Technologies (UK) Ltd.
4
4
// SPDX-License-Identifier: Apache-2.0
5
5
6
6
// Licensed under the Apache License, Version 2.0 (the "License");
17
17
18
18
//! Autogenerated weights for pallet_example_basic
19
19
//!
20
- //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
21
- //! DATE: 2021-03-15, STEPS: `[100, ]`, REPEAT: 10, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
- //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
20
+ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21
+ //! DATE: 2022-10-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
+ //! HOSTNAME: `Shawns-MacBook-Pro.local`, CPU: `<UNKNOWN>`
23
+ //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
23
24
24
25
// Executed Command:
25
26
// ./target/release/substrate
26
27
// benchmark
27
- // --chain
28
- // dev
29
- // --execution
30
- // wasm
31
- // --wasm-execution
32
- // compiled
33
- // --pallet
34
- // pallet_example_basic
35
- // --extrinsic
36
- // *
37
- // --steps
38
- // 100
39
- // --repeat
40
- // 10
41
- // --raw
42
- // --output
43
- // ./
28
+ // pallet
29
+ // --chain=dev
30
+ // --execution=wasm
31
+ // --wasm-execution=compiled
32
+ // --pallet=pallet_example_basic
33
+ // --extrinsic=*
34
+ // --steps=50
35
+ // --repeat=20
36
+ // --output=./
44
37
// --template
45
38
// ./.maintain/frame-weight-template.hbs
46
39
47
-
48
40
#![ cfg_attr( rustfmt, rustfmt_skip) ]
49
41
#![ allow( unused_parens) ]
50
42
#![ allow( unused_imports) ]
@@ -54,48 +46,50 @@ use sp_std::marker::PhantomData;
54
46
55
47
/// Weight functions needed for pallet_example_basic.
56
48
pub trait WeightInfo {
57
- fn set_dummy_benchmark ( b : u32 , ) -> Weight ;
58
- fn accumulate_dummy ( b : u32 , ) -> Weight ;
49
+ fn set_dummy_benchmark ( ) -> Weight ;
50
+ fn accumulate_dummy ( ) -> Weight ;
59
51
fn sort_vector ( x : u32 , ) -> Weight ;
60
52
}
61
53
62
54
/// Weights for pallet_example_basic using the Substrate node and recommended hardware.
63
55
pub struct SubstrateWeight < T > ( PhantomData < T > ) ;
64
56
impl < T : frame_system:: Config > WeightInfo for SubstrateWeight < T > {
65
- fn set_dummy_benchmark ( b : u32 , ) -> Weight {
66
- Weight :: from_ref_time ( 5_834_000 as u64 )
67
- . saturating_add ( Weight :: from_ref_time ( 24_000 as u64 ) . saturating_mul ( b as u64 ) )
57
+ // Storage: BasicExample Dummy (r:0 w:1)
58
+ fn set_dummy_benchmark ( ) -> Weight {
59
+ Weight :: from_ref_time ( 19_000_000 as u64 )
68
60
. saturating_add ( T :: DbWeight :: get ( ) . writes ( 1 as u64 ) )
69
61
}
70
- fn accumulate_dummy ( b : u32 , ) -> Weight {
71
- Weight :: from_ref_time ( 51_353_000 as u64 )
72
- . saturating_add ( Weight :: from_ref_time ( 14_000 as u64 ) . saturating_mul ( b as u64 ) )
62
+ // Storage: BasicExample Dummy (r:1 w:1)
63
+ fn accumulate_dummy ( ) -> Weight {
64
+ Weight :: from_ref_time ( 18_000_000 as u64 )
73
65
. saturating_add ( T :: DbWeight :: get ( ) . reads ( 1 as u64 ) )
74
66
. saturating_add ( T :: DbWeight :: get ( ) . writes ( 1 as u64 ) )
75
67
}
68
+ /// The range of component `x` is `[0, 10000]`.
76
69
fn sort_vector ( x : u32 , ) -> Weight {
77
- Weight :: from_ref_time ( 2_569_000 as u64 )
78
- // Standard Error: 0
79
- . saturating_add ( Weight :: from_ref_time ( 4_000 as u64 ) . saturating_mul ( x as u64 ) )
70
+ Weight :: from_ref_time ( 0 as u64 )
71
+ // Standard Error: 2
72
+ . saturating_add ( Weight :: from_ref_time ( 520 as u64 ) . saturating_mul ( x as u64 ) )
80
73
}
81
74
}
82
75
83
76
// For backwards compatibility and tests
84
77
impl WeightInfo for ( ) {
85
- fn set_dummy_benchmark ( b : u32 , ) -> Weight {
86
- Weight :: from_ref_time ( 5_834_000 as u64 )
87
- . saturating_add ( Weight :: from_ref_time ( 24_000 as u64 ) . saturating_mul ( b as u64 ) )
78
+ // Storage: BasicExample Dummy (r:0 w:1)
79
+ fn set_dummy_benchmark ( ) -> Weight {
80
+ Weight :: from_ref_time ( 19_000_000 as u64 )
88
81
. saturating_add ( RocksDbWeight :: get ( ) . writes ( 1 as u64 ) )
89
82
}
90
- fn accumulate_dummy ( b : u32 , ) -> Weight {
91
- Weight :: from_ref_time ( 51_353_000 as u64 )
92
- . saturating_add ( Weight :: from_ref_time ( 14_000 as u64 ) . saturating_mul ( b as u64 ) )
83
+ // Storage: BasicExample Dummy (r:1 w:1)
84
+ fn accumulate_dummy ( ) -> Weight {
85
+ Weight :: from_ref_time ( 18_000_000 as u64 )
93
86
. saturating_add ( RocksDbWeight :: get ( ) . reads ( 1 as u64 ) )
94
87
. saturating_add ( RocksDbWeight :: get ( ) . writes ( 1 as u64 ) )
95
88
}
89
+ /// The range of component `x` is `[0, 10000]`.
96
90
fn sort_vector ( x : u32 , ) -> Weight {
97
- Weight :: from_ref_time ( 2_569_000 as u64 )
98
- // Standard Error: 0
99
- . saturating_add ( Weight :: from_ref_time ( 4_000 as u64 ) . saturating_mul ( x as u64 ) )
91
+ Weight :: from_ref_time ( 0 as u64 )
92
+ // Standard Error: 2
93
+ . saturating_add ( Weight :: from_ref_time ( 520 as u64 ) . saturating_mul ( x as u64 ) )
100
94
}
101
95
}
0 commit comments