Skip to content

Commit

Permalink
Merge 0d4f0bc into 4e84252
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriyPA authored Jul 9, 2024
2 parents 4e84252 + 0d4f0bc commit 1a3af51
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ydb/tests/tools/kqprun/kqprun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,13 @@ void RunArgumentQueries(const TExecutionOptions& executionOptions, NKqpRun::TKqp
Cout << "..." << colors.Default() << Endl;
}

TInstant startTime = TInstant::Now();
switch (executionCase) {
case TExecutionOptions::EExecutionCase::GenericScript:
if (!runner.ExecuteScript(executionOptions.ScriptQueries[id], executionOptions.ScriptQueryAction, executionOptions.TraceId)) {
ythrow yexception() << TInstant::Now().ToIsoStringLocal() << " Script execution failed";
} else {
Cout << colors.Cyan() << "Script request finished. Time: " << TInstant::Now() - startTime << colors.Default() << Endl;
}
Cout << colors.Yellow() << TInstant::Now().ToIsoStringLocal() << " Fetching script results..." << colors.Default() << Endl;
if (!runner.FetchScriptResults()) {
Expand All @@ -110,12 +113,16 @@ void RunArgumentQueries(const TExecutionOptions& executionOptions, NKqpRun::TKqp
case TExecutionOptions::EExecutionCase::GenericQuery:
if (!runner.ExecuteQuery(executionOptions.ScriptQueries[id], executionOptions.ScriptQueryAction, executionOptions.TraceId)) {
ythrow yexception() << TInstant::Now().ToIsoStringLocal() << " Query execution failed";
} else {
Cout << colors.Cyan() << "Generic request finished. Time: " << TInstant::Now() - startTime << colors.Default() << Endl;
}
break;

case TExecutionOptions::EExecutionCase::YqlScript:
if (!runner.ExecuteYqlScript(executionOptions.ScriptQueries[id], executionOptions.ScriptQueryAction, executionOptions.TraceId)) {
ythrow yexception() << TInstant::Now().ToIsoStringLocal() << " Yql script execution failed";
} else {
Cout << colors.Cyan() << "Yql script request finished. Time: " << TInstant::Now() - startTime << colors.Default() << Endl;
}
break;

Expand Down

0 comments on commit 1a3af51

Please sign in to comment.