适用于Composer网络的Hyperledger Caliper教程 [英] Hyperledger Caliper tutorial for Composer network

查看:91
本文介绍了适用于Composer网络的Hyperledger Caliper教程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Hyperledger Caliper在已部署的Hyperledger Composer业务网络上执行性能评估测试.

I want to execute a performance evaluation test on a deployed Hyperledger Composer business network using Hyperledger Caliper.

在官方文档中有一个 Composer配置的部分,但是我认为对于初次接触该框架的用户来说,它不是非常友好,并且我找不到更好的基本分步教程来配置和运行评估测试.

Into the official documentation there is a section for the Composer configuration but I think that it's not very user friendly for those approaching this framework for the first time and I cannot find a better basic step-by-step tutorial for configuring and running an evaluation test.

推荐答案

检查是否已安装所有必备软件:

    不支持
  • NodeJS 8(LTS),9或10(LTS)更高版本,因为 依赖链不允许这样做

    Check that all the prerequisites are installed:

    • NodeJS 8 (LTS), 9, or 10 (LTS) higher versions are not supported as the dependancy chain does not permit this

      node-gyp

      • 在Caliper根文件夹中运行npm install以在本地安装基本依赖项
      • 在Caliper根文件夹中运行npm run repoclean,以确保所有软件包都是干净的
      • 运行npm run bootstrap以在Caliper存储库中引导软件包.这将安装所有程序包相关性并链接任何交叉相关性.需要一些时间才能完成安装.如果被ctrl + c打断,请先恢复文件package.json,然后再次运行npm run bootstrap.
      • Run npm install in Caliper root folder to install base dependencies locally
      • Run npm run repoclean in Caliper root folder to ensure that all the packages are clean
      • Run npm run bootstrap to bootstrap the packages in the Caliper repository. This will install all package dependancies and link any cross dependancies. It will take some time to finish installation. If it is interrupted by ctrl+c, please recover the file package.json first and then run npm run bootstrap again.

      请勿使用sudo运行上述任何命令,因为这会导致引导过程失败

      Do not run any of the above commands with sudo, as it will cause the bootstrap process to fail

      packages/caliper-tests-integration目录执行以下命令:

      npm run e2e_install
      

      运行样本基准测试

      来自caliper/packages/caliper-samples/运行

      caliper benchmark run -c benchmark/composer/config.yaml -n network/fabric-v1.3/2org1peercouchdb/composer.json -w ../caliper-samples/
      

      其中的参数表示:

      -w : path to a workspace directory (required)
      -c : relative path from the workspace to the benchmark configuration file (required).
      -n : relative path from the workspace to the config file of the blockchain network under test (required).
      

      要为您的业务网络创建测试,您需要修改config.yamlcomposer.json文件.您还必须创建一个.js文件,您需要在其中实施要运行的测试,并在config.yaml文件的 callback 部分中指定此文件的路径.

      To create tests for your Business Network you need to modify the config.yaml and composer.json files. You also have to create a .js file where you need to implement the test to be runned, and specify the path to this file in the callback section of config.yaml file.

      有关更多信息,请检查 https://hyperledger.github.io/caliper/docs /1_Getting_Started.html

      For more informations check https://hyperledger.github.io/caliper/docs/1_Getting_Started.html

      这篇关于适用于Composer网络的Hyperledger Caliper教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆