starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

[Enhancement] More accurate statistics on DataCache hit rate

Open Smith-Cruise opened this issue 10 months ago • 3 comments

Why I'm doing:

We already exposed the cache hit rate in https://github.com/StarRocks/starrocks/pull/40220, but it's result can't reflect the actual situation.

What I'm doing:

Improve it

What type of PR is this:

  • [ ] BugFix
  • [ ] Feature
  • [x] Enhancement
  • [ ] Refactor
  • [ ] UT
  • [ ] Doc
  • [ ] Tool

Does this PR entail a change in behavior?

  • [ ] Yes, this PR will result in a change in behavior.
  • [x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • [ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • [ ] Parameter changes: default values, similar parameters but with different default values
  • [ ] Policy changes: use new policy to replace old one, functionality automatically enabled
  • [ ] Feature removed
  • [ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • [x] I have added test cases for my bug fix or my new feature
  • [ ] This pr needs user documentation (for new or modified features or behaviors)
    • [ ] I have added documentation for my new feature or new function
  • [ ] This is a backport pr

Bugfix cherry-pick branch check:

  • [x] I have checked the version labels which the pr will be auto-backported to the target branch
    • [x] 3.3
    • [x] 3.2
    • [ ] 3.1
    • [ ] 3.0
    • [ ] 2.5

Smith-Cruise avatar Apr 19 '24 07:04 Smith-Cruise

[FE Incremental Coverage Report]

:x: fail : 124 / 160 (77.50%)

file detail

path covered_line new_line coverage not_covered_line_detail
:large_blue_circle: com/starrocks/sql/ast/AstVisitor.java 0 1 00.00% [842]
:large_blue_circle: com/starrocks/sql/analyzer/DataCacheStmtAnalyzer.java 0 5 00.00% [147, 148, 151, 152, 154]
:large_blue_circle: com/starrocks/statistic/StatisticsMetaManager.java 0 3 00.00% [274, 368, 369]
:large_blue_circle: com/starrocks/qe/SessionVariable.java 6 12 50.00% [2184, 2188, 2189, 2192, 2196, 2197]
:large_blue_circle: com/starrocks/datacache/statistic/AccessItem.java 13 24 54.17% [60, 65, 66, 68, 69, 71, 72, 73, 74, 75, 80]
:large_blue_circle: com/starrocks/datacache/statistic/DataCacheCopilotCollector.java 35 40 87.50% [36, 65, 66, 77, 78]
:large_blue_circle: com/starrocks/datacache/statistic/CachedFrequencyStatisticStorage.java 39 43 90.70% [29, 72, 93, 96]
:large_blue_circle: com/starrocks/datacache/statistic/CacheSelectSQLBuilder.java 13 14 92.86% [17]
:large_blue_circle: com/starrocks/sql/StatementPlanner.java 2 2 100.00% []
:large_blue_circle: com/starrocks/sql/ast/ShowDataCacheSelectRecommendationsStmt.java 8 8 100.00% []
:large_blue_circle: com/starrocks/qe/ShowExecutor.java 8 8 100.00% []

github-actions[bot] avatar Apr 24 '24 07:04 github-actions[bot]

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

sonarqubecloud[bot] avatar Apr 24 '24 07:04 sonarqubecloud[bot]

[BE Incremental Coverage Report]

:white_check_mark: pass : 41 / 45 (91.11%)

file detail

path covered_line new_line coverage not_covered_line_detail
:large_blue_circle: be/src/block_cache/block_cache.cpp 4 5 80.00% [48]
:large_blue_circle: be/src/io/cache_input_stream.cpp 15 17 88.24% [484, 485]
:large_blue_circle: be/src/util/bitmap.h 10 11 90.91% [61]
:large_blue_circle: be/src/http/action/datacache_action.cpp 2 2 100.00% []
:large_blue_circle: be/src/connector/hive_connector.cpp 2 2 100.00% []
:large_blue_circle: be/src/exec/hdfs_scanner.cpp 4 4 100.00% []
:large_blue_circle: be/src/block_cache/block_cache.h 4 4 100.00% []

github-actions[bot] avatar Apr 24 '24 07:04 github-actions[bot]