frame_support/weights.rs
1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
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//! Re-exports `sp-weights` public API, and contains benchmarked weight constants specific to FRAME.
19
20mod block_weights;
21mod extrinsic_weights;
22mod paritydb_weights;
23mod rocksdb_weights;
24
25pub use sp_weights::*;
26
27/// These constants are specific to FRAME, and the current implementation of its various components.
28/// For example: FRAME System, FRAME Executive, our FRAME support libraries, etc...
29pub mod constants {
30 pub use sp_weights::constants::*;
31
32 // Expose the Block and Extrinsic base weights.
33 pub use super::{block_weights::BlockExecutionWeight, extrinsic_weights::ExtrinsicBaseWeight};
34
35 // Expose the DB weights.
36 pub use super::{
37 paritydb_weights::constants::ParityDbWeight, rocksdb_weights::constants::RocksDbWeight,
38 };
39}