caliper config.yaml 材料设置,解释了每个配置项的作用和注意事项

以下是添加了详细备注的 config.yaml 文件配置,解释了每个配置项的作用和注意事项:

# Caliper 性能测试主配置文件
# 文档参考: https://hyperledger.github.io/caliper/
# 测试轮次配置 - 可以定义多个测试轮次,每个轮次测试不同的合约或场景
rounds:
  # 第一个测试轮次 - 测试 HelloWorld 合约
  - label: test-helloworld                     # 测试轮次标识符(必须唯一)
    description: "测试 HelloWorld 合约"         # 测试描述(可选)
    txNumber: 1000                             # 本轮次要发送的总交易数量
    # 速率控制配置
    rateControl:
      type: fixed-rate                         # 速率控制类型(fixed-rate固定速率)
      opts:
        tps: 50                                # 目标每秒交易数(Transactions Per Second)
    # 工作负载配置
    workload:
      module: "benchmarks/helloworld/workload.js"  # 工作负载模块路径(相对于工作目录)
      arguments:                                  # 传
posted @ 2025-07-23 18:20  wzzkaifa  阅读(16)  评论(0)    收藏  举报