Hyperledger Fabric v1.4.1 性能测试工具 tape

   日期:2020-11-15     浏览:421    评论:0    
核心提示:参考链接官网参考1、环境搭建成功的fabric1.4.12、搭建tape下载#进入root目录sudo igit clone https://github.com/guoger/tape设置golang代理export GO111MODULE=onexport GOPROXY=https://goproxy.cn搭建cd tapego build ./cmd/tape3、测试vim config.yamlsample文件endorsers: - addr:

参考链接
官网
参考
1、环境
搭建成功的fabric1.4.1
2、搭建tape
下载

#进入root目录
sudo i
git clone https://github.com/guoger/tape

设置golang代理

export GO111MODULE=on
export GOPROXY=https://goproxy.cn

搭建

cd tape
go build ./cmd/tape

3、测试

vim config.yaml

sample文件

endorsers:
  - addr: localhost:7051
    tls_ca_cert: /path/to/peer1/tls/ca/cert
  - addr: localhost:7051
    tls_ca_cert: /path/to/peer2/tls/ca/cert
committer:
  addr: localhost:7051
  tls_ca_cert: /path/to/peer2/tls/ca/cert
orderer:
  addr: localhost:7050
  tls_ca_cert: /path/to/orderer/tls/ca/cert
channel: mychannel
chaincode: basic
args:
  - GetAllAssets
mspid: Org1MSP
private_key: ./organizations/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/priv_sk
sign_cert: ./organizations/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem
num_of_conn: 10
client_per_conn: 10

根据自己的网络环境进行修改
这是我的修改后的文件

endorsers:
  - addr: localhost:7051
    tls_ca_cert: /home/node2/go/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
  
committer:
  addr: localhost:7051
  tls_ca_cert: /home/node2/go/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem

orderer:
  addr: localhost:7050
  tls_ca_cert: /home/node2/go/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem

channel: mychannel
chaincode: mycc
args: ["query", "a"]
mspid: Org1MSP
private_key: /home/node2/go/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/ccf224f61bbf1106bc791b44f712189dbcd2490aaf92de1400d2d20a89a4385e_sk
sign_cert: /home/node2/go/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
num_of_conn: 40
client_per_conn: 20

此外,还可修改fabric-samples/first-network/configtx.yaml 出块策略部分

Orderer: &OrdererDefaults
    OrdererType: solo
    BatchTimeout: 2s
    BatchSize:
        MaxMessageCount: 10		#(可修改此处)
        AbsoluteMaxBytes: 99 MB
        PreferredMaxBytes: 512 KB

进行测试

./tape config.yaml 40000

测试结果

 
打赏
 本文转载自:网络 
所有权利归属于原作者,如文章来源标示错误或侵犯了您的权利请联系微信13520258486
更多>最近资讯中心
更多>最新资讯中心
0相关评论

推荐图文
推荐资讯中心
点击排行
最新信息
新手指南
采购商服务
供应商服务
交易安全
关注我们
手机网站:
新浪微博:
微信关注:

13520258486

周一至周五 9:00-18:00
(其他时间联系在线客服)

24小时在线客服