MCPcopy
hub / github.com/IBM/sarama / updateOutgoingCommunicationMetrics

Method updateOutgoingCommunicationMetrics

broker.go:1882–1898  ·  view source on GitHub ↗
(bytes int)

Source from the content-addressed store, hash-verified

1880}
1881
1882func (b *Broker) updateOutgoingCommunicationMetrics(bytes int) {
1883 b.requestRate.Mark(1)
1884 if b.brokerRequestRate != nil {
1885 b.brokerRequestRate.Mark(1)
1886 }
1887
1888 requestSize := int64(bytes)
1889 b.outgoingByteRate.Mark(requestSize)
1890 if b.brokerOutgoingByteRate != nil {
1891 b.brokerOutgoingByteRate.Mark(requestSize)
1892 }
1893
1894 b.requestSize.Update(requestSize)
1895 if b.brokerRequestSize != nil {
1896 b.brokerRequestSize.Update(requestSize)
1897 }
1898}
1899
1900func (b *Broker) updateProtocolMetrics(rb protocolBody) {
1901 protocolRequestsRate := b.protocolRequestsRate[rb.key()]

Callers 6

sendInternalMethod · 0.95
AuthorizeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected