使用Hyperledger Caliper难以创建基准测试 [英] Difficulty creating a benchmark test using Hyperledger Caliper

查看:75
本文介绍了使用Hyperledger Caliper难以创建基准测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Hyperledger Caliper框架来衡量基于Hyperledger Fabric的区块链网络的性能,该网络包含3个节点以及1个订购者和独占共识.我已经安装了网络,并且可以通过智能合约在不同的远程虚拟机上正确响应.我知道我必须创建一个网络配置文件和一个用于测试配置的文件.至此,我的疑惑开始了.在我看到的所有示例中,在此配置文件中,用于测试的javascripts文件都是相关的,但是我的智能合约是用golang编写的.我的测试必须使用javascript编写吗?我可以在该文件中引用golang文件吗?有人能提供一个例子给我吗?我已经研究了好几个星期,但是我不理解该框架提供的示例.任何人都可以给我任何帮助,即使它是我尚未看到的进一步搜索链接.

I am trying to use the Hyperledger Caliper framework to measure the performance of a blockchain network based on Hyperledger Fabric, containing 3 nodes and 1 orderer and solo consensus. I already have the network installed and functional with smart contracts responding correctly on different remote virtual machines. I know I have to create a network configuration file and one for testing configuration. At this point my doubts begin. In all the examples I saw, in this configuration file, javascripts files for testing are related, but my smart contract was written in golang. Must my tests be written using javascript? Can I reference a golang file in this file? Would anyone have an example to provide me? I've been researching for weeks but I can't understand the examples provided by the framework. Could anyone give me any help, even if it is a link that I haven't seen yet to search further.

推荐答案

当前所有的caliper工作负载都在主要是JavaScript引擎的node.js中执行(Chaincode可以用任何受结构支持的语言编写).对其他语言的支持可能会在本机将来出现,也可能会通过在Node.js引擎增加wasm功能时仅转换为javascript或编译为wasm来实现.

All caliper workloads currently execute in node.js which is predominantly a javascript engine (Chaincode can be written in any fabric supported language). Support for other languages may come in the future either natively or maybe through alternative just a transpiling to javascript or compiling to wasm as the node.js engine increases it's wasm capabilities.

我建议您查看最新的面料教程,可以在这里找到 https://hyperledger.github.io/caliper/v0.4.2/fabric-tutorial/由于卡尺(相对于v0.3.2版本)有一些重大改进

I would recommend looking at the latest tutorial for fabric which can be found here https://hyperledger.github.io/caliper/v0.4.2/fabric-tutorial/ As there are some big improvements to caliper (over the v0.3.2 version)

这篇关于使用Hyperledger Caliper难以创建基准测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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