Fix wall time printed on CLI#18743
Conversation
fgwang7w
left a comment
There was a problem hiding this comment.
LGTM, minor change in update of the comment in presto-cli/src/main/java/com/facebook/presto/cli/StatusPrinter.java#L86
presto-cli/src/main/java/com/facebook/presto/cli/StatusPrinter.java
Outdated
Show resolved
Hide resolved
yingsu00
left a comment
There was a problem hiding this comment.
Anant, thanks for the fix. Based on my previous knowledge, I think the "Release Notes" line can be removed from the PR message, just have the "No release notes" line stay. Not sure if the release bot would be confused seeing both lines.
presto-cli/src/main/java/com/facebook/presto/cli/StatusPrinter.java
Outdated
Show resolved
Hide resolved
|
@aaneja I actually think it might make sense to introduce a new metric for just the execution time. So we have 2 elapsed times: execution + result retrieval, and execution only. When the result is very large, the query may be blocked by the output buffer being full and the client not retrieving the data fast enough. For such cases how is the "execution only" time be evaluated? |
@yingsu00 If you look at the current stats being reported, we're computing all of them from server reported StatementStats. So IMO the execution time reported here should also be the server side execution time. |
94ff5c2 to
39145cf
Compare
Hi @aaneja, I think this change might make the users get confused and make mistakes if we just silently replace the wall time to the serverSideWallTime. They may observe big difference on query's wall time in the next release and mistakenly think it's big perf improvement, but it's actually not. Maybe it'll safer to output both on the CLI. |
|
Actually I think the release note is needed since this is directly user facing. Would you please add a "general change" for it? |
|
Okay let me compute client side time separately as well; note that this different from the currently computed time since that includes time spent in the pager as well. |
514f8fe to
8e8411b
Compare
yingsu00
left a comment
There was a problem hiding this comment.
@aaneja Anant, if you're uncertain about the way how to pass the client stop time to the printer, you could also split this PR into two PRs, with the first keep the way the client time as is, and the second PR to address passing it from the client itself. Then we can approve the first PR first. If you do agree the way I suggested inline, you can just update the PR.
Also please make sure the tests are all green. Thanks.
presto-cli/src/main/java/com/facebook/presto/cli/StatusPrinter.java
Outdated
Show resolved
Hide resolved
a8ab922 to
05728e7
Compare
yingsu00
left a comment
There was a problem hiding this comment.
Mostly looks good, just some nits.
presto-cli/src/main/java/com/facebook/presto/cli/StatusPrinter.java
Outdated
Show resolved
Hide resolved
presto-cli/src/main/java/com/facebook/presto/cli/StatusPrinter.java
Outdated
Show resolved
Hide resolved
|
@yingsu00 I fixed your final comments. Test failures are unrelated to this change. I'm observing identical failures in other PRs |
9f0988a to
1df8a48
Compare
For interactive queries, the wall time reported for final info is misleading, since it will include query execution + time spent iterating through the pager. We instead start tracking & reporting both the client-side and server-side latency
For queries with large number of results, the wall time reported on the CLI is misleading since it includes query execution + time spent iterating through the pager. Using the server side elapsed time makes more sense
Testing done
Run on CLI :
select * from tpch.sf100.lineitem limit 10000;... < Wait 10-12 s on less pager> ..
Before
After