Hyperledger-TWGC / Tape

Licence: apache-2.0
A Simple Traffic Generator for Hyperledger Fabric

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Tape

Probe
Probe is a web GUI application with for Hyperledger Fabric maintainer, user, research to find the best block config logic for specific chain-code.
Stars: ✭ 29 (-77.86%)
Mutual labels:  fabric, hyperledger-fabric
hyperledger-fabric-sdk-php
Client SDK for Hyperledger Fabric for use in PHP applications
Stars: ✭ 40 (-69.47%)
Mutual labels:  fabric, hyperledger-fabric
fabric-smart-client
The Fabric Smart Client is a new Fabric Client that lets you focus on the business processes and simplifies the development of Fabric-based distributed application.
Stars: ✭ 40 (-69.47%)
Mutual labels:  fabric, hyperledger-fabric
Laravel Zero
A PHP framework for console artisans
Stars: ✭ 2,821 (+2053.44%)
Mutual labels:  tool, performance
Junitperf
⛵️Junit performance rely on junit5 and jdk8+.(java 性能测试框架)
Stars: ✭ 86 (-34.35%)
Mutual labels:  performance, test
Fabric Starter
Starter Application and Deployment Scripts for Hyperledger Fabric
Stars: ✭ 202 (+54.2%)
Mutual labels:  fabric, hyperledger-fabric
hlf-operator
Hyperledger Fabric Kubernetes operator - Hyperledger Fabric operator for Kubernetes (v2.2+)
Stars: ✭ 112 (-14.5%)
Mutual labels:  fabric, hyperledger-fabric
Hiper
🚀 A statistical analysis tool for performance testing
Stars: ✭ 2,667 (+1935.88%)
Mutual labels:  tool, performance
Webdriverio
Next-gen browser and mobile automation test framework for Node.js
Stars: ✭ 7,214 (+5406.87%)
Mutual labels:  performance, test
Why Did You Render
why-did-you-render by Welldone Software monkey patches React to notify you about potentially avoidable re-renders. (Works with React Native as well.)
Stars: ✭ 7,695 (+5774.05%)
Mutual labels:  tool, performance
bdk
Streamlined blockchain deployment kit for Hyperledger Fabric.
Stars: ✭ 43 (-67.18%)
Mutual labels:  fabric, hyperledger-fabric
Hyperledger Typescript Boilerplate
This is a boilerplate that interacts between Hyperledger Fabric Peers and a front end.
Stars: ✭ 109 (-16.79%)
Mutual labels:  fabric, hyperledger-fabric
Fabric Net Server
HyperLedger/Fabric Net Server
Stars: ✭ 412 (+214.5%)
Mutual labels:  fabric, hyperledger-fabric
React Pinpoint
An open source utility library for measuring React component render times.
Stars: ✭ 93 (-29.01%)
Mutual labels:  performance, test
Snapshooter
Snapshooter is a snapshot testing tool for .NET Core and .NET Framework
Stars: ✭ 118 (-9.92%)
Mutual labels:  tool, test
Css In Js
A thorough analysis of all the current CSS-in-JS solutions with SSR & TypeScript support for Next.js
Stars: ✭ 127 (-3.05%)
Mutual labels:  performance
Phplrt
PHP Language Recognition Tool
Stars: ✭ 127 (-3.05%)
Mutual labels:  tool
Fmt
A modern formatting library
Stars: ✭ 12,698 (+9593.13%)
Mutual labels:  performance
Kit
Unity3D开发的工具包集合, 集成常见的开发组件以免于重复造轮子。佛系更新中。。。
Stars: ✭ 123 (-6.11%)
Mutual labels:  tool
Python Pytest Cases
Separate test code from test cases in pytest.
Stars: ✭ 127 (-3.05%)
Mutual labels:  test

A simple traffic generator for 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 is 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

Configure

Modify config.yaml according to your network. This is a sample:

endorsers:
  - addr: localhost:7051
    tls_ca_cert: /path/to/peer1/tls/ca/cert
  - addr: localhost:7051
    tls_ca_cert: /path/to/peer2/tls/ca/cert
committers:
  - addr: localhost:7051
    tls_ca_cert: /path/to/peer2/tls/ca/cert
orderer:
  addr: localhost:7050
  tls_ca_cert: /path/to/orderer/tls/ca/cert
channel: mychannel
chaincode: basic
commitThreshold: 1
args:
  - GetAllAssets
mspid: Org1MSP
private_key: ./organizations/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore/priv_sk
sign_cert: ./organizations/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts/[email protected]
num_of_conn: 10
client_per_conn: 10
Click to expand details for configuration

endorsers: include the addr and tls ca cert of peers. Peer address is in IP:Port format. You may need to add peer name, i.e. peer0.org1.example.com,peer0.org2.example.com to your /etc/hosts

committers: observe tx commitment from these peers. If you want to observe over 50% of peers on your network, you should selected and put them here.

commitThreshold: how many committers received the block see as successed.

orderer: include the addr and tls ca cert of orderer. Orderer address is in IP:Port format. It does not support sending traffic to multiple orderers, yet. You may need to add orderer name, i.e. orderer.example.com to your /etc/hosts

This tool sends traffic as a Fabric user, and requires following configs

mspid: MSP ID that the user is associated to

private_key: path to the private key. If you are using BYFN as your base, this can be:

crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore/priv_sk

sign_cert: path to the user certificate. If you are using BYFN as your base, this can be:

crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts/[email protected]

channel: channel name

chaincode: chaincode to invoke. There is an example chaincode in chaincodes/sample.go, which simply puts key:value. This is closely related to args parameter.

version: the version of chaincode. This is left to empty by default.

args: arguments to send with invocation, depending on your chaincode implementation. The chaincode used by this sample can be found in chaincodes/sample.go

num_of_conn: number of gRPC connection established between client/peer, client/orderer. If you think client has not put enough pressure on Fabric, increase this.

client_per_conn: number of clients per connection used to send proposals to peer. If you think client has not put enough pressure on Fabric, increase this.

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

Help us improve

If you wish for new features or encounter any bug, please feel free to open issue, and we always welcome pull request.

If you are reporting an issue, please generously turn on debug log with export TAPE_LOGLEVEL=debug and paste log in the issue

Development

Click to expand

Tape workflow

Tape consists of several workers that run in goroutines, so that the pipeline is highly concurrent and scalable. Workers are connected via buffered channels, so they can pass products around.

tape workflow

Maintainers

Name mail github-ID
Jay Gou [email protected] guoger
Sam Yuan [email protected] SamYuan1990
Stone Cheng [email protected] stone-ch
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].