-
Notifications
You must be signed in to change notification settings - Fork 437
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
fix type mismatch for descriptor func #8420
Conversation
Issues linked to changelog: |
Issues linked to changelog: |
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 are a few other pieces of cleanup that can be done since the tests no longer have the linux requirement:
- The
BeforeEach
still has
testutils.LinuxOnly("uses go-utils benchmarking.Measure() which only compiles on Linux")
which can be removed
2. The comment above the tests:
// These tests only compile and run on Linux machines due to the use of the go-utils benchmarking package which is only
// compatible with Linux
Can also be either deleted or updated
Description
WithInjectedSnapshot()
toScaledSnapshotBuilder
, allowing the user to specify a snapshot for the builder to return directlyWithInjectedSnapshot()
in raw snapshot table entrygenerateDesc()
accordinglyMeasureIgnore0ns()
in order to allow for running performance tests locallyContext
When working on #8415 we did not run the Nightly job performance tests for the final commit and therefore did not catch bugs that had been introduced, namely:
generateDesc()
func signature no longer matched the Entry signature for the "Benchmark table"This PR resolves these bugs
We opt to add getter functions to
ScaledSnapshotBuilder
to allowgenerateDesc()
to consume builders instead of snapshots and to addNewInjectedSnapshotBuilder()
to allow arbitrary snapshots to be passedThe alternative would be to pass built Snapshots to each entry, like:
I am ambivalent between these choices, but calling
Build()
from within the test function seemed cleaner and, asScaledSnapshotBuilder
is an internal, test-only struct, there does not seem to be a downside to exposing getter functions on itIf reviewers feel the alternative is preferable we can go that route
In addition, we add a Darwin implementation for measurement, allowing tests to be run locally on Macs
Though the timing measurements are not actually meaningful as far as benchmarking, this will allow users to catch compilation and runtime errors without having to manually run the Nightly action
Users should continue to run the Nightly action when adding new tests in order to determine the benchmark targets
Nightly build run(s)
Add additional links if additional commits are made
Checklist:
make -B install-go-tools generated-code
to ensure there will be no code diff