Skip to content

Commit caec531

Browse files
committed
More compact ExpandApply logging
Example of new logging: ``` [perf] yql_expr_optimize.cpp:540: Execution of [ExpandApply] took 20.9ms ``` commit_hash:701cc78f48eee1a8c0f824edb6a9310fd348ba92
1 parent a0506be commit caec531

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

yql/essentials/core/yql_expr_optimize.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "yql_expr_type_annotation.h"
55

66
#include <yql/essentials/utils/log/log.h>
7+
#include <yql/essentials/utils/log/profile.h>
78

89
namespace NYql {
910

@@ -343,7 +344,7 @@ namespace {
343344
}
344345
}
345346

346-
void VisitExprLambdasLastInternal(const TExprNode::TPtr& node,
347+
void VisitExprLambdasLastInternal(const TExprNode::TPtr& node,
347348
const TExprVisitPtrFunc& preLambdaFunc,
348349
const TExprVisitPtrFunc& postLambdaFunc,
349350
TNodeSet& visitedNodes)
@@ -357,9 +358,9 @@ namespace {
357358
VisitExprLambdasLastInternal(child, preLambdaFunc, postLambdaFunc, visitedNodes);
358359
}
359360
}
360-
361+
361362
preLambdaFunc(node);
362-
363+
363364
for (auto child : node->Children()) {
364365
if (child->IsLambda()) {
365366
VisitExprLambdasLastInternal(child, preLambdaFunc, postLambdaFunc, visitedNodes);
@@ -536,7 +537,7 @@ IGraphTransformer::TStatus ExpandApply(const TExprNode::TPtr& input, TExprNode::
536537
if (ctx.Step.IsDone(TExprStep::ExpandApplyForLambdas))
537538
return IGraphTransformer::TStatus::Ok;
538539

539-
YQL_CLOG(DEBUG, Core) << "Start ExpandApply";
540+
YQL_PROFILE_SCOPE(DEBUG, "ExpandApply");
540541
TOptimizeExprSettings settings(nullptr);
541542
auto ret = OptimizeExpr(input, output, [&](const TExprNode::TPtr& node, bool& changed, TExprContext& ctx) -> TExprNode::TPtr {
542543
if (node->Content() == "WithOptionalArgs") {
@@ -858,7 +859,6 @@ IGraphTransformer::TStatus ExpandApply(const TExprNode::TPtr& input, TExprNode::
858859
ctx.Step.Done(TExprStep::ExpandApplyForLambdas);
859860
}
860861

861-
YQL_CLOG(DEBUG, Core) << "Finish ExpandApply";
862862
return ret;
863863
}
864864

@@ -910,7 +910,7 @@ void VisitExpr(const TExprNode& root, const TExprVisitRefFunc& preFunc, const TE
910910
void VisitExpr(const TExprNode::TPtr& root, const TExprVisitPtrFunc& func, TNodeSet& visitedNodes) {
911911
VisitExprInternal(root, func, {}, visitedNodes);
912912
}
913-
913+
914914
void VisitExprLambdasLast(const TExprNode::TPtr& root, const TExprVisitPtrFunc& preLambdaFunc, const TExprVisitPtrFunc& postLambdaFunc)
915915
{
916916
TNodeSet visitedNodes;

0 commit comments

Comments
 (0)