-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
profiling: add hooks within grpc #3159
Conversation
31d9dad
to
9c4973f
Compare
Is this PR ready for review once you merge in the changes from #3158? |
Yes. Has been ready for review from day one btw :P |
As a general rule, I prefer if travis is green before reviews start, just to be sure it doesn't need potentially significant changes in order to make tests pass. Or if changes in prerequisite PRs are needed, that significant changes aren't needed here either. I assume that's not the case here, but were you planning to rebase this PR soon? Thanks! |
28093c8
to
967bc06
Compare
@dfawley rebased onto latest master |
@dfawley now storing profiling data in the results file. I don't think I'll have time for this, but when diffing two result files with benchresult, we could also diff key areas within profiling if the data exists (i.e. |
@adtac, looks like this is still failing (not just flakes). Can you take another look please? |
@dfawley argh, forgot to run go fmt -- fixed, should be all green now (except for one documented xDS related failing test?) |
Looks like there is a nil pointer dereference in |
Weird, that didn't happen when I ran the tests locally... Anyway, pushed one more update -- all green locally and on Travis. |
Closed by mistake lol |
7e1517a
to
1453c8c
Compare
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.
@dfawley addressed -- some of the TODOs surrounding recvMsg is from weeks ago when I used to pass a timer in that struct. That's no longer the case. There are still some legitimate TODOs left, which I've left in -- if you find some unnecessary TODOs, lemme know.
66bc097
to
8c10159
Compare
internal/transport/http2_server.go
Outdated
// See comment above StreamStatMetadataSize definition for more information | ||
// on this encoding. | ||
s.stat.Metadata = make([]byte, profiling.StreamStatMetadataSize) | ||
binary.BigEndian.PutUint64(s.stat.Metadata[0:8], t.connectionID) |
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.
Sorry: I was suggesting consts for both the 8 and 12 magic numbers (where 12 potentially = the 8 constant plus another 4 constant), and to use them here, also.
Travis:
|
8c10159
to
f427ce6
Compare
bb3007f
to
5c4d99e
Compare
@@ -454,26 +459,36 @@ func (s *Stream) write(m recvMsg) { | |||
s.buf.put(m) | |||
} | |||
|
|||
// Stat returns the streams's underlying *profiling.Stat. | |||
func (s *Stream) Stat() *profiling.Stat { | |||
if s == nil { |
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.
Why does this need the nil check? Where would we call Stat()
on a nil stream?
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 don't exactly remember, but I vaguely recall facing an issue in some end-to-end tests. I've added a TODO so that someone will re-evaluate this later.
5c4d99e
to
c401b38
Compare
@dfawley you (or someone) should also take over the 3-4 TODO comments I have in my name as |
Thanks for the fixes! 🚀 |
This reverts commit 83263d1.
No description provided.