Support for explain containing single runtime instead of planning and execution time.
This commit is contained in:
parent
3dff4dade8
commit
8c077b3d5f
2 changed files with 8 additions and 3 deletions
|
|
@ -64,6 +64,7 @@ ExplainRoot::SPtr ExplainRoot::createFromJson(Json::Value &json)
|
||||||
|
|
||||||
res->planningTime = explain["Planning Time"].asFloat();
|
res->planningTime = explain["Planning Time"].asFloat();
|
||||||
res->executionTime = explain["Execution Time"].asFloat();
|
res->executionTime = explain["Execution Time"].asFloat();
|
||||||
|
res->totalRuntime = explain["Total Runtime"].asFloat();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
|
||||||
|
|
@ -408,8 +408,12 @@ void QueryTab::explain_ready(ExplainRoot::SPtr explain)
|
||||||
m_stopwatch.stop();
|
m_stopwatch.stop();
|
||||||
if (explain) {
|
if (explain) {
|
||||||
addLog("Explain ready");
|
addLog("Explain ready");
|
||||||
QString times_str = QString("Execution time: %1, Planning time: %2")
|
QString times_str;
|
||||||
.arg(
|
if (explain->totalRuntime > 0.f)
|
||||||
|
times_str = QString("Total time: %1").arg(
|
||||||
|
msfloatToHumanReadableString(explain->totalRuntime));
|
||||||
|
else
|
||||||
|
times_str = QString("Execution time: %1, Planning time: %2").arg(
|
||||||
msfloatToHumanReadableString(explain->executionTime)
|
msfloatToHumanReadableString(explain->executionTime)
|
||||||
, msfloatToHumanReadableString(explain->planningTime));
|
, msfloatToHumanReadableString(explain->planningTime));
|
||||||
ui->lblTimes->setText(times_str);
|
ui->lblTimes->setText(times_str);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue