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

Function addStats

bolt/expression/Expr.cpp:1861–1881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1859 }
1860
1861 for (const auto& input : expr.inputs()) {
1862 addStats(*input, stats, uniqueExprs);
1863 }
1864}
1865} // namespace
1866
1867std::unordered_map<std::string, exec::ExprStats> ExprSet::stats() const {
1868 std::unordered_map<std::string, exec::ExprStats> stats;
1869 std::unordered_set<const exec::Expr*> uniqueExprs;
1870 for (const auto& expr : exprs()) {
1871 addStats(*expr, stats, uniqueExprs);
1872 }
1873
1874 return stats;
1875}
1876
1877ExprSet::~ExprSet() {
1878 exprSetListeners().withRLock([&](auto& listeners) {
1879 if (!listeners.empty()) {
1880 auto exprStats = stats();
1881
1882 std::vector<std::string> sqls;
1883 std::vector<VectorPtr> complexConstants;
1884

Callers 1

statsMethod · 0.70

Calls 6

findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
statsMethod · 0.45
addMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected