summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvvvv <[email protected]>2024-12-23 15:31:53 +0300
committervvvv <[email protected]>2024-12-23 16:27:28 +0300
commit17b4a6629c276485d889d170214297f449f519ec (patch)
treec9a47b68099fb710e214c60ce05e738c031b0782
parentfac5ce91c704b4a1d3aa2f059842df3ba3a955bd (diff)
Added perf logging for module resolver & pg catalog, optimized minirun startup
commit_hash:237bc86990bc2c17750829f6259280927edeb282
-rw-r--r--yql/essentials/core/services/mounts/ya.make1
-rw-r--r--yql/essentials/core/services/mounts/yql_mounts.cpp2
-rw-r--r--yql/essentials/parser/pg_catalog/catalog.cpp3
-rw-r--r--yql/essentials/parser/pg_catalog/ya.make1
-rw-r--r--yql/essentials/tools/minirun/minirun.cpp1
-rw-r--r--yql/essentials/tools/yql_facade_run/yql_facade_run.cpp2
-rw-r--r--yql/essentials/tools/yql_facade_run/yql_facade_run.h1
7 files changed, 10 insertions, 1 deletions
diff --git a/yql/essentials/core/services/mounts/ya.make b/yql/essentials/core/services/mounts/ya.make
index 660204f3653..f6180eef6ea 100644
--- a/yql/essentials/core/services/mounts/ya.make
+++ b/yql/essentials/core/services/mounts/ya.make
@@ -9,6 +9,7 @@ PEERDIR(
library/cpp/resource
yql/essentials/core/user_data
yql/essentials/core
+ yql/essentials/utils/log
)
YQL_LAST_ABI_VERSION()
diff --git a/yql/essentials/core/services/mounts/yql_mounts.cpp b/yql/essentials/core/services/mounts/yql_mounts.cpp
index 7d4052e8c8c..683a7fe84b3 100644
--- a/yql/essentials/core/services/mounts/yql_mounts.cpp
+++ b/yql/essentials/core/services/mounts/yql_mounts.cpp
@@ -1,6 +1,7 @@
#include "yql_mounts.h"
#include <yql/essentials/core/yql_library_compiler.h>
+#include <yql/essentials/utils/log/profile.h>
#include <library/cpp/resource/resource.h>
@@ -117,6 +118,7 @@ namespace NYql {
bool optimizeLibraries,
THolder<TExprContext> ownedCtx)
{
+ YQL_PROFILE_FUNC(DEBUG);
auto ctx = rawCtx ? rawCtx : ownedCtx.Get();
Y_ENSURE(ctx);
TUserDataTable mounts;
diff --git a/yql/essentials/parser/pg_catalog/catalog.cpp b/yql/essentials/parser/pg_catalog/catalog.cpp
index c631fca46bf..40a2d3a52b9 100644
--- a/yql/essentials/parser/pg_catalog/catalog.cpp
+++ b/yql/essentials/parser/pg_catalog/catalog.cpp
@@ -1,5 +1,6 @@
#include "catalog.h"
#include <yql/essentials/parser/pg_catalog/proto/pg_catalog.pb.h>
+#include <yql/essentials/utils/log/profile.h>
#include <util/generic/array_size.h>
#include <util/generic/utility.h>
#include <util/generic/hash.h>
@@ -3649,6 +3650,7 @@ ISqlLanguageParser* GetSqlLanguageParser() {
}
void LoadSystemFunctions(ISystemFunctionsParser& parser) {
+ YQL_PROFILE_FUNC(DEBUG);
auto& catalog = TCatalog::MutableInstance();
with_lock (catalog.ExtensionsGuard) {
if (catalog.State->SystemFunctionInit) {
@@ -3684,6 +3686,7 @@ void LoadSystemFunctions(ISystemFunctionsParser& parser) {
void RegisterExtensions(const TVector<TExtensionDesc>& extensions, bool typesOnly,
IExtensionSqlParser& parser, IExtensionLoader* loader) {
+ YQL_PROFILE_FUNC(DEBUG);
if (extensions.size() > MaximumExtensionsCount) {
throw yexception() << "Too many extensions: " << extensions.size();
}
diff --git a/yql/essentials/parser/pg_catalog/ya.make b/yql/essentials/parser/pg_catalog/ya.make
index f9aefb43aa6..815bcaa3408 100644
--- a/yql/essentials/parser/pg_catalog/ya.make
+++ b/yql/essentials/parser/pg_catalog/ya.make
@@ -23,6 +23,7 @@ PEERDIR(
yql/essentials/public/issue
library/cpp/digest/md5
yql/essentials/parser/pg_catalog/proto
+ yql/essentials/utils/log
)
END()
diff --git a/yql/essentials/tools/minirun/minirun.cpp b/yql/essentials/tools/minirun/minirun.cpp
index 0d4fedfd9a4..1282212bb2c 100644
--- a/yql/essentials/tools/minirun/minirun.cpp
+++ b/yql/essentials/tools/minirun/minirun.cpp
@@ -11,6 +11,7 @@ public:
{
GetRunOptions().UseRepeatableRandomAndTimeProviders = true;
GetRunOptions().ResultsFormat = NYson::EYsonFormat::Pretty;
+ GetRunOptions().OptimizeLibs = false;
GetRunOptions().AddOptExtension([this](NLastGetopt::TOpts& opts) {
opts.AddLongOption("ndebug", "Do not show debug info in error output").NoArgument().SetFlag(&GetRunOptions().NoDebug);
diff --git a/yql/essentials/tools/yql_facade_run/yql_facade_run.cpp b/yql/essentials/tools/yql_facade_run/yql_facade_run.cpp
index 6e6167582f3..2db2f62607b 100644
--- a/yql/essentials/tools/yql_facade_run/yql_facade_run.cpp
+++ b/yql/essentials/tools/yql_facade_run/yql_facade_run.cpp
@@ -573,7 +573,7 @@ int TFacadeRunner::DoMain(int argc, const char *argv[]) {
moduleResolver = std::make_shared<TModuleResolver>(std::move(modules), ctx.NextUniqueId, ClusterMapping_, RunOptions_.SqlFlags, RunOptions_.Mode >= ERunMode::Validate);
} else {
- if (!GetYqlDefaultModuleResolver(ctx, moduleResolver, ClusterMapping_, RunOptions_.Mode >= ERunMode::Validate)) {
+ if (!GetYqlDefaultModuleResolver(ctx, moduleResolver, ClusterMapping_, RunOptions_.OptimizeLibs && RunOptions_.Mode >= ERunMode::Validate)) {
*RunOptions_.ErrStream << "Errors loading default YQL libraries:" << Endl;
ctx.IssueManager.GetIssues().PrintTo(*RunOptions_.ErrStream);
return -1;
diff --git a/yql/essentials/tools/yql_facade_run/yql_facade_run.h b/yql/essentials/tools/yql_facade_run/yql_facade_run.h
index f5e1fd5bd2a..b586370c2db 100644
--- a/yql/essentials/tools/yql_facade_run/yql_facade_run.h
+++ b/yql/essentials/tools/yql_facade_run/yql_facade_run.h
@@ -127,6 +127,7 @@ public:
bool EnableResultPosition = false;
bool EnableCredentials = false;
bool EnableQPlayer = false;
+ bool OptimizeLibs = true;
void Parse(int argc, const char *argv[]);