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

Method buildResp

interop/xds/client/client.go:147–156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

145}
146
147func (as *accumulatedStats) buildResp() *testpb.LoadBalancerAccumulatedStatsResponse {
148 as.mu.Lock()
149 defer as.mu.Unlock()
150 return &testpb.LoadBalancerAccumulatedStatsResponse{
151 NumRpcsStartedByMethod: copyStatsMap(as.numRPCsStartedByMethod),
152 NumRpcsSucceededByMethod: copyStatsMap(as.numRPCsSucceededByMethod),
153 NumRpcsFailedByMethod: copyStatsMap(as.numRPCsFailedByMethod),
154 StatsPerMethod: as.makeStatsMap(),
155 }
156}
157
158func (as *accumulatedStats) startRPC(rpcType string) {
159 as.mu.Lock()

Callers

nothing calls this directly

Calls 4

makeStatsMapMethod · 0.95
copyStatsMapFunction · 0.85
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected