sigstore / rekor

Software Supply Chain Transparency Log
https://sigstore.dev
Apache License 2.0
904 stars 164 forks source link

Add index performance script #2042

Closed cmurphy closed 8 months ago

cmurphy commented 8 months ago

Add terraform configuration and scripts to set up rekor standalone on GCP, perform a series of insert and search operations, use Prometheus to gather metrics, and plot the results with gnuplot.

The scripts added here are for comparing mysql and redis as index storage backends. Other types of performance measurement scripts could be added here in the future.

To get a realistic sense of query speed for searches, a large data set is needed. Rather than using the rekor API to insert real data, fake data is generated and uploaded directly to the backend before searching it.

Different types of searches are performed: searches where there should be many results, searches where there should be few results, and searches where there should be no results. The goal is not to compare the latency of these different searches, but to take the overall average to compare across backends.

Depends on https://github.com/sigstore/scaffolding/pull/1036

Summary

Release Note

Documentation

cmurphy commented 8 months ago

Example output: https://gist.github.com/cmurphy/71683066aa94084e6795cd406fd1eab4

I've not added any workflows to run this script regularly, but it could be useful in the future to run this automatically to track performance trends. It would not be appropriate to gate on this, since an individual performance run could be better or worse from one to another based on a wide variety of factors.

I'm using this to do work on the public instance and it was suggested that it could be useful to include in this repo. I'm also fine with keeping it separate if this seems too niche.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 48.93%. Comparing base (488eb97) to head (73135f3). Report is 62 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2042 +/- ## =========================================== - Coverage 66.46% 48.93% -17.53% =========================================== Files 92 80 -12 Lines 9258 6641 -2617 =========================================== - Hits 6153 3250 -2903 - Misses 2359 2987 +628 + Partials 746 404 -342 ``` | [Flag](https://app.codecov.io/gh/sigstore/rekor/pull/2042/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sigstore) | Coverage Δ | | |---|---|---| | [e2etests](https://app.codecov.io/gh/sigstore/rekor/pull/2042/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sigstore) | `?` | | | [unittests](https://app.codecov.io/gh/sigstore/rekor/pull/2042/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sigstore) | `48.93% <ø> (+1.25%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sigstore#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.