mailgun / gubernator

High Performance Rate Limiting MicroService and Library
Apache License 2.0
964 stars 99 forks source link

ci: run benchmarks on every pr and alert if perf is worse #200

Closed miparnisari closed 11 months ago

miparnisari commented 1 year ago

Close https://github.com/mailgun/gubernator/issues/199

miparnisari commented 1 year ago

I'm not sure yet why the bench test timed out at 30 minutes.

@thrawn01 I think either BenchmarkLRUCache/Concurrent_writes or https://github.com/miparnisari/gubernator/blob/61e6cd7bd0e2d876431b8d085c5d0226ea16a894/lrucache_test.go#L551 timed out. Probably because it executed all the reads serially? 🤷‍♀️

But we should probably timeout the test after 10 minutes.

Each benchmark is configured to run for 5 seconds and the benchmark step in the github action are set to either 15 or 30 minutes

Baliedge commented 11 months ago

@miparnisari Could we test the go-bench check to show it fails when exceeding the threshold? Maybe make a temporary change to add sleeps in the benchmarks?

miparnisari commented 11 months ago

@Baliedge i would need to merge this first into master so that I have something to compare with :) But i can do that in a different PR.

thrawn01 commented 11 months ago

Never mind, I just answered my own question 😜