Introduction
Overview
Launch an Arm-based c4a-standard-4 instance
Launch an Intel Emerald Rapids c4-standard-8 instance
Install Go, Sweet, and Benchstat
Benchmark types and metrics
Manually run benchmarks
Manually run Benchstat
Install the automated benchmark and Benchstat runner
Run the automated benchmark and Benchstat runner
Next Steps
In the last section, you learned how to run benchmarks and Benchstat manually. Now you’ll automate that process and generate visual reports using a tools called rexec_sweet
.
rexec_sweet
is a Python project available on GitHub that automates the benchmarking workflow. It connects to your GCP instances, runs benchmarks, collects results, and generates HTML reports - all in one step.
It provides several key benefits:
Before running the tool, ensure you’ve completed the “Install Go, Sweet, and Benchstat” step. All other dependencies are installed automatically by the installer.
Follow the steps below to set up rexec_sweet
.
On your local machine, open a terminal, and create a new directory:
mkdir rexec_sweet
cd rexec_sweet
Get rexec_sweet
from GitHub:
git clone https://github.com/geremyCohen/go_benchmarks.git
cd go_benchmarks
Copy and paste this command into your terminal to run the installer:
./install.sh
If the installer detects that you already have dependencies installed, it might ask you if you want to reinstall them:
pyenv: /Users/gercoh01/.pyenv/versions/3.9.22 already exists
continue with installation? (y/N)
If you see this prompt, enter N
to continue with the installation without modifying the existing installed dependencies.
Make sure the GCP VM instances you created in the previous section are running. If not, start them now, and wait a few minutes for them to finish booting.
The installer prompts you to authenticate with Google Cloud Platform (GCP) using the gcloud command-line tool at the end of install. If after installing you have issues running or you get GCP authentication errors, you can manually authenticate with GCP by running the following command: gcloud auth login
Continue on to the next section to run the tool and see how it simplifies the benchmarking process.