Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions frame/contracts/src/benchmarking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ benchmarks! {
// contract it cannot be used as an attack vector.
#[pov_mode = Measured]
seal_return {
let r in 0 .. 1;
let r in 0 .. API_BENCHMARK_BATCHES;
let code = WasmModule::<T>::from(ModuleDefinition {
memory: Some(ImportedMemory::max::<T>()),
imported_functions: vec![ImportedFunction {
Expand Down Expand Up @@ -1988,7 +1988,7 @@ benchmarks! {
// Only the overhead of calling the function itself with minimal arguments.
#[pov_mode = Measured]
seal_hash_sha2_256 {
let r in 0 .. 1;
let r in 0 .. API_BENCHMARK_BATCHES;
let instance = Contract::<T>::new(WasmModule::hasher(
"seal_hash_sha2_256", r * API_BENCHMARK_BATCH_SIZE, 0,
), vec![])?;
Expand All @@ -2008,7 +2008,7 @@ benchmarks! {
// Only the overhead of calling the function itself with minimal arguments.
#[pov_mode = Measured]
seal_hash_keccak_256 {
let r in 0 .. 1;
let r in 0 .. API_BENCHMARK_BATCHES;
let instance = Contract::<T>::new(WasmModule::hasher(
"seal_hash_keccak_256", r * API_BENCHMARK_BATCH_SIZE, 0,
), vec![])?;
Expand All @@ -2028,7 +2028,7 @@ benchmarks! {
// Only the overhead of calling the function itself with minimal arguments.
#[pov_mode = Measured]
seal_hash_blake2_256 {
let r in 0 .. 1;
let r in 0 .. API_BENCHMARK_BATCHES;
let instance = Contract::<T>::new(WasmModule::hasher(
"seal_hash_blake2_256", r * API_BENCHMARK_BATCH_SIZE, 0,
), vec![])?;
Expand All @@ -2048,7 +2048,7 @@ benchmarks! {
// Only the overhead of calling the function itself with minimal arguments.
#[pov_mode = Measured]
seal_hash_blake2_128 {
let r in 0 .. 1;
let r in 0 .. API_BENCHMARK_BATCHES;
let instance = Contract::<T>::new(WasmModule::hasher(
"seal_hash_blake2_128", r * API_BENCHMARK_BATCH_SIZE, 0,
), vec![])?;
Expand All @@ -2069,7 +2069,7 @@ benchmarks! {
// It generates different private keys and signatures for the message "Hello world".
#[pov_mode = Measured]
seal_ecdsa_recover {
let r in 0 .. 1;
let r in 0 .. API_BENCHMARK_BATCHES;

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 @@ -2118,7 +2118,7 @@ benchmarks! {
// generated different ECDSA keys.
#[pov_mode = Measured]
seal_ecdsa_to_eth_address {
let r in 0 .. 1;
let r in 0 .. API_BENCHMARK_BATCHES;
let key_type = sp_core::crypto::KeyTypeId(*b"code");
let pub_keys_bytes = (0..r * API_BENCHMARK_BATCH_SIZE)
.flat_map(|_| {
Expand Down Expand Up @@ -2700,7 +2700,7 @@ benchmarks! {
// depends on how much memory is already allocated.
#[pov_mode = Ignored]
instr_memory_grow {
let r in 0 .. 1;
let r in 0 .. INSTR_BENCHMARK_BATCHES;
let max_pages = ImportedMemory::max::<T>().max_pages;
let mut sbox = Sandbox::from(&WasmModule::<T>::from(ModuleDefinition {
memory: Some(ImportedMemory {
Expand Down