aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorОлег <150132506+iddqdex@users.noreply.github.com>2024-10-07 13:05:44 +0300
committerGitHub <noreply@github.com>2024-10-07 13:05:44 +0300
commit6361cf3ace49e98879a2eb5405ee72995e8f446d (patch)
treecc4073431994ff26a95e83a0dad323292a107e02
parent356eb15a94ac70aec9abc9d165b4f6d811915ddd (diff)
downloadydb-6361cf3ace49e98879a2eb5405ee72995e8f446d.tar.gz
try..catch on svg processing in benchmarks (#10149)
-rw-r--r--ydb/public/lib/ydb_cli/commands/ydb_benchmark.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/ydb/public/lib/ydb_cli/commands/ydb_benchmark.cpp b/ydb/public/lib/ydb_cli/commands/ydb_benchmark.cpp
index c6cf7000ca..b98e98bf0d 100644
--- a/ydb/public/lib/ydb_cli/commands/ydb_benchmark.cpp
+++ b/ydb/public/lib/ydb_cli/commands/ydb_benchmark.cpp
@@ -475,9 +475,13 @@ void TWorkloadCommandBenchmark::SavePlans(const BenchmarkUtils::TQueryBenchmarkR
}
{
TPlanVisualizer pv;
- pv.LoadPlans(res.GetQueryPlan());
TFileOutput out(planFName + "svg");
- out << pv.PrintSvgSafe();
+ try {
+ pv.LoadPlans(res.GetQueryPlan());
+ out << pv.PrintSvg();
+ } catch (std::exception& e) {
+ out << "<svg width='1024' height='256' xmlns='http://www.w3.org/2000/svg'><text>" << e.what() << "<text></svg>";
+ }
}
}
if (res.GetPlanAst()) {