Skip to content

work to test peer performance using the ccchecker tool with docker-compose

Notifications You must be signed in to change notification settings

raidinesh/chaincodechecker

 
 

Repository files navigation

Endorser stress test using ccchecker tool with fabric docker-compose

ccchecker tool used in this sample to stress test the peer/endorser

Prerequisites and setup:

  • Docker - v1.12 or higher
  • Docker Compose - v1.8 or higher
  • Git client - needed for clone commands
  • Generate Docker images (using "make docker" in fabric repo)
  • Install Go (required for compiling ccchecker code)

Genearte Artifacts

  • Crypto material will be generated using the cryptogen tool (pre-built) from fabric and mounted to all peers, the orderering nodes. More details about using cryptogen tool here.
  • An Orderer genesis block (genesis.block) and channel configuration transaction (mychannel.tx also anchorpeer update transactions Org1MSPanchors.tx & Org2MSPanchors.tx) has been pre generated using the configtxgen tool and placed within the channel-artifacts folder. More details about using configtxgen tool here.

Clone the repo and Launch the network

git clone https://github.com/asararatnakar/chaincodechecker
cd chaincodechecker
./network_setup.sh restart mychannel 10

Once you have completed the above setup, you will be provisioned a local network with following configuration:

  • 3 Zookeepers
  • 3 Kafka broker
  • 3 Orderer services
  • 2 Peer Orgs (each Org contains a leader/anchor peer and a non-leader peer)
  • And a CLI Container

How to use the ccchecker tool

ccchecker is mounted to the CLI container(s) and executes the script.sh, which creates the default channel mychannel and joins the peers on to this channel

With the following default configurations (Refer ccchecker/ccchecker.json and ccchecker/env.json) Concurrency & NumberOfInvokes: 10 , ChainName : mychannel , Name : mycc

Outpiut would be some thing similar:

 --- Starting 'Chaincode Checker' tool --- 
    ...
	Time for invokes(ms): 1375
	Num successful invokes: 100(100)
	Num successful queries: 100(100)
Test complete

NOTE: Fabric commit level used at the time of uploading the changes c50e0dd1ca1ea96cb69503fc83a302c53eff96a6

execute cccheker on each cli container

docker exec -it peer0.org1.cli /bin/bash -c "./scripts/common.sh org1"

docker exec -it peer0.org2.cli /bin/bash -c "./scripts/common.sh org2"

docker exec -it peer1.org1.cli /bin/bash -c "./scripts/common.sh org1"

docker exec -it peer1.org2.cli /bin/bash -c "./scripts/common.sh org2"

About

work to test peer performance using the ccchecker tool with docker-compose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 66.7%
  • Shell 33.3%