MCPcopy Create free account
hub / github.com/bytedance/bolt / printCoverageMapForMostUsed

Function printCoverageMapForMostUsed

bolt/functions/CoverageUtil.cpp:483–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483void printCoverageMapForMostUsed(const std::string& domain) {
484 auto scalarNameList = readFunctionNamesFromFile("all_scalar_functions.txt");
485 std::unordered_set<std::string> scalarNames(
486 scalarNameList.begin(), scalarNameList.end());
487
488 auto aggNameList = readFunctionNamesFromFile("all_aggregate_functions.txt");
489 std::unordered_set<std::string> aggNames(
490 aggNameList.begin(), aggNameList.end());
491
492 auto windowNameList = readFunctionNamesFromFile("all_window_functions.txt");
493 std::unordered_set<std::string> windowNames(
494 windowNameList.begin(), windowNameList.end());
495
496 auto allMostUsed = readFunctionNamesFromFile("most_used_functions.txt");
497 std::vector<std::string> scalarMostUsed;
498 std::copy_if(
499 allMostUsed.begin(),
500 allMostUsed.end(),
501 std::back_inserter(scalarMostUsed),
502 [&](auto name) { return scalarNames.count(name) > 0; });
503
504 std::vector<std::string> aggMostUsed;
505 std::copy_if(
506 allMostUsed.begin(),
507 allMostUsed.end(),
508 std::back_inserter(aggMostUsed),
509 [&](auto name) { return aggNames.count(name) > 0; });
510
511 std::vector<std::string> windowMostUsed;
512 std::copy_if(
513 allMostUsed.begin(),
514 allMostUsed.end(),
515 std::back_inserter(windowMostUsed),
516 [&](auto name) { return windowNames.count(name) > 0; });
517
518 printCoverageMap(scalarMostUsed, aggMostUsed, windowMostUsed, domain);
519}
520
521} // namespace bytedance::bolt::functions

Callers 1

mainFunction · 0.85

Calls 5

printCoverageMapFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected