From 7363351397070d957f4f0132336222cc004da1aa Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Tue, 26 Feb 2019 16:30:51 +1000 Subject: [PATCH 1/5] Add compileJmh target to Jenkinsfile so we detect compilation errors in benchmark code. --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4c6b957246..b32648bb8e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,7 +54,7 @@ try { docker.image(build_image).inside("--link ${d.id}:docker") { try { stage(stage_name + 'Prepare') { - sh './gradlew --no-daemon --parallel clean compileJava compileTestJava assemble' + sh './gradlew --no-daemon --parallel clean compileJava compileTestJava compileJmh assemble' } stage(stage_name + 'Unit tests') { sh './gradlew --no-daemon --parallel build' From a1426a59aca4a93a253142f52fd55e826a6db8ea Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Tue, 26 Feb 2019 16:32:27 +1000 Subject: [PATCH 2/5] Fix compile error. --- .../ethereum/vm/operations/OperationBenchmarkHelper.java | 1 - 1 file changed, 1 deletion(-) diff --git a/ethereum/core/src/jmh/java/tech/pegasys/pantheon/ethereum/vm/operations/OperationBenchmarkHelper.java b/ethereum/core/src/jmh/java/tech/pegasys/pantheon/ethereum/vm/operations/OperationBenchmarkHelper.java index 194a4f7869..b31f53640a 100644 --- a/ethereum/core/src/jmh/java/tech/pegasys/pantheon/ethereum/vm/operations/OperationBenchmarkHelper.java +++ b/ethereum/core/src/jmh/java/tech/pegasys/pantheon/ethereum/vm/operations/OperationBenchmarkHelper.java @@ -91,7 +91,6 @@ public MessageFrame.Builder createMessageFrameBuilder() { .messageFrameStack(messageFrame.getMessageFrameStack()) .blockchain(messageFrame.getBlockchain()) .worldState(messageFrame.getWorldState()) - .privateWorldStates(messageFrame.getPrivateWorldStates()) .initialGas(messageFrame.getRemainingGas()) .address(messageFrame.getContractAddress()) .originator(messageFrame.getOriginatorAddress()) From 20dce74acd576594756e7a50aabca77133fb1e5c Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Tue, 26 Feb 2019 16:52:38 +1000 Subject: [PATCH 3/5] Move compileJmh to its own stage. --- Jenkinsfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b32648bb8e..3584623b7f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,7 +54,7 @@ try { docker.image(build_image).inside("--link ${d.id}:docker") { try { stage(stage_name + 'Prepare') { - sh './gradlew --no-daemon --parallel clean compileJava compileTestJava compileJmh assemble' + sh './gradlew --no-daemon --parallel clean compileJava compileTestJava assemble' } stage(stage_name + 'Unit tests') { sh './gradlew --no-daemon --parallel build' @@ -113,6 +113,9 @@ try { stage(stage_name + 'Check javadoc') { sh './gradlew --no-daemon --parallel javadoc' } + stage(stage_name + 'Compile Benchmarks') { + sh './gradlew --no-daemon --parallel compileJmh' + } } finally { archiveArtifacts '**/build/reports/**' archiveArtifacts '**/build/test-results/**' From ce7b5b2783d256b160026ea265b5544884d8aeaa Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Wed, 27 Feb 2019 09:36:12 +1000 Subject: [PATCH 4/5] Fix compile. --- .../eth/sync/worldstate/WorldStateDownloaderBenchmark.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum/eth/src/jmh/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloaderBenchmark.java b/ethereum/eth/src/jmh/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloaderBenchmark.java index 764fb02ca3..de0c8c8d0c 100644 --- a/ethereum/eth/src/jmh/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloaderBenchmark.java +++ b/ethereum/eth/src/jmh/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloaderBenchmark.java @@ -70,7 +70,7 @@ public class WorldStateDownloaderBenchmark { @Setup(Level.Invocation) public void setUpUnchangedState() throws Exception { final SynchronizerConfiguration syncConfig = - new Builder().worldStateHashCountPerRequest(200).build(); + new SynchronizerConfiguration.Builder().worldStateHashCountPerRequest(200).build(); final Hash stateRoot = createExistingWorldState(); blockHeader = new BlockHeaderTestFixture().stateRoot(stateRoot).buildHeader(); From 1b5aa56df88ffd7bc01cef6f6c94cf2e0796aaf7 Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Wed, 27 Feb 2019 09:42:14 +1000 Subject: [PATCH 5/5] Spotless. --- .../eth/sync/worldstate/WorldStateDownloaderBenchmark.java | 1 - 1 file changed, 1 deletion(-) diff --git a/ethereum/eth/src/jmh/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloaderBenchmark.java b/ethereum/eth/src/jmh/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloaderBenchmark.java index de0c8c8d0c..4825a28ac9 100644 --- a/ethereum/eth/src/jmh/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloaderBenchmark.java +++ b/ethereum/eth/src/jmh/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloaderBenchmark.java @@ -24,7 +24,6 @@ import tech.pegasys.pantheon.ethereum.eth.manager.RespondingEthPeer; import tech.pegasys.pantheon.ethereum.eth.manager.RespondingEthPeer.Responder; import tech.pegasys.pantheon.ethereum.eth.sync.SynchronizerConfiguration; -import tech.pegasys.pantheon.ethereum.eth.sync.SynchronizerConfiguration.Builder; import tech.pegasys.pantheon.ethereum.storage.StorageProvider; import tech.pegasys.pantheon.ethereum.storage.keyvalue.KeyValueStorageWorldStateStorage; import tech.pegasys.pantheon.ethereum.storage.keyvalue.RocksDbStorageProvider;