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

Add metrics for number of rows/bytes materialized while running subqueries #16835

Merged
merged 3 commits into from
Aug 5, 2024

Conversation

LakshSingla
Copy link
Contributor

@LakshSingla LakshSingla commented Aug 2, 2024

Description

This PR adds the metrics to analyze the size of the results materialized by the subquery's results on the heap. The following metrics are added:

subquery/rows - Number of rows produced by the subquery
subquery/bytes - Bytes produced by the subquery

Both the metrics have id and subQueryId in the dimensions.

Release note

subquery/rows and subquery/bytes metrics have been added, which indicate the size of the results materialized on the heap.


Key changed/added classes in this PR

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

SubqueryCountStatsProvider subqueryStatsProvider
final boolean useNestedForUnknownTypeInSubquery,
final SubqueryCountStatsProvider subqueryStatsProvider,
final boolean emitMetrics,
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please java doc why this dryRun flag is needed

@LakshSingla LakshSingla merged commit 0411c4e into apache:master Aug 5, 2024
88 checks passed
@LakshSingla LakshSingla deleted the subquery-metrics branch August 5, 2024 08:43
@kfaraz kfaraz added this to the 31.0.0 milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants