MCPcopy
hub / github.com/prometheus/client_golang / Add

Method Add

exp/api/remote/remote_headers.go:185–190  ·  view source on GitHub ↗

Add adds the given WriteResponseStats to this WriteResponseStats. If this WriteResponseStats is empty, it will be replaced by the given WriteResponseStats.

(rs WriteResponseStats)

Source from the content-addressed store, hash-verified

183// Add adds the given WriteResponseStats to this WriteResponseStats.
184// If this WriteResponseStats is empty, it will be replaced by the given WriteResponseStats.
185func (s *WriteResponseStats) Add(rs WriteResponseStats) {
186 s.confirmed = rs.confirmed
187 s.Samples += rs.Samples
188 s.Histograms += rs.Histograms
189 s.Exemplars += rs.Exemplars
190}
191
192// parseWriteResponseStats returns WriteResponseStats parsed from the response headers.
193//

Callers 1

WriteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected