MCPcopy
hub / github.com/grpc/grpc-go / isZeroStats

Function isZeroStats

balancer/grpclb/grpclb_picker.go:52–58  ·  view source on GitHub ↗
(stats *lbpb.ClientStats)

Source from the content-addressed store, hash-verified

50}
51
52func isZeroStats(stats *lbpb.ClientStats) bool {
53 return len(stats.CallsFinishedWithDrop) == 0 &&
54 stats.NumCallsStarted == 0 &&
55 stats.NumCallsFinished == 0 &&
56 stats.NumCallsFinishedWithClientFailedToSend == 0 &&
57 stats.NumCallsFinishedKnownReceived == 0
58}
59
60// toClientStats converts rpcStats to lbpb.ClientStats, and clears rpcStats.
61func (s *rpcStats) toClientStats() *lbpb.ClientStats {

Callers 2

sendLoadReportMethod · 0.85

Calls

no outgoing calls

Tested by 1