我想使用 Hyperledger Caliper 在已部署的 Hyperledger Composer 业务网络上执行性能评估测试。
在官方文档中有一个Composer 配置部分,但我认为对于第一次接触这个框架的人来说它不是很友好,我找不到更好的基本分步教程来配置和运行评估测试.
我想使用 Hyperledger Caliper 在已部署的 Hyperledger Composer 业务网络上执行性能评估测试。
在官方文档中有一个Composer 配置部分,但我认为对于第一次接触这个框架的人来说它不是很友好,我找不到更好的基本分步教程来配置和运行评估测试.
不支持NodeJS 8 (LTS)、9 或 10 (LTS)更高版本,因为依赖链不允许这样做
节点gyp
npm install
以在本地安装基本依赖项npm run repoclean
以确保所有包都是干净的npm run bootstrap
以引导 Caliper 存储库中的包。这将安装所有包依赖项并链接任何交叉依赖项。完成安装需要一些时间。如果被ctrl+c打断,请先恢复文件package.json,然后再次运行npm run bootstrap。 不要使用 运行上述任何命令sudo
,因为它会导致引导过程失败
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.yaml
和composer.json
文件。您还必须创建一个需要在其中实现要运行的测试的文件,并在文件的回调部分中.js
指定该文件的路径。config.yaml
有关更多信息,请查看https://hyperledger.github.io/caliper/docs/1_Getting_Started.html