QcTickStats Class
Timing of the server ticks: how long they ran, how late they started against their due time on the tick grid (QcTickScheduler), and how many were skipped. More...
| Header: | #include <server/tick/QcTickStats.h> |
Public Types
Public Functions
| void | addPhases(const std::array<qint64, QcTickPhases::count> &phaseNs) |
| void | addSkipped(quint64 count) |
| void | record(qint64 lateNs, qint64 durationNs) |
| void | reset() |
| quint64 | skipped() const |
| QcTickStats::Summary | summary() const |
Static Public Members
| const qsizetype | maxSamples |
Detailed Description
Written by the server thread, read and reset by others (benchmark); every access takes the mutex.
Member Type Documentation
[alias] QcTickStats::Summary
The summary of the ticks so far.
Member Function Documentation
void QcTickStats::addPhases(const std::array<qint64, QcTickPhases::count> &phaseNs)
Adds phaseNs, the nanoseconds per phase of one tick (QcTickPhaseTimer::lastTick).
void QcTickStats::addSkipped(quint64 count)
Counts count ticks dropped from a backlog.
void QcTickStats::record(qint64 lateNs, qint64 durationNs)
Records a tick that started lateNs after it was due and ran for durationNs.
void QcTickStats::reset()
Forgets everything recorded.
quint64 QcTickStats::skipped() const
Returns the ticks dropped so far (cheap, unlike summary()).
QcTickStats::Summary QcTickStats::summary() const
Returns the summary of the ticks recorded since the last reset.
Member Variable Documentation
const qsizetype QcTickStats::maxSamples
Lateness samples kept for the percentile (the latest ones; about 55 minutes of ticks).