Code Monkey home page Code Monkey logo

tape's Introduction

Tape

A light-weight tool to test performance of Hyperledger Fabric

English/δΈ­ζ–‡

Build Status

Why Tape

Sometimes we need to test performance of a deployed Fabric network with ease. There are many excellent projects out there, i.e. Hyperledger Caliper. However, we sometimes just need a tiny, handy tool, like tape.

What is it

This includes a very simple traffic generator:

  • it does not use any SDK
  • it does not attempt to deploy Fabric
  • it does not rely on connection profile
  • it does not discover nodes, chaincodes, or policies
  • it does not monitor resource utilization

It is used to perform super simple performance test:

  • it directly establishes number of gRPC connections
  • it sends signed proposals to peers via number of gRPC clients
  • it assembles endorsed responses into envelopes
  • it sends envelopes to orderer
  • it observes transaction commitment

Our main focus is to make sure that tape will not be the bottleneck of performance test

Usage

Install

You could get tape in three ways:

  1. Download binary: get release tar from release page, and extract tape binary from it
  2. Build from source: clone this repo and run make tape at root dir. Go1.14 or higher is required. tape binary will be available at project root directory.
  3. Pull docker image: docker pull guoger/tape

Run

Binary

Execute ./tape -c config.yaml -n 40000 to generate 40000 transactions to Fabric.

Docker

docker run -v $PWD:/tmp guoger/tape tape -c $CONFIG_FILE -n 40000

Set this to integer times of batchsize, so that last block is not cut due to timeout. For example, if you have batch size of 500, set this to 500, 1000, 40000, 100000, etc.

Tips

  • We use logrus for logging, which can be set with env var export TAPE_LOGLEVEL=debug. Here are possbile values (warn by default) "panic", "fatal", "error", "warn", "warning", "info", "debug", "trace"

  • Put this generator closer to Fabric, or even on the same machine. This is to prevent network bandwidth from being the bottleneck.

  • Increase number of messages per block in your channel configuration may help

  • Workflow

LICENSE

Hyperledger Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file.

Credits

Icons made by Good Ware from www.flaticon.com

tape's People

Contributors

guoger avatar samyuan1990 avatar yiwenlong avatar stone-ch avatar wuxuer avatar qylixin avatar davidkhala avatar tianxuanhong avatar wangxinalex 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.