MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / testWindowResetsAfterSummary

Function testWindowResetsAfterSummary

tests/perf_telemetry_test.cpp:150–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148// --- Window state does not leak across summaries ----------------------------
149
150void 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

Callers 1

mainFunction · 0.85

Calls 6

primeFunction · 0.85
flushSummaryFunction · 0.85
resetCaptureFunction · 0.85
fieldValueFunction · 0.85
recordPanUpdateMethod · 0.80
reportFunction · 0.70

Tested by

no test coverage detected