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

Method SetQPS

orca/server_metrics.go:261–271  ·  view source on GitHub ↗

SetQPS records a measurement for the QPS metric.

(val float64)

Source from the content-addressed store, hash-verified

259
260// SetQPS records a measurement for the QPS metric.
261func (s *serverMetricsRecorder) SetQPS(val float64) {
262 if val < 0 {
263 if logger.V(2) {
264 logger.Infof("Ignoring QPS value out of range: %v", val)
265 }
266 return
267 }
268 smCopy := copyServerMetrics(s.state.Load())
269 smCopy.QPS = val
270 s.state.Store(smCopy)
271}
272
273// DeleteQPS deletes the relevant server metric to prevent it from being sent.
274func (s *serverMetricsRecorder) DeleteQPS() {

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