基准测试配置示例
下面的基准测试示例配置实现以下功能:
- 使用5个工作进程执行基准测试
- 分为两轮
- 第一轮进行初始化,将以25tps的速率提交500个交易
- 交易的内容有init.js工作负载模块决定
- 第二轮进行查询,将以5tps的速率提交交易,持续60秒
- 主进程使用单独的Prometheus实例,每5秒钟对工作进程进行一次观测
- 主进程应当在报告中包含所有关于本地docker容器的预定义指标
- 主进程应当包含自定义指标,即每个可用peer实例的背书时间
test:
clients:
type: local
number: 5
rounds:
- label: init
txNumber: 500
rateControl:
type: fixed-rate
opts:
tps: 25
callback: benchmarks/samples/fabric/marbles/init.js
- label: query
txDuration: 60
rateControl:
- type: fixed-rate
opts:
tps: 5
callback: benchmarks/samples/fabric/marbles/query.js
observer:
type: prometheus
interval: 5
monitor:
interval: 1
type: ['docker', 'prometheus']
docker:
containers: ['all']
prometheus:
url: "http://prometheus:9090"
push_url: "http://pushGateway:9091"
metrics:
ignore: [prometheus, pushGateway, cadvisor, grafana, node-exporter]
include:
Endorse Time (s):
query: rate(endorser_propsal_duration_sum{chaincode="marbles:v0"}[5m])/rate(endorser_propsal_duration_count{chaincode="marbles:v0"}[5m])
step: 1
label: instance
statistic: avg