MCPcopy
hub / github.com/grafana/dskit / addSentBytes

Method addSentBytes

kv/memberlist/tcp_transport_conn.go:81–86  ·  view source on GitHub ↗

addSentBytes adds bytes to the local sent counter and flushes to Prometheus if threshold is reached.

(n int64)

Source from the content-addressed store, hash-verified

79
80// addSentBytes adds bytes to the local sent counter and flushes to Prometheus if threshold is reached.
81func (c *meteredConn) addSentBytes(n int64) {
82 newTotal := c.sentBytesLocal.Add(n)
83 if newTotal >= flushThreshold {
84 c.flush()
85 }
86}
87
88// addReceivedBytes adds bytes to the local received counter and flushes to Prometheus if threshold is reached.
89func (c *meteredConn) addReceivedBytes(n int64) {

Callers 1

WriteMethod · 0.95

Calls 2

flushMethod · 0.95
AddMethod · 0.65

Tested by

no test coverage detected