Coder Social home page Coder Social logo

brucexc / flood Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paradigmxyz/flood

0.0 0.0 0.0 3.17 MB

flood is a load testing tool for benchmarking EVM nodes over RPC

Home Page: https://github.com/paradigmxyz/flood

License: Apache License 2.0

Python 99.69% Dockerfile 0.31%

flood's Introduction

๐ŸŒŠ๐ŸŒŠ flood ๐ŸŒŠ๐ŸŒŠ

flood is a load testing tool for benchmarking EVM nodes over RPC

CI status Docker Telegram Chat

For each RPC method, flood measures how load affects metrics such as:

  1. throughput
  2. latency (mean, P50, P90, P95, P99, max)
  3. error rate

flood makes it easy to compare the performance of:

  • different node clients (e.g. geth vs erigon vs reth)
  • different hardware/software configurations (e.g. local vs cloud vs low memory vs RAID-0)
  • different RPC providers (e.g. Alchemy vs Quicknode vs Infura)

flood can generate tables, figures, and reports for easy sharing of results (example report here)

Installation

Prerequisites

Install vegeta:

  • on mac: brew update && brew install vegeta
  • on linux: go install github.com/tsenart/vegeta/[email protected]

After installation, make sure vegeta is on your $PATH. Running vegeta -h should output a path. If it does not, you probably have not set up go to install items to your $PATH. You may need to add something like export PATH=$PATH:~/go/bin/ to your terminal config file (e.g. ~/.profile).

flood also requires python >= 3.7

Installing flood

pip install paradigm-flood

Typing flood help in your terminal should show help output. If it does not, you probably have not set up pip to install items to your $PATH. You may need to add something like export PATH=$PATH:~/.local/bin to your terminal config file (e.g. ~/.profile). Alternatively, you can avoid setting up your $PATH and just type python3 -m flood instead of flood.

Usage

run test

flood eth_getBlockByNumber NODE1_NAME=NODE1_URL NODE2_NAME=NODE2_URL --rates 10 100 1000 --duration 30

orchestrate tests on remote nodes

flood eth_getBlockByNumber NODE1_NAME=NODE1_URL:localhost:8545 NODE2_NAME=NODE2_URL:localhost:8545

create report

flood report tests/test1_output tests/test2_output

Code Layout

  • flood/cli: command line interface
  • flood/generators: utilities for generating rpc calls with parameterized distributions
  • flood/tests: implementations of load tests and equality tests
  • flood/user_io: utiltiies for parsing user io

Contributing

Contributions are welcome in the form of issues, PR's, and commentary. Check out the contributor guide in CONTRIBUTING.md.

flood's People

Contributors

sslivkoff avatar andremiras avatar mattsse avatar gakonst avatar jonaspf 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.