The scripts in this directory can be used to run benchmarks on the executor and generate plots based on the benchmark results.
- Go (for running benchmarks)
- Python 3 (for generating plots)
- matplotlib (Python library for plotting)
-
Navigate to the directory containing the Go files you want to benchmark:
cd core
-
Run the benchmarks using the
go test
command. You can specify patterns to run specific benchmarks:go test -bench=BenchmarkExecuteQuery -benchmem
-
Place your
benchmark_results.txt
file in the same directory as yourplot_benchmarks.py
script. -
Install the required Python library:
# Create a virtual environment python3 -m venv venv # Activate the virtual environment source venv/bin/activat # Install matplotlib pip install matplotlib
-
Run the Python script to generate plots:
python plot_benchmarks.py
-
The script will read the
benchmark_results.txt
file and generate plots based on the benchmark results.