| 148 | // --- Window state does not leak across summaries ---------------------------- |
| 149 | |
| 150 | void testWindowResetsAfterSummary() |
| 151 | { |
| 152 | constexpr qint64 t0 = 10'000'000'000LL; |
| 153 | prime(t0); |
| 154 | |
| 155 | PerfTelemetry::instance().recordPanUpdate(5.0); |
| 156 | PerfTelemetry::instance().recordPanUpdate(6.0); |
| 157 | PerfTelemetry::instance().recordPanUpdate(7.0); |
| 158 | (void)flushSummary(t0); |
| 159 | |
| 160 | constexpr qint64 t1 = t0 + 1'100'000'000LL; |
| 161 | resetCapture(); |
| 162 | PerfTelemetry::setClockOverrideForTest(t1); |
| 163 | PerfTelemetry::instance().recordPanUpdate(1.0); |
| 164 | |
| 165 | const QString summary = flushSummary(t1); |
| 166 | const QString p95 = fieldValue(summary, QStringLiteral("panUpdateP95Ms")); |
| 167 | // Second window saw only 1.0 (the recordPanFrame in flushSummary adds |
| 168 | // nothing to panUpdateMs), so the prior 5/6/7 samples must be gone. |
| 169 | report("window state does not bleed across summaries", |
| 170 | p95 == QLatin1String("1.0"), |
| 171 | std::string("got '") + p95.toStdString() + "'"); |
| 172 | } |
| 173 | |
| 174 | // --- Stall threshold matrix ------------------------------------------------- |
| 175 |
no test coverage detected