cosmosloadtester
is a load-testing tool built on top of informalsystems/tm-load-test.
It uses an enhanced fork of tm-load-test, which provides significantly more-detailed stats such as
latency percentile breakdowns and detailed graphs of QPS over time.
The tool consists of a Go server which exposes the loadtest service over HTTP using gRPC-web and a built-in React UI for scheduling loadtests and visualizing results. The gRPC service can also be interacted with without the UI by using gRPC, gRPC-Gateway, or gRPC-web.
To leverage this tool, you'll need to write logic to generate transactions for your message type.
- Build the UI:
make ui
- Build the server:
make server
- Run the server:
./bin/server --port=8080
- The server should be available at http://localhost:8080
To use this tool, you will need to write a client factory that generates transactions for the message type(s) you want to load-test.
-
Create your custom client factory.
For use as a template, a sample client factory that generates an empty Cosmos transaction can be found under clients/myabciapp/client.go: https://github.com/orijtech/cosmosloadtester/blob/1d66499b0d56fcbfb1888047a7f0ad1c697b8dbf/clients/myabciapp/client.go#L45-L53
-
Register your factory with a meaningful name in
registerClientFactories
in cmd/server/main.go: -
After adding and registering your client factory, make sure to rebuild the server.
-
Then, you can enter its name under
Client factory
in the UI to use it: