Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add index performance script #2042

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions scripts/performance/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Performance Scripts
===================

This directory is a collection of scripts for exercising rekor's performance.
40 changes: 40 additions & 0 deletions scripts/performance/index-storage/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Rekor Performance Tester
========================

Scripts to repeatably gather performance metrics for index storage insertion and
retrieval in rekor.

Usage
-----

Use terraform to set up the services in GCP:

```
cd terraform
terraform init
terraform plan
terraform apply
```

Copy or clone this repository on to the bastion VM that terraform instantiates.
Run this script from there:

```
export INSERT_RUNS=<N> # The number of inserts to perform and measure. This doesn't need to be terribly high.
export SEARCH_ENTRIES=<M> # The number of entries to upload to the database out of band to search against. This should be sufficiently high to represent a real database.
export INDEX_BACKEND=<redis|mysql> # The index backend to test against
export REGION=<region> # The GCP region where the rekor services are deployed
./index-performance.sh
```

On the first run, `indices.csv` will be populated with fake search entries,
which will take a while depending on how big $SEARCH_ENTRIES is. This only
happens once as long as indices.csv is not removed.

Run `index-performance.sh` against each backend. Then plot the results:

```
./plot.sh
```

Copy the resulting `graph.png` back to your local host.
Loading
Loading