-
Couldn't load subscription status.
- Fork 1.7k
Improve datafusion-cli object store profiling summary display #18085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This is a much improved way to display the summaries! I was agonizing over how to use Rust format padding etc. to build out the table, using a I have a PR queued up that instruments hits main (helps avoid resolving merge conflicts etc). Does it make sense to hold off finalizing these changes until we get |
| assert_snapshot!(RequestSummaries::new(&requests), @r" | ||
| +-----------+----------+-----------+-----------+-----------+-----------+ | ||
| | Operation | Metric | min | max | avg | sum | | ||
| +-----------+----------+-----------+-----------+-----------+-----------+ | ||
| | Get | duration | 5.000000s | 5.000000s | 5.000000s | 5.000000s | | ||
| | Get | size | 100 B | 100 B | 100 B | 100 B | | ||
| +-----------+----------+-----------+-----------+-----------+-----------+ | ||
| "); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These test changes are the only thing that's really caused me to pause and think some. I really like how it's reduced the overall size of the test and improved readability. However, I think it comes with the tradeoff that if there was a regression of some sort that caused the test to fail it's going to be a bit harder to hunt down exactly what's happening since it's now behind a display method implementation. I don't think I have a strong opinion on the "right" path forward here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that now the test (implicitly) also relies on display / conversion behavior which might make it harder to track down
However, given the display output is also the end user API (aka what people will actually see) I think this is actually a good thing (it won't do any good if the summarizing logic is correct, but then it is not displayed correctly)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's a good point. I think there was some discussion about building a machine-readable output, such as JSON, as well. That output would likely require its own set of test cases as it is though, so I think similar justification applies to both.
1f0d3b3 to
851cdb5
Compare
851cdb5 to
0677fe9
Compare
0677fe9 to
5f5de60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small comment that I caught while looking through this. I have no power here, but these changes look good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alamb
WDYT should it be documented?
|
Thank you for the review @comphead
Great suggestion! @BlakeOrth did document the command here: However, it seems to me like maybe an example in the docs would be good. I will add one |
|
Thanks @BlakeOrth and @comphead |
Which issue does this PR close?
datafusion-cli] Add a way to see what object store requests are made #17207Rationale for this change
As suggested by @BlakeOrth in #18045 (comment) here is an attempt to improve the output of datafusion object store trace profiling:
What changes are included in this PR?
Update the output format when
\object_store_profiling summaryis setCurrent format (on main, before this PR):
New format (after this PR):
Are these changes tested?
Yes
Are there any user-facing changes?
Nicer datafusion-cli output