Skip to content
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

explain: hide contention time when it's zero #143659

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yuzefovich
Copy link
Member

@yuzefovich yuzefovich commented Mar 28, 2025

This commit updates the EXPLAIN logic to hide KV contention time, KV lock wait time, and KV latch wait time fields if they are zero (either because there was no contention or because there was but very short so that it was rounded down to 0µs).

Note that we still will include the top-level "contention time" information.

Epic: None
Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

This commit updates the EXPLAIN logic to hide `KV contention time`, `KV
lock wait time`, and `KV latch wait time` fields if they are zero
(either because there was no contention or because there was but very
short so that it was rounded down to 0µs).

Note that we still will include the top-level "contention time"
information.

Release note: None
@yuzefovich yuzefovich force-pushed the explain-cleanup branch 4 times, most recently from 0961959 to d4e18c8 Compare April 1, 2025 03:17
@yuzefovich yuzefovich changed the title WIP on hiding zero contention time explain: hide contention time when it's zero Apr 1, 2025
@cockroachdb cockroachdb deleted a comment from blathers-crl bot Apr 1, 2025
@yuzefovich yuzefovich requested a review from DrewKimball April 1, 2025 03:19
@yuzefovich yuzefovich marked this pull request as ready for review April 1, 2025 03:19
@yuzefovich yuzefovich requested a review from a team as a code owner April 1, 2025 03:19
Copy link
Member Author

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @DrewKimball)


-- commits line 4 at r2:
I wonder whether we should still show zero contention information in VERBOSE mode, thoughts? I'm leaning towards not showing to make existing output more useful (I think we could apply the same rationale for hiding zeroes to some other things, e.g. "max sql temp disk usage").

Copy link
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: Thanks for doing this! This cleans things up nicely.

Reviewed 18 of 18 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @yuzefovich)


-- commits line 4 at r2:

Previously, yuzefovich (Yahor Yuzefovich) wrote…

I wonder whether we should still show zero contention information in VERBOSE mode, thoughts? I'm leaning towards not showing to make existing output more useful (I think we could apply the same rationale for hiding zeroes to some other things, e.g. "max sql temp disk usage").

Not showing even in VERBOSE mode SGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants