GithubHelp home page GithubHelp logo

gnolang / supernova Goto Github PK

View Code? Open in Web Editor NEW
15.0 10.0 7.0 409 KB

A small and simple stress testing tool for the Gno Tendermint2 blockchain ⚛️

Home Page: https://gno.land

License: Apache License 2.0

Makefile 0.47% Go 99.53%
blockchain gno stress-testing tendermint2

supernova's Introduction

Overview

supernova is a command-line interface (CLI) tool for stress-testing Gno Tendermint 2 networks. It is used to monitor and report on node performance by executing transactions and measuring response-time.

Key Features

  • 🚀 Batch transactions to make stress testing easier to orchestrate
  • 🛠 Multiple stress testing modes: REALM_DEPLOYMENT, PACKAGE_DEPLOYMENT, and REALM_CALL
  • 💰 Distributed transaction stress testing through subaccounts
  • 💸 Automatic subaccount fund top-up
  • 📊 Detailed statistics calculation
  • 📈 Output cycle run results to a file

Results

To view the results of the stress tests, visit the benchmarks reports for supernova.

Usage Example

To run a stress test with supernova, you will need to have go 1.19 or greater.

  1. Build out the binary

To build out the binary, run the following command:

make build
  1. Run the stress test by specifying options
./build/supernova -sub-accounts 5 -transactions 100 -url http://localhost:26657 -mnemonic "source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast" -output result.json

This will run a stress test against a Gno TM2 node running at http://localhost:26657. The test will use 5 sub-accounts, and send out 100 transactions. The sub-accounts are derived from the specified mnemonic. Finally, results are saved to a file result.json.

For any stress test run, there need to be funds on a specific address. The address that is in charge of funds distribution to subaccounts is the first address with index 0 in the specified mnemonic. Make sure this address has an appropriate amount of funds before running the stress test.

Banner

supernova supports the following options:

USAGE
  [flags] [<arg>...]

Starts the stress testing suite against a Gno TM2 cluster

FLAGS
  -batch 20               the batch size of JSON-RPC transactions
  -chain-id dev           the chain ID of the Gno blockchain
  -mnemonic ...           the mnemonic used to generate sub-accounts
  -mode REALM_DEPLOYMENT  the mode for the stress test. Possible modes: [REALM_DEPLOYMENT, PACKAGE_DEPLOYMENT, REALM_CALL]
  -output ...             the output path for the results JSON
  -sub-accounts 10        the number of sub-accounts that will send out transactions
  -transactions 100       the total number of transactions to be emitted
  -url ...                the JSON-RPC URL of the cluster

Modes

REALM_DEPLOYMENT

The REALM_DEPLOYMENT mode is pretty straightforward - it is a simple Realm deployment mode from accounts. This mode sends out transactions that are deploy transactions for a realm holding state.

PACKAGE_DEPLOYMENT

The PACKAGE_DEPLOYMENT is similar to REALM_DEPLOYMENT. This mode also sends out transactions, but these transactions deploy a package.

REALM_CALL

The REALM_CALL mode deploys a Realm to the Gno blockchain network being tested before starting the cycle run. When the cycle run begins, the transactions that are sent out are method calls.

supernova's People

Contributors

ajnavarro avatar albttx avatar dependabot[bot] avatar gfanton avatar moul avatar zivkovicmilos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.