cw-load-test
is a tool for load
testing Cosmwasm networks based on tm-load-test.
In order to build and use the tools, you will need:
- Go 1.17+
make
To build the cw-load-test
binary in the build
directory:
make build
Require WALLET
and CHAINID
environment variables.
# wallet paraphrase
export WALLET="dss hgg ssa yyrre ere ere erre ..."
export CHAINID=torri-1
1. Storing wasm code
This command generates different wasm files from a custom wat (text format) using wasmtime-go, and sends 6 wasm codes with a timeout height (+5).
./build/cw-load-test -b 5 -r 6 \
--wat-path res/code.wat \
--broadcast-tx-method async \
--lcd http://127.0.0.1:1317 \
--endpoints ws://127.0.0.1:26657/websocket \
--gas 2000000 --gas-prices 0.00ucosm
-b
: Max block to wait txs complete-r
: Txs in batch transaction--lcd
: Cosmos API--endpoints
: Tendermint RPC
2. Execute contract
Send 10 MsgExecuteContract
txs with timeout height +5. Use custom contract
./build/cw-load-test -b 5 -r 10 \
--contract wasm1hm4y6fzgxgu688jgf7ek66px6xkrtmn3gyk8fax3eawhp68c2d5qphe2pl
--exec-msg '{"allocate_memory": {"limit": 500}}' \
--broadcast-tx-method async \
--lcd http://127.0.0.1:1317 \
--endpoints ws://127.0.0.1:26657/websocket \
--gas 2000000 --gas-prices 0.00ucosm
--contract
: Contract to be executed.--exec-msg
: Execute msg to send to contract.