Skip to content

Commit

Permalink
try..catch on svg processing in benchmarks (#10149)
Browse files Browse the repository at this point in the history
  • Loading branch information
iddqdex authored Oct 7, 2024
1 parent 356eb15 commit 6361cf3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ydb/public/lib/ydb_cli/commands/ydb_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 6361cf3

Please sign in to comment.