51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 884|回复: 0
打印 上一主题 下一主题

[原创] 区块链性能测试工具的使用攻略

[复制链接]
  • TA的每日心情
    擦汗
    8 小时前
  • 签到天数: 956 天

    连续签到: 2 天

    [LV.10]测试总司令

    跳转到指定楼层
    1#
    发表于 2022-12-23 13:35:52 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    HyperBench为区块链提供了一套通用的性能测试方案,能够适配多种不同的区块链平台,基于脚本和虚拟机可以灵活快速地构建区块链性能测试用例,秉承高效、灵活、可扩展的设计理念,为区块链性能测试标准化、易用化助力,促进区块链技术发展,更好地为区块链业务赋能。
      【技术特性】
      灵活:提供基于Lua脚本和虚拟机提供的用户钩子的可编程用例扩展;
      高效:虚拟机内置有统一接口的Go区块链客户端,直接对区块链系统进行测试,不需要额外的应用服务;
      分布式:支持分布式测试功能,支持使用多台压力机同时测试区块链系统,简单易用。
      快速开始
      从源代码构建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 git@github.com: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 git@github.com: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许可证。

    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏
    回复

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-5-28 18:00 , Processed in 0.061352 second(s), 23 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表