MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / spinEventLoop

Function spinEventLoop

app/src/Benchmark/HotpathBenchmark.cpp:152–158  ·  view source on GitHub ↗

* @brief Pumps the GUI event loop once and returns the wall-clock it consumed (discounted from * the measurement so a repaint never deflates throughput). */

Source from the content-addressed store, hash-verified

150 * the measurement so a repaint never deflates throughput).
151 */
152[[nodiscard]] static double spinEventLoop()
153{
154 using Clock = std::chrono::steady_clock;
155 const auto start = Clock::now();
156 QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
157 return std::chrono::duration<double>(Clock::now() - start).count();
158}
159
160//--------------------------------------------------------------------------------------------------
161// Benchmark-active flag (read by UI::Dashboard::streamAvailable)

Callers 2

runDataPipelineMethod · 0.85
runMethod · 0.85

Calls 1

countMethod · 0.45

Tested by

no test coverage detected