From bcc627caf9d1a18902d8083a1d20695b5451f504 Mon Sep 17 00:00:00 2001 From: Iago Lluque Date: Fri, 4 Aug 2023 12:37:41 +0200 Subject: [PATCH 1/2] Reduced benchmark iterations --- rskj-core/src/jmh/java/co/rsk/jmh/web3/BenchmarkWeb3.java | 4 ++-- rskj-core/src/jmh/java/co/rsk/jmh/web3/BlocksAndTx.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rskj-core/src/jmh/java/co/rsk/jmh/web3/BenchmarkWeb3.java b/rskj-core/src/jmh/java/co/rsk/jmh/web3/BenchmarkWeb3.java index 00fcecd68ba..729c14c4ea5 100644 --- a/rskj-core/src/jmh/java/co/rsk/jmh/web3/BenchmarkWeb3.java +++ b/rskj-core/src/jmh/java/co/rsk/jmh/web3/BenchmarkWeb3.java @@ -34,8 +34,8 @@ // annotated fields at class, method or field level are providing default values that can be overriden via CLI or Runner parameters @BenchmarkMode({Mode.SingleShotTime}) @OutputTimeUnit(TimeUnit.MILLISECONDS) -@Warmup(iterations = 25) -@Measurement(iterations = 1000) +@Warmup(iterations = 5) +@Measurement(iterations = 100) @Timeout(time = 10) public class BenchmarkWeb3 { diff --git a/rskj-core/src/jmh/java/co/rsk/jmh/web3/BlocksAndTx.java b/rskj-core/src/jmh/java/co/rsk/jmh/web3/BlocksAndTx.java index f0349193380..3ec7f017d31 100644 --- a/rskj-core/src/jmh/java/co/rsk/jmh/web3/BlocksAndTx.java +++ b/rskj-core/src/jmh/java/co/rsk/jmh/web3/BlocksAndTx.java @@ -27,7 +27,7 @@ import java.util.concurrent.TimeUnit; @BenchmarkMode({Mode.SingleShotTime}) -@Warmup(iterations = 25) +@Warmup(iterations = 5) @Measurement(iterations = 100) @OutputTimeUnit(TimeUnit.MILLISECONDS) @Timeout(time = 10) From b2521df976fd85f87fde3a82676da14d8383b370 Mon Sep 17 00:00:00 2001 From: Iago Lluque Date: Fri, 4 Aug 2023 12:58:49 +0200 Subject: [PATCH 2/2] Added reasonable fromBlock and toBlock for RPC trace methods benchmarking --- rskj-core/src/jmh/resources/conf/testnet-3_860_000.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rskj-core/src/jmh/resources/conf/testnet-3_860_000.conf b/rskj-core/src/jmh/resources/conf/testnet-3_860_000.conf index 81af679d1cd..444e0c1ec0a 100644 --- a/rskj-core/src/jmh/resources/conf/testnet-3_860_000.conf +++ b/rskj-core/src/jmh/resources/conf/testnet-3_860_000.conf @@ -61,8 +61,8 @@ ethGetCode.blockNumber = 3700000 ############################ trace.transactionHash=0xb1c9b18b3c1798488438db058081a4ac894a42e34985b2ffe4fe6d1d0242cb02 trace.blockHash=0xc3d9c14f6cac44ecf11e7b097999ca1fd0f27c6ea113fb3eb6af541b2ea12c42 -trace.fromBlock=earliest -trace.toBlock=latest +trace.fromBlock=0x3563F8 +trace.toBlock=0x3567E0 trace.toAddresses=0x0000000000000000000000000000000001000008 trace.fromAddresses=0x0000000000000000000000000000000000000000