MCPcopy Create free account
hub / github.com/Icinga/icinga2 / CalculateRate

Method CalculateRate

lib/base/ringbuffer.cpp:86–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86double RingBuffer::CalculateRate(RingBuffer::SizeType tv, RingBuffer::SizeType span)
87{
88 std::unique_lock<std::mutex> lock(m_Mutex);
89
90 int sum = UpdateAndGetValuesUnlocked(tv, span);
91 return sum / static_cast<double>(std::min(span, m_InsertedValues));
92}

Callers 6

GetBytesSentPerSecondMethod · 0.80
LogStatsMethod · 0.80
LogStatsHandlerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected