Skip to content

Commit

Permalink
update benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseAbram committed Dec 3, 2024
1 parent 0a4776c commit d56a006
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Binary file modified crates/client/entropy_metadata.scale
Binary file not shown.
2 changes: 1 addition & 1 deletion pallets/programs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sp-io ={ version="31.0.0", default-features=false }
sp-runtime ={ version="32.0.0", default-features=false }
sp-staking ={ version="27.0.0", default-features=false }
sp-std ={ version="14.0.0", default-features=false }
pallet-oracle ={ version='0.3.0', path='../oracle', default-features=false }
pallet-oracle ={ version='0.3.0', path='../oracle', default-features=false }

[dev-dependencies]
pallet-balances={ version="29.0.0" }
Expand Down
13 changes: 13 additions & 0 deletions pallets/programs/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use frame_support::{
BoundedVec,
};
use frame_system::{EventRecord, RawOrigin};
use pallet_oracle::OracleData;
use sp_runtime::{traits::Hash, Saturating};
use sp_std::{vec, vec::Vec};

Expand Down Expand Up @@ -52,6 +53,12 @@ benchmarks! {
hash_input.extend(&configuration_schema);
hash_input.extend(&auxiliary_data_schema);
hash_input.extend(&vec![version_number]);

OracleData::<T>::insert(
BoundedVec::try_from(oracle_data_pointers[0].clone()).unwrap(),
BoundedVec::default(),
);

let (_oracle_length, hash_input_with_oracle) =
ProgramsPallet::<T>::get_length_and_hash_of_oracle(&oracle_data_pointers, hash_input).unwrap();

Expand Down Expand Up @@ -97,6 +104,12 @@ benchmarks! {
hash_input.extend(&configuration_schema);
hash_input.extend(&auxiliary_data_schema);
hash_input.extend(&vec![version_number]);

OracleData::<T>::insert(
BoundedVec::try_from(oracle_data_pointers[0].clone()).unwrap(),
BoundedVec::default(),
);

let (_oracle_length, hash_input_with_oracle) =
ProgramsPallet::<T>::get_length_and_hash_of_oracle(&oracle_data_pointers, hash_input).unwrap();

Expand Down

0 comments on commit d56a006

Please sign in to comment.