Skip to content

Commit

Permalink
sp-storage benchmarking import
Browse files Browse the repository at this point in the history
  • Loading branch information
bennethxyz committed Dec 5, 2024
1 parent 97d397b commit 4bfb6b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
4 changes: 0 additions & 4 deletions substrate/frame/timestamp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ sp-timestamp = { workspace = true }

docify = { workspace = true }

# [dev-dependencies]
# sp-core = { workspace = true, default-features = true }
# sp-io = { workspace = true, default-features = true }

[features]
default = ["std"]
std = [
Expand Down
10 changes: 2 additions & 8 deletions substrate/frame/timestamp/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,8 @@
//! Timestamp pallet benchmarking.
#![cfg(feature = "runtime-benchmarks")]
/*
use frame_benchmarking::{benchmarking::add_to_whitelist, v2::*};
use frame_support::traits::OnFinalize;
use frame_system::RawOrigin;
use sp_storage::TrackedStorageKey;
*/
use crate::*;
use frame::{benchmarking::prelude::*, traits::TrackedStorageKey};
use frame::benchmarking::prelude::*;

const MAX_TIME: u32 = 100;

Expand All @@ -38,7 +32,7 @@ mod benchmarks {
let t = MAX_TIME;
// Ignore write to `DidUpdate` since it transient.
let did_update_key = DidUpdate::<T>::hashed_key().to_vec();
add_to_whitelist(TrackedStorageKey {
add_to_whitelist(frame::deps::sp_storage::TrackedStorageKey {
key: did_update_key,
reads: 0,
writes: 1,
Expand Down

0 comments on commit 4bfb6b5

Please sign in to comment.