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

Use brief explain stats #7355

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

Conversation

mkindahl
Copy link
Contributor

@mkindahl mkindahl commented Oct 17, 2024

Use a more compact and easy to read version for the decompression and arrow array cache stats and simplify the code.

Disable-check: force-changelog-file

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 6 lines in your changes missing coverage. Please review.

Project coverage is 82.09%. Comparing base (59f50f2) to head (675f2f4).
Report is 619 commits behind head on main.

Files with missing lines Patch % Lines
tsl/src/hypercore/arrow_cache_explain.c 81.81% 2 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7355      +/-   ##
==========================================
+ Coverage   80.06%   82.09%   +2.03%     
==========================================
  Files         190      230      +40     
  Lines       37181    43145    +5964     
  Branches     9450    10853    +1403     
==========================================
+ Hits        29770    35422    +5652     
- Misses       2997     3397     +400     
+ Partials     4414     4326      -88     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@mkindahl mkindahl marked this pull request as ready for review October 17, 2024 06:30
@mkindahl mkindahl self-assigned this Oct 17, 2024
@mkindahl mkindahl force-pushed the hypercore-brief-array-stats branch 2 times, most recently from bf29758 to 8f68c55 Compare October 19, 2024 11:24
@mkindahl mkindahl force-pushed the hypercore-brief-array-stats branch 2 times, most recently from 4d48cfb to 8262b48 Compare November 22, 2024 09:22
Comment on lines +101 to +115
ExplainOpenGroup("Array Cache", "Arrow Array Cache", true, es);
ExplainPropertyInteger("hits", NULL, decompress_cache_stats.hits, es);
ExplainPropertyInteger("misses", NULL, decompress_cache_stats.misses, es);
ExplainPropertyInteger("evictions", NULL, decompress_cache_stats.evictions, es);
ExplainCloseGroup("Array Cache", "Arrow Array Cache", true, es);

ExplainOpenGroup("Array Decompress", "Arrow Array Decompress", true, es);
ExplainPropertyInteger("count", NULL, decompress_cache_stats.decompressions, es);
if (es->verbose)
ExplainPropertyInteger("calls",
NULL,
decompress_cache_stats.decompress_calls,
es);
ExplainCloseGroup("Array Decompress", "Arrow Array Decompress", true, es);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to add tests for other EXPLAIN output format than TEXT

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added one for JSON, which should get better coverage here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like we also need to test using VERBOSE on the explain to fully cover the code paths

Use a more compact and easy to read version for the decompression and
arrow array cache stats. Also simplify the code and the tests to remove
unnecessary parts.
if (has_decompress_data)
appendStringInfoString(es->str, ", decompress");
append_if_positive(es->str, "count", decompress_cache_stats.decompressions);
append_if_positive(es->str, "calls", decompress_cache_stats.decompress_calls);
Copy link
Contributor

@fabriziomello fabriziomello Nov 22, 2024

Choose a reason for hiding this comment

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

Shouldn't this calls be added only when es->verbose==true like in non-text format?

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.

2 participants