-
Notifications
You must be signed in to change notification settings - Fork 94
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 degradation tests into CI #1331
base: stage
Are you sure you want to change the base?
Conversation
…ion-tests-into-ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! Just minor comments
logger := zaptest.NewLogger(b) | ||
db, err := kv.NewInMemory(logger, basedb.Options{}) | ||
if err != nil { | ||
b.Fatal(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the testify library instead?
scripts/degradation-tester/main.go
Outdated
opThresholds[testCase.Name] = testCase.OpDelta | ||
} | ||
if testCase.AllocDelta > 0 { | ||
opThresholds[testCase.Name] = testCase.OpDelta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opThresholds[testCase.Name] = testCase.OpDelta | |
allocThresholds[testCase.Name] = testCase.OpDelta |
…ion-tests-into-ci
…ion-tests-into-ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
@AKorpusenko I don't understand how you updated the test but the benchmark results didn't change? especially how this passes on CI since on linux we now use openssl which should be 10x faster than stdlib rsa (which you run locally on your mac). |
@y0sher, we have to compare the benchmarks only between different GHA workflow runs, right? I've added a Another thing I've noticed, is that we have |
Added a new script for CI which:
Runs
go test -bench
per each of files listed in theconfig.yml
Per each of the Benchmark test it's optional to specify allocations count and operations count delta
Script requires
yq
andbenchstat
tools for workEach test case is executed 10 times. This is required minimum to get at least somewhat accurate values.
Makefile
Added two new commands:
degradation-test
-- runs the tests with benchmarks and compares the results with the existing in the repoupdate-benchmarks
-- a manual Github Actions workflow which can we triggered to update the benchmarks in the repo. Should be used for approved optimizations and performance downgrades