成功跑完caliper自带例子之后,本人尝试使用caliper来测试自己部署的多机fabric环境。
被测fabric网络拓扑
1orderer、3peer、kafka共识、无ca、native启动(非docker)。
IP | 节点 | 域名 |
---|---|---|
10.254.186.164 | orderer | orderer.example.com |
10.254.186.164 | peer | peer0.org1.example.com |
10.254.247.165 | peer | peer1.org1.example.com |
10.254.207.154 | peer | peer0.org2.example.com |
10.254.186.164 | kafka | 无需 |
注:测试之前需要先完整启动fabric网络,测试时command参数会设置为空不启动任何docker资源。
Caliper配置文件
基准测试配置
{
"blockchain": {
"type": "fabric",
"config": "benchmark/simple/fabric-test.json"
},
"command" : {
},
"test": {
"name": "simple",
"description" : "This is an example benchmark for caliper, to test the backend DLT's performance with simple account opening & querying transactions",
"clients": {
"type": "local",
"number": 1
},
"rounds": [{
"label" : "open",
"txNumber" : [1000, 1000, 1000,1000, 1000, 1000],
"rateControl" : [{"type": "fixed-rate", "opts": {"tps" : 50}}, {"type": "fixed-rate", "opts": {"tps" : 100}}, {"type": "fixed-rate", "opts": {"tps" : 150}},{"type": "fixed-rate", "opts": {"tps"