contracts: Decrease the interation count on slow benchmarks (#12526)

* Decrease amount of benchmark iterations for long slow ones

* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts

Co-authored-by: command-bot <>
This commit is contained in:
Alexander Theißen
2022-10-20 00:34:03 +02:00
committed by GitHub
parent 52744e4ddb
commit 7aadc2aa3c
2 changed files with 772 additions and 765 deletions
@@ -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![])?;
@@ -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![])?;
@@ -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![])?;
@@ -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![])?;
@@ -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");
@@ -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(|_| {