(bytes int, requestLatency time.Duration)
| 1842 | } |
| 1843 | |
| 1844 | func (b *Broker) updateIncomingCommunicationMetrics(bytes int, requestLatency time.Duration) { |
| 1845 | b.updateRequestLatencyAndInFlightMetrics(requestLatency) |
| 1846 | b.responseRate.Mark(1) |
| 1847 | |
| 1848 | if b.brokerResponseRate != nil { |
| 1849 | b.brokerResponseRate.Mark(1) |
| 1850 | } |
| 1851 | |
| 1852 | responseSize := int64(bytes) |
| 1853 | b.incomingByteRate.Mark(responseSize) |
| 1854 | if b.brokerIncomingByteRate != nil { |
| 1855 | b.brokerIncomingByteRate.Mark(responseSize) |
| 1856 | } |
| 1857 | |
| 1858 | b.responseSize.Update(responseSize) |
| 1859 | if b.brokerResponseSize != nil { |
| 1860 | b.brokerResponseSize.Update(responseSize) |
| 1861 | } |
| 1862 | } |
| 1863 | |
| 1864 | func (b *Broker) updateRequestLatencyAndInFlightMetrics(requestLatency time.Duration) { |
| 1865 | requestLatencyInMs := int64(requestLatency / time.Millisecond) |
no test coverage detected