* @brief Loads the synthetic project and activates the parse pipeline for the given language. */
| 399 | * @brief Loads the synthetic project and activates the parse pipeline for the given language. |
| 400 | */ |
| 401 | void HotpathBenchmark::setupProject(int language, int channels, bool withStrings, bool dashboard) |
| 402 | { |
| 403 | Q_ASSERT(channels > 0); |
| 404 | |
| 405 | auto& project = DataModel::ProjectModel::instance(); |
| 406 | project.setSuppressMessageBoxes(true); |
| 407 | |
| 408 | AppState::instance().setOperationMode(SerialStudio::ProjectFile); |
| 409 | |
| 410 | const QJsonObject root = dashboard ? buildDashboardProjectJson(language, withStrings) |
| 411 | : buildProjectJson(language, channels, withStrings); |
| 412 | const bool loaded = project.loadFromJsonDocument(QJsonDocument(root)); |
| 413 | Q_ASSERT(loaded); |
| 414 | Q_UNUSED(loaded); |
| 415 | |
| 416 | auto& parser = DataModel::FrameParser::instance(); |
| 417 | parser.setSuppressMessageBoxes(true); |
| 418 | parser.readCode(); |
| 419 | |
| 420 | DataModel::FrameBuilder::instance().syncFromProjectModel(); |
| 421 | |
| 422 | if (dashboard) { |
| 423 | project.setCustomizeWorkspaces(true); |
| 424 | project.setCustomizeWorkspaces(false); |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | /** |
| 429 | * @brief Enables every local export/output consumer (CSV/MDF4/Sessions/API/gRPC). |
nothing calls this directly
no test coverage detected