Skip to content

[VL] Add storageReads metric to track number of storage read operations#11964

Merged
FelixYBW merged 1 commit into
apache:mainfrom
FelixYBW:add_loads_count_metric
Apr 20, 2026
Merged

[VL] Add storageReads metric to track number of storage read operations#11964
FelixYBW merged 1 commit into
apache:mainfrom
FelixYBW:add_loads_count_metric

Conversation

@FelixYBW

Copy link
Copy Markdown
Contributor

This commit adds a new metric 'storageReads' that counts the number of storage read operations, complementing the existing 'storageReadBytes' metric which tracks the total bytes read.

Changes:

  • Java: Added storageReads field to Metrics.java and OperatorMetrics.java
  • Scala: Added storageReads metric definition in VeloxMetricsApi.scala
  • Scala: Updated BatchScanMetricsUpdater to populate the metric
  • C++: Added kStorageReads to Metrics enum in Metrics.h
  • C++: Updated JniWrapper.cc to pass the metric to Java
  • C++: Updated WholeStageResultIterator.cc to collect the metric using 'count' aggregation on kStorageReadBytes runtime stat

Metric type: SQLMetrics.createMetric (count-based) Follows the pattern from PR #10294 (pageLoadTime metric)

Was this patch authored or co-authored using generative AI tooling?

Yes

@github-actions github-actions Bot added the VELOX label Apr 20, 2026
@FelixYBW FelixYBW force-pushed the add_loads_count_metric branch from 1ed3bf8 to 6afc71e Compare April 20, 2026 00:08
This commit adds a new metric 'storageReads' that counts the number of
storage read operations, complementing the existing 'storageReadBytes'
metric which tracks the total bytes read.

Changes:
- Java: Added storageReads field to Metrics.java and OperatorMetrics.java
- Scala: Added storageReads metric definition in VeloxMetricsApi.scala
- Scala: Updated BatchScanMetricsUpdater to populate the metric
- C++: Added kStorageReads to Metrics enum in Metrics.h
- C++: Updated JniWrapper.cc to pass the metric to Java
- C++: Updated WholeStageResultIterator.cc to collect the metric using
  'count' aggregation on kStorageReadBytes runtime stat

Metric type: SQLMetrics.createMetric (count-based)
Follows the pattern from PR apache#10294 (pageLoadTime metric)
@FelixYBW FelixYBW force-pushed the add_loads_count_metric branch from 6afc71e to c2fd9e9 Compare April 20, 2026 00:10

@zhouyuan zhouyuan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@FelixYBW FelixYBW merged commit 52dd67c into apache:main Apr 20, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants