Coder Social home page Coder Social logo

chaincodechecker's Introduction

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"

chaincodechecker's People

Contributors

asararatnakar avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.