MCPcopy Create free account
hub / github.com/RenderKit/embree / parse_benchmark_list

Method parse_benchmark_list

tutorials/verify/verify.cpp:6978–6998  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6976 }
6977
6978 FileName VerifyApplication::parse_benchmark_list(Ref<ParseStream> cin, std::vector<Ref<Benchmark>>& benchmarks)
6979 {
6980 std::vector<std::string> regexpr;
6981 while (cin->peek() != "" && cin->peek()[0] != '-')
6982 regexpr.push_back(cin->getString());
6983
6984 if (regexpr.size() == 0) throw std::runtime_error("no output file specified");
6985 FileName outFileName = regexpr.back();
6986 regexpr.pop_back();
6987
6988 for (size_t i=0; i<regexpr.size(); i++)
6989 {
6990 map_tests(tests,[&] (Ref<Test> test) {
6991 if (!regex_match(test->name,regexpr[i])) return;
6992 Ref<Benchmark> benchmark = test.dynamicCast<Benchmark>();
6993 if (!benchmark) return;
6994 benchmarks.push_back(benchmark);
6995 });
6996 }
6997 return outFileName;
6998 }
6999
7000 bool VerifyApplication::update_tests(Ref<Test> test)
7001 {

Callers

nothing calls this directly

Calls 5

regex_matchFunction · 0.85
push_backMethod · 0.45
getStringMethod · 0.45
sizeMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected