Skip to content

Commit

Permalink
Fix Dockerfiles, run benchmarks in individual images, consolidate res…
Browse files Browse the repository at this point in the history
…ults
  • Loading branch information
hugo-dc committed Nov 19, 2019
1 parent 325164b commit 5a84a71
Show file tree
Hide file tree
Showing 28 changed files with 2,435 additions and 200 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,18 @@ $ cd ../evmone && docker build . -t evmone-bench
$ cd ../cita-vm && docker build . -t cita-vm-bench
```

Run geth benchmarks
Run benchmarks:

```
$ cd evm/
$ docker run -v $(pwd)/scripts:/scripts -v $(pwd)/evmraceresults:/evmraceresults -it geth-bench
$ cd /scripts && PYTHONIOENCODING=UTF-8 python3 benchgethprecompiles.py
$ ./scripts/run_bench.py
```

The previous command will create a new directory `evmraceresults`, containing the following files:

- evm_benchmarks.csv - consolidated benchmarks
- evm_benchmarks_evmone.csv - evmone benchmarks
- evm_benchmarks_parity.csv - parity benchmarks
- evm_benchmarks_geth.csv - geth benchmarks
- evm_benchmarks_cita-vm.csv - cita vm benchmarks

6 changes: 3 additions & 3 deletions evm/evmone/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ RUN apt-get update \
graphviz git openssh-client \
&& rm -rf /var/lib/apt/lists/*

# install python modules needed for benchmarking script
RUN pip3 install durationpy jinja2 pandas

# install evmone
WORKDIR /root
RUN git clone --recursive --single-branch --branch bench-evm-codes https://github.com/cdetrio/evmone
RUN cd evmone && mkdir build
RUN cd evmone/build && cmake .. -DEVMONE_TESTING=ON
RUN cd evmone/build && cmake --build . -- -j

# install python modules needed for benchmarking script
RUN pip3 install durationpy jinja2 pandas

WORKDIR /
CMD /bin/bash

19 changes: 12 additions & 7 deletions evm/geth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ FROM ubuntu:18.04
# https://github.com/kuralabs/docker-python3-dev/blob/master/Dockerfile

# System deps
RUN apt-get update
RUN apt-get install -y software-properties-common git sudo build-essential wget curl nano \
RUN apt-get update \
&& apt-get install -y software-properties-common git sudo build-essential wget curl nano \
autoconf automake cmake libtool make unzip zlib1g-dev texinfo \
gcc musl-dev

# RUN apt-get install -y libudev-dev

# Install Python stack
RUN apt-get update \
&& apt-get --yes --no-install-recommends install \
Expand All @@ -18,20 +20,23 @@ RUN apt-get update \
graphviz git openssh-client \
&& rm -rf /var/lib/apt/lists/*

# install python modules needed for benchmarking script
RUN pip3 install durationpy jinja2 pandas

# Install Go 1.11
RUN add-apt-repository ppa:longsleep/golang-backports && apt-get update && apt-get install -y golang-go

# install geth
RUN go get -u -v github.com/ethereum/go-ethereum
# RUN cd /root/go/src/github.com/ethereum/go-ethereum && git checkout v1.8.23
RUN cd /root/go/src/github.com/ethereum/go-ethereum && git remote add cdetrio https://github.com/cdetrio/go-ethereum.git
RUN cd /root/go/src/github.com/ethereum/go-ethereum && git fetch cdetrio
RUN cd /root/go/src/github.com/ethereum/go-ethereum && git remote add hugo https://github.com/hugo-dc/go-ethereum.git
RUN cd /root/go/src/github.com/ethereum/go-ethereum && git fetch hugo
RUN cd /root/go/src/github.com/ethereum/go-ethereum && git checkout evm-code-bencher
RUN ln -s /root/go/src/github.com/ethereum/go-ethereum /go-ethereum

# install python modules needed for benchmarking script
RUN pip3 install durationpy jinja2 pandas

WORKDIR /
RUN mkdir -p /evmraceresults
RUN mkdir /evmrace

CMD /bin/bash

1 change: 1 addition & 0 deletions evm/input_data/evmcode/blake2b.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
608060405260043610610045577c010000000000000000000000000000000000000000000000000000000060003504631e092423811461004a578063d299dac0146102d7575b600080fd5b34801561005657600080fd5b5061029e600480360360a081101561006d57600080fd5b81019060208101813564010000000081111561008857600080fd5b82018360208201111561009a57600080fd5b803590602001918460018302840111640100000000831117156100bc57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561010f57600080fd5b82018360208201111561012157600080fd5b8035906020019184600183028401116401000000008311171561014357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561019657600080fd5b8201836020820111156101a857600080fd5b803590602001918460018302840111640100000000831117156101ca57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561021d57600080fd5b82018360208201111561022f57600080fd5b8035906020019184600183028401116401000000008311171561025157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903567ffffffffffffffff16915061041d9050565b604051808261010080838360005b838110156102c45781810151838201526020016102ac565b5050505090500191505060405180910390f35b3480156102e357600080fd5b5061029e600480360360608110156102fa57600080fd5b81019060208101813564010000000081111561031557600080fd5b82018360208201111561032757600080fd5b8035906020019184600183028401116401000000008311171561034957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561039c57600080fd5b8201836020820111156103ae57600080fd5b803590602001918460018302840111640100000000831117156103d057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903567ffffffffffffffff1691506104719050565b61042561161c565b61042d61163c565b61043561161c565b6104528285896104448a6104ae565b61044d8a6104ae565b61055f565b61045c8289610710565b61046682826107ed565b979650505050505050565b61047961161c565b6104a68484602060405190810160405280600081525060206040519081016040528060008152508661041d565b949350505050565b6104b6611679565b60005b8251811015610522576008818401810151906104e1908290840660010160080260400361091e565b8360088404600281106104f057fe5b60200201511883600884046002811061050557fe5b67ffffffffffffffff9092166020929092020152506001016104b9565b506105348160005b6020020151610932565b67ffffffffffffffff16815261054b81600161052a565b67ffffffffffffffff166020820152919050565b67ffffffffffffffff84161580610580575060408467ffffffffffffffff16115b8061058c575060408351115b1561059657600080fd5b61059e61161c565b506040805161010081018252676a09e667f3bcc908815267bb67ae8584caa73b6020820152673c6ef372fe94f82b9181019190915267a54ff53a5f1d36f1606082015267510e527fade682d16080820152679b05688c2b3e6c1f60a0820152671f83d9abfb41bd6b60c0820152675be0cd19137e217960e082015260005b60088110156106645781816008811061063157fe5b602002015187602001518260088110151561064857fe5b67ffffffffffffffff909216602092909202015260010161061c565b50846106728551600861091e565b60208881018051805167ffffffffffffffff94189490941863010100001883169093528551835160809081018051909218841690915286820151845160a0018051909118841690528551845160c00180519091188416905290850151925160e001805190931882169092528681169188019190915284519060009082161115610707576106ff8786610710565b608060608801525b50505050505050565b60005b81518110156107e857826060015167ffffffffffffffff166080141561077457606083015160408401805167ffffffffffffffff9092169091016fffffffffffffffffffffffffffffffff16905261076c8360006109b4565b600060608401525b60608301805167ffffffffffffffff60018201811690925216610795611694565b50835183516000908590859081106107a957fe5b01602001517f01000000000000000000000000000000000000000000000000000000000000009081900481020490508082840153505050600101610713565b505050565b60608201805160408401805167ffffffffffffffff8084169182016fffffffffffffffffffffffffffffffff169092526001909201169091526000610830611694565b508351825b608081101561084b578281830153600101610835565b506108578560016109b4565b60005b6080860151600890048110156108a657602086015161087e90826008811061052a57fe5b85826008811061088a57fe5b67ffffffffffffffff909216602092909202015260010161085a565b50604085608001511015610917576108ed6108da8660200151600888608001518115156108cf57fe5b046008811061052a57fe5b6080870151600716600802604003611450565b60808601518590600890046008811061090257fe5b67ffffffffffffffff90921660209290920201525b5050505050565b60020a67ffffffffffffffff918216021690565b600067010000000000000060ff8316026501000000000061ff00841602630100000062ff000085160261010063ff000000861681029064ff00000000871604630100000065ff00000000008816046501000000000066ff00000000000089160467010000000000000067ff000000000000008a16041818181818181892915050565b6109bc6116b3565b6109c46116b3565b6109cc61161c565b506040805161010081018252676a09e667f3bcc908815267bb67ae8584caa73b6020820152673c6ef372fe94f82b9181019190915267a54ff53a5f1d36f1606082015267510e527fade682d16080820152679b05688c2b3e6c1f60a0820152671f83d9abfb41bd6b60c0820152675be0cd19137e217960e082015260005b6008811015610ac45760208601518160088110610a6357fe5b6020020151848260108110610a7457fe5b67ffffffffffffffff9092166020929092020152818160088110610a9457fe5b6020020151846008830160108110610aa857fe5b67ffffffffffffffff9092166020929092020152600101610a4a565b506040850180516101808501805167ffffffffffffffff928316188216905290516101a085018051680100000000000000006fffffffffffffffffffffffffffffffff9093169290920490911890911690528315610b31576101c0830180511967ffffffffffffffff1690525b600080805b60108160ff161015610bbe576000925060038116801515610b71578851600460ff84160460ff16600481101515610b6957fe5b602002015192505b67ffffffffffffffff8160030360400260020a8404169350610b9284610932565b8660ff841660108110610ba157fe5b67ffffffffffffffff909216602092909202015250600101610b36565b50610be185600060046008600c89845b60200201518a60015b6020020151611472565b610bfe85600160056009600d8960025b60200201518a6003610bd7565b610c1b8560026006600a600e8960045b60200201518a6005610bd7565b610c388560036007600b600f8960065b60200201518a6007610bd7565b610c558560006005600a600f8960085b60200201518a6009610bd7565b610c728560016006600b600c89600a5b60200201518a600b610bd7565b610c8f85600260076008600d89600c5b60200201518a600d610bd7565b610cab85600360046009600e89815b60200201518a600f610bd7565b610cc885600060046008600c89600e5b60200201518a600a610bd7565b610ce585600160056009600d8960045b60200201518a6008610bd7565b610cf98560026006600a600e896009610c9e565b610d168560036007600b600f89600d5b60200201518a6006610bd7565b610d338560006005600a600f8960015b60200201518a600c610bd7565b610d508560016006600b600c8960005b60200201518a6002610bd7565b610d6485600260076008600d89600b610c2b565b610d7885600360046009600e896005610bf1565b610d8c85600060046008600c89600b610cd8565b610da985600160056009600d89600c5b60200201518a6000610bd7565b610dbd8560026006600a600e896005610d43565b610dd08560036007600b600f8981610c82565b610dec8560006005600a600f89825b60200201518a600e610bd7565b610e008560016006600b600c896003610d09565b610e1385600260076008600d8983610bce565b610e2f85600360046009600e89825b60200201518a6004610bd7565b610e4385600060046008600c896007610c48565b610e5785600160056009600d896003610bce565b610e6b8560026006600a600e89600d610d26565b610e7e8560036007600b600f8982610ddf565b610e928560006005600a600f896002610d09565b610ea68560016006600b600c896005610cbb565b610eba85600260076008600d896004610d9c565b610ece85600360046009600e89600f610cd8565b610ee285600060046008600c896009610d9c565b610ef585600160056009600d8983610c2b565b610f088560026006600a600e8984610e22565b610f1c8560036007600b600f89600a610c9e565b610f308560006005600a600f89600e610bce565b610f438560016006600b600c8982610d26565b610f5785600260076008600d896006610cd8565b610f6a85600360046009600e8984610c82565b610f7e85600060046008600c896002610d26565b610f9285600160056009600d896006610cbb565b610fa68560026006600a600e896000610c65565b610fba8560036007600b600f896008610bf1565b610fce8560006005600a600f896004610c82565b610fe28560016006600b600c896007610c0e565b610ff685600260076008600d89600f610ddf565b61100a85600360046009600e896001610c48565b61101d85600060046008600c8981610c0e565b61103085600160056009600d8984610c9e565b6110438560026006600a600e8981610c82565b6110578560036007600b600f896004610cbb565b61106a8560006005600a600f8984610c2b565b61107d8560016006600b600c8983610bf1565b61109185600260076008600d896009610d43565b6110a585600360046009600e896008610c65565b6110b985600060046008600c89600d610c65565b6110cd85600160056009600d896007610ddf565b6110e18560026006600a600e89600c610bce565b6110f48560036007600b600f8984610c48565b6111078560006005600a600f8983610d9c565b61111b8560016006600b600c89600f610e22565b61112e85600260076008600d8982610d09565b61114285600360046009600e896002610cbb565b61115685600060046008600c896006610c9e565b61116a85600160056009600d89600e610c48565b61117e8560026006600a600e89600b610bf1565b6111928560036007600b600f896000610cd8565b6111a68560006005600a600f89600c610d43565b6111ba8560016006600b600c89600d610c2b565b6111ce85600260076008600d896001610e22565b6111e285600360046009600e89600a610c0e565b6111f685600060046008600c89600a610d43565b61120a85600160056009600d896008610e22565b61121e8560026006600a600e896007610d09565b6112328560036007600b600f896001610c0e565b6112458560006005600a600f8981610c65565b6112598560016006600b600c896009610ddf565b61126d85600260076008600d896003610d26565b61128185600360046009600e89600d610d9c565b61129485600060046008600c8984610bce565b6112a885600160056009600d896002610bf1565b6112bc8560026006600a600e896004610c0e565b6112d08560036007600b600f896006610c2b565b6112e48560006005600a600f896008610c48565b6112f88560016006600b600c89600a610c65565b61130c85600260076008600d89600c610c82565b61131f85600360046009600e8981610c9e565b61133385600060046008600c89600e610cbb565b61134785600160056009600d896004610cd8565b61135b8560026006600a600e896009610c9e565b61136f8560036007600b600f89600d610d09565b6113838560006005600a600f896001610d26565b6113978560016006600b600c896000610d43565b6113ab85600260076008600d89600b610c2b565b6113bf85600360046009600e896005610bf1565b60005b60088160ff161015611446578560ff6008830116601081106113e057fe5b60200201518660ff8316601081106113f457fe5b602002015189602001518360ff1660088110151561140e57fe5b6020020151181888602001518260ff1660088110151561142a57fe5b67ffffffffffffffff90921660209290920201526001016113c2565b5050505050505050565b60008160020a8367ffffffffffffffff1681151561146a57fe5b049392505050565b600087876010811061148057fe5b60200201519050600088876010811061149557fe5b6020020151905060008987601081106114aa57fe5b6020020151905060008a87601081106114bf57fe5b60200201519050680100000000000000008684860108935068010000000000000000640100000000858318096401000000008583180418905068010000000000000000818308915068010000000000000000650100000000008385180963010000008385180418925068010000000000000000858486010893506801000000000000000066010000000000008583180962010000858318041890506801000000000000000081830891506801000000000000000060028385180967800000000000000083851804189250838b8b60108110151561159857fe5b67ffffffffffffffff9092166020929092020152828b8a601081106115b957fe5b67ffffffffffffffff9092166020929092020152818b89601081106115da57fe5b67ffffffffffffffff9092166020929092020152808b88601081106115fb57fe5b67ffffffffffffffff90921660209290920201525050505050505050505050565b610100604051908101604052806008906020820280388339509192915050565b6101e060405190810160405280611651611694565b815260200161165e61161c565b81526000602082018190526040820181905260609091015290565b60408051808201825290600290829080388339509192915050565b6080604051908101604052806004906020820280388339509192915050565b61020060405190810160405280601090602082028038833950919291505056fea165627a7a723058205ce3dcf8a38e14500505928704e477df0d8442659a541a92ee38ff9a90d701910029
Loading

0 comments on commit 5a84a71

Please sign in to comment.