aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorudovichenko-r <udovichenko-r@yandex-team.com>2024-11-14 16:57:57 +0300
committerudovichenko-r <udovichenko-r@yandex-team.com>2024-11-14 17:12:59 +0300
commitcaec531a3fa9fa1aa41cedffbe8e3e9022f28278 (patch)
tree956e1cfeb3637f83eb447770301e89c098ca4bef
parenta0506be2d269b58ae3a0170a66e5c38bbe28c741 (diff)
downloadydb-caec531a3fa9fa1aa41cedffbe8e3e9022f28278.tar.gz
More compact ExpandApply logging
Example of new logging: ``` [perf] yql_expr_optimize.cpp:540: Execution of [ExpandApply] took 20.9ms ``` commit_hash:701cc78f48eee1a8c0f824edb6a9310fd348ba92
-rw-r--r--yql/essentials/core/yql_expr_optimize.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/yql/essentials/core/yql_expr_optimize.cpp b/yql/essentials/core/yql_expr_optimize.cpp
index 28dcd18c12..91608eed80 100644
--- a/yql/essentials/core/yql_expr_optimize.cpp
+++ b/yql/essentials/core/yql_expr_optimize.cpp
@@ -4,6 +4,7 @@
#include "yql_expr_type_annotation.h"
#include <yql/essentials/utils/log/log.h>
+#include <yql/essentials/utils/log/profile.h>
namespace NYql {
@@ -343,7 +344,7 @@ namespace {
}
}
- void VisitExprLambdasLastInternal(const TExprNode::TPtr& node,
+ void VisitExprLambdasLastInternal(const TExprNode::TPtr& node,
const TExprVisitPtrFunc& preLambdaFunc,
const TExprVisitPtrFunc& postLambdaFunc,
TNodeSet& visitedNodes)
@@ -357,9 +358,9 @@ namespace {
VisitExprLambdasLastInternal(child, preLambdaFunc, postLambdaFunc, visitedNodes);
}
}
-
+
preLambdaFunc(node);
-
+
for (auto child : node->Children()) {
if (child->IsLambda()) {
VisitExprLambdasLastInternal(child, preLambdaFunc, postLambdaFunc, visitedNodes);
@@ -536,7 +537,7 @@ IGraphTransformer::TStatus ExpandApply(const TExprNode::TPtr& input, TExprNode::
if (ctx.Step.IsDone(TExprStep::ExpandApplyForLambdas))
return IGraphTransformer::TStatus::Ok;
- YQL_CLOG(DEBUG, Core) << "Start ExpandApply";
+ YQL_PROFILE_SCOPE(DEBUG, "ExpandApply");
TOptimizeExprSettings settings(nullptr);
auto ret = OptimizeExpr(input, output, [&](const TExprNode::TPtr& node, bool& changed, TExprContext& ctx) -> TExprNode::TPtr {
if (node->Content() == "WithOptionalArgs") {
@@ -858,7 +859,6 @@ IGraphTransformer::TStatus ExpandApply(const TExprNode::TPtr& input, TExprNode::
ctx.Step.Done(TExprStep::ExpandApplyForLambdas);
}
- YQL_CLOG(DEBUG, Core) << "Finish ExpandApply";
return ret;
}
@@ -910,7 +910,7 @@ void VisitExpr(const TExprNode& root, const TExprVisitRefFunc& preFunc, const TE
void VisitExpr(const TExprNode::TPtr& root, const TExprVisitPtrFunc& func, TNodeSet& visitedNodes) {
VisitExprInternal(root, func, {}, visitedNodes);
}
-
+
void VisitExprLambdasLast(const TExprNode::TPtr& root, const TExprVisitPtrFunc& preLambdaFunc, const TExprVisitPtrFunc& postLambdaFunc)
{
TNodeSet visitedNodes;