diff options
author | Олег <150132506+iddqdex@users.noreply.github.com> | 2024-10-07 13:05:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-07 13:05:44 +0300 |
commit | 6361cf3ace49e98879a2eb5405ee72995e8f446d (patch) | |
tree | cc4073431994ff26a95e83a0dad323292a107e02 | |
parent | 356eb15a94ac70aec9abc9d165b4f6d811915ddd (diff) | |
download | ydb-6361cf3ace49e98879a2eb5405ee72995e8f446d.tar.gz |
try..catch on svg processing in benchmarks (#10149)
-rw-r--r-- | ydb/public/lib/ydb_cli/commands/ydb_benchmark.cpp | 8 |
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()) { |