Giter VIP home page Giter VIP logo

chain-caliper's Introduction

Process Flow in Hyperledger Caliper

benchmark/simple/main.js {
// caliper process begins from main.js

bench-flow.run(benchmarkConfig, networkConfig){
    // entire process flow is maintained from here

    await execAsync(networkObject.caliper.command.start){
        // start the docker containers
    }

    blockchain = new Blockchain(absNetworkFile);
    // create a corresponding blockchain object from its adapter using the given config

    await blockchain.init(){
        // uses the blockchain object to init the blockchain{
            // create the  channel
            // add the genesis block to the channel
            // join the peers to the channel
        }
    }
    await blockchain.installSmartContract(){
        // uses the blockchain object to init the chaincode{
            // install the chaincode
            // create the chaincode containers
            // instantiate the chaincode into all peers
        }
    }

    numberOfClients = await new client.init(){
        //  get the number of clinets from the benchmark config file for performing tests
    }
    clientArgs = await blockchain.prepareClients(numberOfClients){
        // prepare the clients according to the blockchain requirements
        // BUT method not defined in the Fabric class
    }

    await monitor.start(){
        // starts a mechanism to monitor the resources mentioned in the benchmark config file
    }

    let allTests = configObject.test.rounds;
    for (let test of allTests) {
        ++testIdx;

        await defaultTest(test, clientArgs, (testIdx === testNum)){
            // testing begins here

            // Generate the message containig parameters like arguments, test, callback function etc

            // demo.startWatch(client) {
                // informs the monitor to watch the client
            }

            --- // working on                       
        }
    }

    await monitor.stop(){
        // stop the monitoring process
    }
    await report.generate(output){
        // generate benchmark report in html
    }
    await execAsync(networkObject.caliper.command.end){
        // stop the docker containers
    }
}

}

chain-caliper's People

Contributors

ifteheralom avatar

Watchers

 avatar

Forkers

josekurian

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.