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

Function newServerMetricsRecorder

orca/server_metrics.go:155–168  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153}
154
155func newServerMetricsRecorder() *serverMetricsRecorder {
156 s := new(serverMetricsRecorder)
157 s.state.Store(&ServerMetrics{
158 CPUUtilization: -1,
159 MemUtilization: -1,
160 AppUtilization: -1,
161 QPS: -1,
162 EPS: -1,
163 Utilization: make(map[string]float64),
164 RequestCost: make(map[string]float64),
165 NamedMetrics: make(map[string]float64),
166 })
167 return s
168}
169
170// ServerMetrics returns a copy of the current ServerMetrics.
171func (s *serverMetricsRecorder) ServerMetrics() *ServerMetrics {

Callers 2

NewServerMetricsRecorderFunction · 0.85
recorderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected