| 419 | } |
| 420 | |
| 421 | std::vector<BenchmarkConfig> BuildBenchmarkConfigs( |
| 422 | const std::vector<std::string>& config_names) { |
| 423 | std::vector<BenchmarkConfig> configs; |
| 424 | configs.reserve(config_names.size() * 2); |
| 425 | for (const std::string& config_name : config_names) { |
| 426 | const std::string source_path = ResolveConfigPath(config_name); |
| 427 | configs.push_back(BenchmarkConfig{config_name + "/ocd2", source_path}); |
| 428 | try { |
| 429 | configs.push_back(BenchmarkConfig{ |
| 430 | config_name + "/text_json", |
| 431 | GetTemporaryTextConfigRegistry().Create(source_path, "text", |
| 432 | "benchmark-text"), |
| 433 | }); |
| 434 | } catch (const FileNotFound&) { |
| 435 | // Some legacy benchmark configs only ship precompiled ocd2 artifacts. |
| 436 | // Skip the text-json variant when there is no source text dictionary. |
| 437 | } |
| 438 | } |
| 439 | return configs; |
| 440 | } |
| 441 | |
| 442 | std::string QuotePath(const std::string& path) { |
| 443 | return "\"" + path + "\""; |
no test coverage detected