-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(bigtable): add support for request stats #6991
Conversation
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.
Is there a way to add a test for this?
This PR also requires a unit test and an integration test. |
test(bigtable): add integration tests for request stats
Added integration tests. |
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.
I think this still needs a unit test in bigtable_test.go
. The Go monorepo doesn't run integration tests for each PR until it has been merged. As a result, we need to ensure that unit tests exist to help us see breakages before a PR is merged.
In sum, bare minimum required changes:
- unit test(s) for this callback feature in
bigtable_test.go
- comments for all publicly exposed fields to populate the reference docs
} | ||
|
||
func makeFullReadStats(reqStats *btpb.RequestStats) FullReadStats { | ||
statsView := reqStats.GetFullReadStatsView() |
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.
Although this is guarded by an if statement above, I recommend a nil check here.
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.
What would you recommend to do in the nil case? Since this is an internal impl detail, we can update this in a follow up PR
At this point the only thing that missing is a unit test. This will require some refactoring in the emulator code, which we can do in a follow up PR. The functionality is covered by the integration test. Given the timing, I'm going to go ahead and merge this. |
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.
lgtm.
The only outstanding action item is a unit test which will come in a follow PR
feat(bigtable): add support for request stats