Network stress testing

Prerequisites

This guide assumes that:

  • You have a working xBuildApp network up and running

  • Both your JSON-RPC and GRPC endpoints are reachable

Overview

The xBuildApp Loadbot is a helper utility that is meant to stress test a xBuildApp network.

Currently, it supports 2 modes:

  • transfer - mode that does stress testing using fund-transfer transactions. [Default].

  • deploy - mode that deploys specified smart contracts with each transaction.

Transfer Mode

The transfer mode assumes that there is a sender account that has initial funds to conduct the loadbot run.

The sender's account address and private key need to be set in the environment variables:

Copy

# Example
export LOADBOT_0x9A2E59d06899a383ef47C1Ec265317986D026055=154c4bc0cca942d8a0b49ece04d95c872d8f53d34b8f2ac76253a3700e4f1151

Deploy Mode

The deploy mode conducts contract deployment with each new transaction in the loadbot run. The contract being deployed can be specified using specific flagsarrow-up-right, or if the contract path is omitted, a default Greeter.sol contractarrow-up-right is used instead.

Terminology

This section covers some basic terminology regarding the loadbot configuration.

  • count - The number of transactions to be submitted in the specified mode

  • tps - The number of transactions that should be submitted to the node per second

Start the loadbot

As an example, here is a valid command you can use to run the loadbot using two premined accounts:

Copy

You should get a result similar to this on your terminal :

Copy

Last updated