github.com/canhui/fabric_ca2_2@v2.0.0-alpha+incompatible/test/fabric-ca-load-tester/runLoad.sh (about) 1 #!/bin/bash 2 # 3 # Copyright IBM Corp. All Rights Reserved. 4 # 5 # SPDX-License-Identifier: Apache-2.0 6 # 7 # This script is used to run the load driver that drives load against a 8 # Fabric CA server or cluster of servers. The Fabric CA server URL and 9 # load characteristics can be defined in the testConfig.yml file, which 10 # must be located in the current working directory. 11 # 12 # When run with -B option, it will build the load driver and then runs it. 13 14 pushd $GOPATH/src/github.com/hyperledger/fabric-ca/test/fabric-ca-load-tester 15 if [ "$1" == "-B" ]; then 16 echo "Building fabric-ca-load-tester..." 17 if [ "$(uname)" == "Darwin" ]; then 18 # On MacOS Sierra use -ldflags -s flags to work around "Killed: 9" error 19 go build -o fabric-ca-load-tester -ldflags -s main.go testClient.go 20 else 21 go build -o fabric-ca-load-tester main.go testClient.go 22 fi 23 fi 24 echo "Running load" 25 ./fabric-ca-load-tester -config testConfig.yml 26 rm -rf msp 27 rm -rf fabric-ca-load-tester 28 popd