aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspuchin <spuchin@ydb.tech>2022-12-02 14:22:19 +0300
committerspuchin <spuchin@ydb.tech>2022-12-02 14:22:19 +0300
commit4cfba536de50c1bdd5e60bdb52bfe2f70b1609f5 (patch)
treef4775de17ff51b9c2c423366606cd2dfd2fa554f
parent62dad62b0c3eb7c816918851bf628dff8cd014bb (diff)
downloadydb-4cfba536de50c1bdd5e60bdb52bfe2f70b1609f5.tar.gz
Add stats mode profile option to ydb query exec command. ()
-rw-r--r--ydb/public/lib/ydb_cli/commands/ydb_service_table.cpp3
-rw-r--r--ydb/public/lib/ydb_cli/common/query_stats.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/ydb/public/lib/ydb_cli/commands/ydb_service_table.cpp b/ydb/public/lib/ydb_cli/commands/ydb_service_table.cpp
index 0b3a7dc0b4..9b401976fd 100644
--- a/ydb/public/lib/ydb_cli/commands/ydb_service_table.cpp
+++ b/ydb/public/lib/ydb_cli/commands/ydb_service_table.cpp
@@ -539,7 +539,8 @@ void TCommandExecuteQuery::PrintScanQueryResponse(NTable::TScanQueryPartIterator
if (fullStats) {
Cout << Endl << "Full statistics:" << Endl;
- TQueryPlanPrinter queryPlanPrinter(EOutputFormat::Pretty, /* analyzeMode */ true);
+
+ TQueryPlanPrinter queryPlanPrinter(OutputFormat, /* analyzeMode */ true);
queryPlanPrinter.Print(*fullStats);
}
diff --git a/ydb/public/lib/ydb_cli/common/query_stats.cpp b/ydb/public/lib/ydb_cli/common/query_stats.cpp
index b53f8e746e..d6669cb575 100644
--- a/ydb/public/lib/ydb_cli/common/query_stats.cpp
+++ b/ydb/public/lib/ydb_cli/common/query_stats.cpp
@@ -15,6 +15,8 @@ NTable::ECollectQueryStatsMode ParseQueryStatsMode(const TString& statsMode,
return NTable::ECollectQueryStatsMode::Basic;
} else if (statsMode == "full") {
return NTable::ECollectQueryStatsMode::Full;
+ } else if (statsMode == "profile") {
+ return NTable::ECollectQueryStatsMode::Profile;
} else {
throw TMisuseException() << "Unknown stats collection mode.";
}