Skip to content
This repository was archived by the owner on Jul 4, 2022. It is now read-only.

Commit cb33918

Browse files
authored
Add default_weights impls for () in prml modules (#152)
1 parent 307a6e0 commit cb33918

File tree

2 files changed

+77
-36
lines changed

2 files changed

+77
-36
lines changed
Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,36 @@
1-
use frame_support::weights::{constants::RocksDbWeight as DbWeight, Weight};
1+
// This file is part of Plug.
2+
3+
// Copyright (C) 2020 Parity Technologies (UK) Ltd. and Plug New Zealand.
4+
// SPDX-License-Identifier: Apache-2.0
5+
6+
// Licensed under the Apache License, Version 2.0 (the "License");
7+
// you may not use this file except in compliance with the License.
8+
// You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
18+
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0
19+
20+
#![allow(unused_parens)]
21+
#![allow(unused_imports)]
22+
23+
use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
224

325
impl crate::WeightInfo for () {
426
fn set_claim() -> Weight {
5-
// taken from frame/balances
6-
(65_949_000 as Weight)
7-
.saturating_mul(84)
8-
.saturating_add(DbWeight::get().reads_writes(4, 2))
27+
(89_000_000 as Weight)
28+
.saturating_add(DbWeight::get().reads(2 as Weight))
29+
.saturating_add(DbWeight::get().writes(3 as Weight))
930
}
1031
fn remove_claim() -> Weight {
11-
(65_949_000 as Weight)
12-
.saturating_mul(84)
13-
.saturating_add(DbWeight::get().reads_writes(4, 2))
32+
(101_000_000 as Weight)
33+
.saturating_add(DbWeight::get().reads(2 as Weight))
34+
.saturating_add(DbWeight::get().writes(3 as Weight))
1435
}
1536
}
Lines changed: 48 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,60 @@
1-
use frame_support::weights::{constants::RocksDbWeight as DbWeight, Weight};
1+
// This file is part of Plug.
2+
3+
// Copyright 2019-2020 Plug New Zealand Limited
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+
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0
18+
19+
#![allow(unused_parens)]
20+
#![allow(unused_imports)]
21+
22+
use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
223

324
impl crate::WeightInfo for () {
425
fn transfer() -> Weight {
5-
// taken from frame/balances
6-
(65_949_000 as Weight)
7-
.saturating_mul(84)
8-
.saturating_add(DbWeight::get().reads_writes(4, 2))
26+
(155_000_000 as Weight)
27+
.saturating_add(DbWeight::get().reads(4 as Weight))
28+
.saturating_add(DbWeight::get().writes(2 as Weight))
929
}
10-
fn create() -> Weight {
11-
(65_949_000 as Weight)
12-
.saturating_mul(84)
13-
.saturating_add(DbWeight::get().reads_writes(4, 2))
30+
fn burn() -> Weight {
31+
(92_000_000 as Weight)
32+
.saturating_add(DbWeight::get().reads(3 as Weight))
33+
.saturating_add(DbWeight::get().writes(2 as Weight))
1434
}
15-
fn update_asset_info() -> Weight {
16-
(65_949_000 as Weight)
17-
.saturating_mul(84)
18-
.saturating_add(DbWeight::get().reads_writes(4, 2))
35+
fn create() -> Weight {
36+
(77_000_000 as Weight)
37+
.saturating_add(DbWeight::get().reads(1 as Weight))
38+
.saturating_add(DbWeight::get().writes(5 as Weight))
1939
}
2040
fn mint() -> Weight {
21-
(65_949_000 as Weight)
22-
.saturating_mul(84)
23-
.saturating_add(DbWeight::get().reads_writes(4, 2))
24-
}
25-
fn burn() -> Weight {
26-
(65_949_000 as Weight)
27-
.saturating_mul(84)
28-
.saturating_add(DbWeight::get().reads_writes(4, 2))
41+
(92_000_000 as Weight)
42+
.saturating_add(DbWeight::get().reads(3 as Weight))
43+
.saturating_add(DbWeight::get().writes(2 as Weight))
2944
}
30-
fn create_reserved() -> Weight {
31-
(65_949_000 as Weight)
32-
.saturating_mul(84)
33-
.saturating_add(DbWeight::get().reads_writes(4, 2))
45+
fn update_asset_info() -> Weight {
46+
(70_000_000 as Weight)
47+
.saturating_add(DbWeight::get().reads(2 as Weight))
48+
.saturating_add(DbWeight::get().writes(1 as Weight))
3449
}
3550
fn update_permission() -> Weight {
36-
(65_949_000 as Weight)
37-
.saturating_mul(84)
38-
.saturating_add(DbWeight::get().reads_writes(4, 2))
51+
(60_000_000 as Weight)
52+
.saturating_add(DbWeight::get().reads(1 as Weight))
53+
.saturating_add(DbWeight::get().writes(1 as Weight))
54+
}
55+
fn create_reserved() -> Weight {
56+
(87_000_000 as Weight)
57+
.saturating_add(DbWeight::get().reads(2 as Weight))
58+
.saturating_add(DbWeight::get().writes(4 as Weight))
3959
}
4060
}

0 commit comments

Comments
 (0)