/gas-benchmarks

Gas benchmark research repository

Primary LanguagePython

Gas Benchmarks

This repository contains scripts to run benchmarks across multiple clients. Follow the instructions below to run the benchmarks locally.

Prerequisites

Make sure you have the following installed on your system:

  • Python 3.10
  • Docker
  • Docker Compose
  • .NET 8.0.x
  • make (for running make commands)

Setup

  1. Clone the repository:
git clone https://github.com/nethermindeth/gas-benchmarks.git
cd gas-benchmarks
  1. Install Python dependencies:
pip install -r requirements.txt
  1. Prepare Kute dependencies (specific to Nethermind):
make prepare_tools
  1. Create a results directory:
mkdir -p results

Running the Benchmarks

Script: Run all

For running the whole pipeline, you can use the run.sh script.

bash run.sh -t "testPath" -w "warmupFilePath" -c "client1,client2" -r runNumber -i "image1,image2"

Example run:

run.sh -t "tests/" -w "warmup/warmup-1000bl-16wi-24tx.txt" -c "nethermind,geth,reth" -r 8

Flags:

  • --t it's used to define the path where the tests are located.
  • --w it's used to define the path where the warmup file is located.
  • --c it's used to define the clients that you want to run the benchmarks. Separate the clients with a comma.
  • --r it's used to define the number of iterations that you want to run the benchmarks. It's a numeric value.
  • --i it's used to define the images that you want to use to run the benchmarks. Separate the images with a comma, and match the clients. Use default if you want to ignore the values.

Now you're ready to run the benchmarks locally!