区块链性能测试工具使用教程

HyperBench为区块链提供了一套通用的性能测试方案,能够适配多种不同的区块链平台,基于脚本和虚拟机可以灵活快速地构建区块链性能测试用例,秉承高效、灵活、可扩展的设计理念,为区块链性能测试标准化、易用化助力,促进区块链技术发展,更好地为区块链业务赋能。

【技术特性】
灵活:提供基于Lua脚本和虚拟机提供的用户钩子的可编程用例扩展;
高效:虚拟机内置有统一接口的Go区块链客户端,直接对区块链系统进行测试,不需要额外的应用服务;
分布式:支持分布式测试功能,支持使用多台压力机同时测试区块链系统,简单易用;
添加小助手18458407117,加入技术交流群,技术大咖在线答疑~

快速开始
从源代码构建Hyperbench

# clone Hyperbench repository into the $GOPATH/src/github.com/hyperbench/hyperbench directory:
mkdir $GOPATH/src/github.com/hyperbench && cd $GOPATH/src/github.com/hyperbench
git clone [email protected]:hyperbench/hyperbench.git
cd hyperbench

# build main program
make build

# copy build hyperbench program to $GOPATH/bin
cp hyperbench $GOPATH/bin

从源代码构建插件

# clone Hyperbench-plugins into the $GOPATH/src/github.com/hyperbench/hyperbench-plugins directory:
cd $GOPATH/src/github.com/hyperbench
git clone [email protected]:hyperbench/hyperbench-plugins.git

# build hyperchain for example
cd hyperbench-plugins/hyperchain
make build
cp hyperchain.so ../../hyperbench/hyperchain.so

在Hyperchain上运行HyperBench
在开始压力测试之前,需要在准备超连接网络之前安装docker和docker-compose。

▲开启Hyperchain网络

# start hyperchain network
cd $GOPATH/src/github.com/hyperbench/hyperbench/benchmark/hyperchain
bash control.sh start

▲开启压力测试

# use benchmark/hyperchain/local as test case, star benchmark test
cd $GOPATH/src/github.com/hyperbench/hyperbench
hyperbench start benchmark/hyperchain/local

在Fabric上运行HyperBench
在开始压力测试之前,需要在准备fabric网络之前安装docker和docker-compose。

▲开启Fabric网络

# start fabric network
cd $GOPATH/src/github.com/hyperbench/hyperbench/benchmark/fabric/example/fabric
bash deamon.sh
# if it's the first time for you to pull the docker images, please be patient
# and if a timeout bug occurs, please try again

▲开启压力测试

# use benchmark/fabric/example as test case, star benchmark test
cd $GOPATH/src/github.com/hyperbench/hyperbench
hyperbench start benchmark/fabric/example

▲License
Hyperbench目前使用Apache 2.0许可证。

视频教程演示

接下来,就让我们以Hyperchain为例,手把手教你如何使用吧!

区块链性能测试工具hyperbench使用教程

Hyperbench github
https://github.com/hyperbench/hyperbench

Hyperbench quickstart
https://github.com/hyperbench/hyperbench/blob/master/README.md

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇

)">
下一篇>>