EVM benchmark utilities (#8944)
* Make it possible to expose jsontests using feature flag * Add start_stop_hook for jsontests * Fix evmbin compile * Implement vm jsontests times to tsv result * Use /usr/bin/env to avoid errors on non-Debian systems * Move evmbin/bench.sh to scripts and add vm_jsontests script for convenience * Add tempdir as required deps for test-helpers * Address grumbles on comments * Detect file/folder automatically and add command docs * Fix bench script * times -> timings * typo: wrong if condition
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# Installing KCOV under ubuntu
|
||||
# https://users.rust-lang.org/t/tutorial-how-to-collect-test-coverages-for-rust-project/650#
|
||||
### Install deps
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
# generate documentation only for partiy and ethcore libraries
|
||||
|
||||
cargo doc --no-deps --verbose --all --exclude parity-ipfs-api &&
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
cd docker/hub
|
||||
DOCKER_BUILD_TAG=$1
|
||||
echo "Docker build tag: " $DOCKER_BUILD_TAG
|
||||
|
||||
16
scripts/evm_jsontests_bench.sh
Executable file
16
scripts/evm_jsontests_bench.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cargo build --release -p evmbin
|
||||
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmArithmeticTest
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmBitwiseLogicOperation
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmBlockInfoTest
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmEnvironmentalInfo
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmIOandFlowOperations
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmLogTest
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmPerformance
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmPushDupSwapTest
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmRandomTest
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmSha3Test
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmSystemOperations
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmTests
|
||||
25
scripts/evm_uint_bench.sh
Executable file
25
scripts/evm_uint_bench.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cargo build --release -p evmbin
|
||||
|
||||
# LOOP TEST
|
||||
CODE1=606060405260005b620f42408112156019575b6001016007565b600081905550600680602b6000396000f3606060405200
|
||||
if [ -x "$(command -v ethvm)" ]; then
|
||||
ethvm --code $CODE1
|
||||
echo "^^^^ ethvm"
|
||||
fi
|
||||
./target/release/parity-evm stats --code $CODE1 --gas 4402000
|
||||
echo "^^^^ usize"
|
||||
./target/release/parity-evm stats --code $CODE1
|
||||
echo "^^^^ U256"
|
||||
|
||||
# RNG TEST
|
||||
CODE2=6060604052600360056007600b60005b620f4240811215607f5767ffe7649d5eca84179490940267f47ed85c4b9a6379019367f8e5dd9a5c994bba9390930267f91d87e4b8b74e55019267ff97f6f3b29cda529290920267f393ada8dd75c938019167fe8d437c45bb3735830267f47d9a7b5428ffec019150600101600f565b838518831882186000555050505050600680609a6000396000f3606060405200
|
||||
if [ -x "$(command -v ethvm)" ]; then
|
||||
ethvm --code $CODE2
|
||||
echo "^^^^ ethvm"
|
||||
fi
|
||||
./target/release/parity-evm stats --code $CODE2 --gas 143020115
|
||||
echo "^^^^ usize"
|
||||
./target/release/parity-evm stats --code $CODE2
|
||||
echo "^^^^ U256"
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#ARGUMENT test for RUST and COVERAGE
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
FILE=./.git/hooks/pre-push
|
||||
|
||||
echo "#!/bin/sh\n" > $FILE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
@@ -17,4 +17,3 @@ else
|
||||
echo 'Unable to push info to updater service.';
|
||||
exit 2
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
ERR=0
|
||||
cargo build --release -p chainspec
|
||||
@@ -12,4 +12,3 @@ for spec in ethcore/res/ethereum/*.json; do
|
||||
done
|
||||
|
||||
exit $ERR
|
||||
|
||||
|
||||
Reference in New Issue
Block a user