MCPcopy Create free account
hub / github.com/chrxh/alien / calcObjectsPerSecond

Method calcObjectsPerSecond

source/Gui/TableLiveStatistics.cpp:55–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55float TableLiveStatistics::calcObjectsPerSecond(ColorVector<uint64_t> const& lastCount, ColorVector<uint64_t> const& currentCount) const
56{
57 auto currentCreatedObjects = sum(currentCount);
58 auto lastCreatedObjects = sum(lastCount);
59 return (toFloat(currentCreatedObjects) - toFloat(lastCreatedObjects))
60 / toFloat(std::chrono::duration_cast<std::chrono::milliseconds>(*_currentDataTimepoint - *_lastDataTimepoint).count()) * TimeInterval;
61}

Callers

nothing calls this directly

Calls 2

sumFunction · 0.85
toFloatFunction · 0.85

Tested by

no test coverage detected