Home

Awesome

cosmosloadtester

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.

Building and running the server

  1. Build the UI:
make ui
  1. Build the server:
make server
  1. Run the server:
./bin/server --port=8080
  1. The server should be available at http://localhost:8080

Registering custom client factories

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.

  1. 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

  2. Register your factory with a meaningful name in registerClientFactories in cmd/server/main.go:

    https://github.com/orijtech/cosmosloadtester/blob/1d66499b0d56fcbfb1888047a7f0ad1c697b8dbf/cmd/server/main.go#L115-L124

  3. After adding and registering your client factory, make sure to rebuild the server.

  4. Then, you can enter its name under Client factory in the UI to use it:

    image

Images

Input screen

Results

Sequence diagram

image