Created
August 13, 2020 16:38
-
-
Save danielporto/fa751761afafe9329b668667d16c7466 to your computer and use it in GitHub Desktop.
Running caliper benchmark
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#preparations: | |
#install asdf (https://asdf-vm.com/) | |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.7.8 | |
#enable asdf: | |
echo ". $HOME/.asdf/asdf.sh" >> ~/.profile | |
#install nodejs plugin for asdf: | |
asdf plugin list all | |
asdf plugin add nodejs | |
#import the nodejs release team open pgp keys: | |
bash -c '${ASDF_DATA_DIR:=$HOME/.asdf}/plugins/nodejs/bin/import-release-team-keyring' | |
#install the nodejs version to match the same version of node used in fabric | |
asdf install nodejs 8.9.4 | |
# start by configuring the benchmark using the examples from aother repository | |
git clone https://github.com/hyperledger/caliper-benchmarks.git | |
cd caliper-benchmarks | |
# ASSUMING PREPARATIONS ARE DONE and next commands are run from the checkout folder: | |
# user@ubuntu:~/caliper-benchmarks$ | |
git checkout v0.3.2 | |
#if you did not set the nodejs asdf plugin, do it now: | |
asdf local nodejs 8.9.4 | |
npm init -y | |
npm install --only=prod @hyperledger/[email protected] | |
# at this point, the command npx should be available. | |
#Before running the benchmark prepare the crypto configuration as in https://github.com/hyperledger/caliper-benchmarks | |
cd networks/fabric/config_solo | |
./generate.sh | |
# BUGFIX - download the corresponding CCENV and re-tag | |
docker pull hyperledger/fabric-ccenv:1.4.1 | |
docker image tag d7433c4b2a1c hyperledger/fabric-ccenv:latest | |
# next, go back to the caliper-benchmarks (ex user@ubuntu:~/caliper-benchmarks) dir and run | |
npx caliper bind --caliper-bind-sut fabric:1.4.1 | |
# finally from caliper-benchmarks (ex user@ubuntu:~/caliper-benchmarks) dir, run caliper | |
npx caliper launch master \ | |
--caliper-workspace . \ | |
--caliper-benchconfig benchmarks/scenario/simple/config.yaml \ | |
--caliper-networkconfig networks/fabric/v1/v1.4.1/2org1peergoleveldb/fabric-go.yaml | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment