Skip to content
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

stats: Improved sequencing documentation for server-side stats events and added tests. #7885

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
44abfd0
Improved sequencing Documentation for the stats events and added test…
RyanBlaney Dec 1, 2024
10f6726
Fix formatting issues according to Google style guide
RyanBlaney Dec 2, 2024
92ec341
Removed unnecessary time stamps from event tracing
RyanBlaney Dec 2, 2024
71adf5e
Cleared up difference between client side and server side stat events…
RyanBlaney Dec 3, 2024
8622eab
Fixed documentation style and whitespace between comments. Put the or…
RyanBlaney Dec 11, 2024
f291e58
Fixed return wrapping. Added note about StartServer using deprecated …
RyanBlaney Dec 11, 2024
dcb64c1
Fixed documentation in stats.go with unnecessary line breaks.
RyanBlaney Dec 17, 2024
c157b93
Removed unnecessary comments and fixed format wrapping mistakes.
RyanBlaney Dec 17, 2024
480ce6b
Fixed remaining wrapping mistakes
RyanBlaney Dec 18, 2024
8b90cae
Fixed a few style issues
RyanBlaney Dec 18, 2024
443d960
Fixed the last of the style issues
RyanBlaney Dec 18, 2024
436bc06
Fixed vet errors.
RyanBlaney Dec 21, 2024
19b4974
Ran gofmt -s -w
RyanBlaney Dec 21, 2024
53b7249
Put wanted test sequences in their respective test functions. Additio…
RyanBlaney Dec 28, 2024
6a8c733
minor style adjustment
RyanBlaney Dec 28, 2024
4a18e7e
Got rid of vet error
RyanBlaney Dec 28, 2024
fb39711
Ran gofmt and goimports
RyanBlaney Dec 28, 2024
e37254c
Removed 'expected' and clarified comments.
RyanBlaney Jan 9, 2025
0fdf514
ran gofmt
RyanBlaney Jan 12, 2025
ebecb99
used copy instead of a loop
RyanBlaney Jan 12, 2025
ebd2156
Added clarity to and . Minor style adjustments.
RyanBlaney Jan 18, 2025
d2d25e3
Made phrasing revisions consistent across stats structs.
RyanBlaney Jan 28, 2025
2c2a409
Reverted wantData back to expectedData
RyanBlaney Jan 28, 2025
364ca31
Reverted wantData back to expectedData
RyanBlaney Jan 28, 2025
dc05508
Fixed stats tests to ensure there are no timing issues with excessive…
RyanBlaney Jan 28, 2025
1745e94
Fixed vet error
RyanBlaney Jan 28, 2025
34b4c26
Removed redundant tests.
RyanBlaney Feb 19, 2025
c96054a
Removed unused recordStats functionality
RyanBlaney Mar 3, 2025
f27375e
Fixed incorrect documentation
RyanBlaney Mar 7, 2025
b16e1fb
removed unused field 'events'
RyanBlaney Mar 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions stats/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ type RPCStats interface {
IsClient() bool
}

// Begin contains stats when an RPC attempt begins.
// Begin contains stats recorded when an RPC attempt begins. This event is
// called after the `InHeader` for server-side events, as headers must be
// processed before the RPC lifecycle begins. For client-side events, it is the
// first event for client-side stats events.
//
// FailFast is only valid if this Begin is from client side.
type Begin struct {
// Client is true if this Begin is from client side.
Expand Down Expand Up @@ -98,7 +102,9 @@ func (s *InPayload) IsClient() bool { return s.Client }

func (s *InPayload) isRPCStats() {}

// InHeader contains stats when a header is received.
// InHeader contains stats recorded when the header is received. It is the
// first event in server-side stats after receiving the RPC request. For
// client-side stats, it occurs after the `OutPayload` event.
type InHeader struct {
// Client is true if this InHeader is from client side.
Client bool
Expand Down Expand Up @@ -195,8 +201,9 @@ type OutTrailer struct {
Client bool
// WireLength is the wire length of trailer.
//
// Deprecated: This field is never set. The length is not known when this message is
// emitted because the trailer fields are compressed with hpack after that.
// Deprecated: This field is never set. The length is not known when this
// message is emitted because the trailer fields are compressed with hpack
// after that.
WireLength int
// Trailer contains the trailer metadata sent to the client. This
// field is only valid if this OutTrailer is from the server side.
Expand Down
Loading
Loading