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

Method SetApplicationUtilization

orca/server_metrics.go:240–250  ·  view source on GitHub ↗

SetApplicationUtilization records a measurement for a generic utilization metric.

(val float64)

Source from the content-addressed store, hash-verified

238// SetApplicationUtilization records a measurement for a generic utilization
239// metric.
240func (s *serverMetricsRecorder) SetApplicationUtilization(val float64) {
241 if val < 0 {
242 if logger.V(2) {
243 logger.Infof("Ignoring Application Utilization value out of range: %v", val)
244 }
245 return
246 }
247 smCopy := copyServerMetrics(s.state.Load())
248 smCopy.AppUtilization = val
249 s.state.Store(smCopy)
250}
251
252// DeleteApplicationUtilization deletes the relevant server metric to prevent
253// it from being sent.

Callers

nothing calls this directly

Calls 4

copyServerMetricsFunction · 0.85
VMethod · 0.65
InfofMethod · 0.65
LoadMethod · 0.45

Tested by

no test coverage detected