在 Caliper 中执行不同的智能合约需要通过正确配置工作负载(workload)和测试轮次(rounds),下面我将详细介绍如何执行不同的合约。
1. 通过 config.yaml 配置不同测试轮次
你可以在 config.yaml 中为不同的合约定义不同的测试轮次:
rounds:
- label: test-helloworld
description: "测试 HelloWorld 合约"
txNumber: 1000
rateControl:
type: fixed-rate
opts:
tps: 50
workload:
module: "benchmarks/helloworld/workload.js"
arguments:
contractId: "helloworld" # 对应fisco-bcos.json中的合约ID
function: "set" # 要调用的合约函数
- label: test-parallelok
description: "测试 ParallelOk 合约"
txNumber: 2000
rateControl:
type: fixed-rate
opts:
tps: 100
workload:
module: "benchmarks/parallelok/workl



















