Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Decrease amount of benchmark iterations for long slow ones
Browse files Browse the repository at this point in the history
  • Loading branch information
athei committed Oct 18, 2022
1 parent 794453a commit d8d8557
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frame/contracts/src/benchmarking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1890,7 +1890,7 @@ benchmarks! {

// Only the overhead of calling the function itself with minimal arguments.
seal_hash_sha2_256 {
let r in 0 .. API_BENCHMARK_BATCHES;
let r in 0 .. 1;
let instance = Contract::<T>::new(WasmModule::hasher(
"seal_hash_sha2_256", r * API_BENCHMARK_BATCH_SIZE, 0,
), vec![])?;
Expand All @@ -1908,7 +1908,7 @@ benchmarks! {

// Only the overhead of calling the function itself with minimal arguments.
seal_hash_keccak_256 {
let r in 0 .. API_BENCHMARK_BATCHES;
let r in 0 .. 1;
let instance = Contract::<T>::new(WasmModule::hasher(
"seal_hash_keccak_256", r * API_BENCHMARK_BATCH_SIZE, 0,
), vec![])?;
Expand All @@ -1926,7 +1926,7 @@ benchmarks! {

// Only the overhead of calling the function itself with minimal arguments.
seal_hash_blake2_256 {
let r in 0 .. API_BENCHMARK_BATCHES;
let r in 0 .. 1;
let instance = Contract::<T>::new(WasmModule::hasher(
"seal_hash_blake2_256", r * API_BENCHMARK_BATCH_SIZE, 0,
), vec![])?;
Expand All @@ -1944,7 +1944,7 @@ benchmarks! {

// Only the overhead of calling the function itself with minimal arguments.
seal_hash_blake2_128 {
let r in 0 .. API_BENCHMARK_BATCHES;
let r in 0 .. 1;
let instance = Contract::<T>::new(WasmModule::hasher(
"seal_hash_blake2_128", r * API_BENCHMARK_BATCH_SIZE, 0,
), vec![])?;
Expand All @@ -1963,7 +1963,7 @@ benchmarks! {
// Only calling the function itself with valid arguments.
// It generates different private keys and signatures for the message "Hello world".
seal_ecdsa_recover {
let r in 0 .. API_BENCHMARK_BATCHES;
let r in 0 .. 1;

let message_hash = sp_io::hashing::blake2_256("Hello world".as_bytes());
let key_type = sp_core::crypto::KeyTypeId(*b"code");
Expand Down Expand Up @@ -2011,7 +2011,7 @@ benchmarks! {
// Only calling the function itself for the list of
// generated different ECDSA keys.
seal_ecdsa_to_eth_address {
let r in 0 .. API_BENCHMARK_BATCHES;
let r in 0 .. 1;
let key_type = sp_core::crypto::KeyTypeId(*b"code");
let pub_keys_bytes = (0..r * API_BENCHMARK_BATCH_SIZE)
.map(|_| {
Expand Down

0 comments on commit d8d8557

Please sign in to comment.