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

Method disableConsumers

app/src/Benchmark/HotpathBenchmark.cpp:447–465  ·  view source on GitHub ↗

* @brief Disables every consumer enabled by enableConsumers(), then drains their backlogs. */

Source from the content-addressed store, hash-verified

445 * @brief Disables every consumer enabled by enableConsumers(), then drains their backlogs.
446 */
447void HotpathBenchmark::disableConsumers()
448{
449 CSV::Export::instance().setExportEnabled(false);
450 API::Server::instance().setEnabled(false);
451#ifdef BUILD_COMMERCIAL
452 MDF4::Export::instance().setExportEnabled(false);
453 Sessions::Export::instance().setExportEnabled(false);
454#endif
455#ifdef ENABLE_GRPC
456 API::GRPC::GRPCServer::instance().setEnabled(false);
457#endif
458
459 CSV::Export::instance().flushWorker();
460 API::Server::instance().flushWorker();
461#ifdef BUILD_COMMERCIAL
462 MDF4::Export::instance().flushWorker();
463 Sessions::Export::instance().flushWorker();
464#endif
465}
466
467/**
468 * @brief Marks every plot/FFT/multiplot/waterfall widget running so its sub-hotpath fires.

Callers

nothing calls this directly

Calls 3

flushWorkerMethod · 0.80
setExportEnabledMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected