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

[optimizer] report per-transform metrics #30806

Merged
merged 9 commits into from
Dec 12, 2024

Conversation

mgree
Copy link
Contributor

@mgree mgree commented Dec 12, 2024

Adds metrics for per-transform information (how often did the transform fire? how often did it change the AST?); enrich the end-to-end optimization time metric to add log-lines with per-transform timing information, which should aid in debugging.

Designed with advice from @antiguru.

Motivation

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@mgree mgree requested a review from antiguru December 12, 2024 15:36
@mgree mgree requested review from a team as code owners December 12, 2024 15:36
@mgree mgree requested a review from jkosh44 December 12, 2024 15:36
Copy link
Contributor

@jkosh44 jkosh44 left a comment

Choose a reason for hiding this comment

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

Adapter changes LGTM

src/sql/src/optimizer_metrics.rs Outdated Show resolved Hide resolved
src/transform/src/lib.rs Outdated Show resolved Hide resolved
Copy link

shepherdlybot bot commented Dec 12, 2024

Risk Score:80 / 100 Bug Hotspots:1 Resilience Coverage:33%

Mitigations

Completing required mitigations increases Resilience Coverage.

  • (Required) Code Review 🔍 Detected
  • (Required) Feature Flag
  • (Required) Integration Test 🔍 Detected
  • (Required) Observability
  • (Required) QA Review
  • (Required) Run Nightly Tests
  • Unit Test
Risk Summary:

The pull request has a high risk score of 80, driven by predictors such as the "Sum Bug Reports Of Files" and "Delta of Executable Lines." Historically, PRs with these predictors are 115% more likely to cause a bug compared to the repository baseline. Although the observed and predicted bug trends in the repository are both decreasing, the presence of one file hotspot suggests a need for careful review.

Note: The risk score is not based on semantic analysis but on historical predictors of bug occurrence in the repository. The attributes above were deemed the strongest predictors based on that history. Predictors and the score may change as the PR evolves in code, time, and review activity.

Bug Hotspots:
What's This?

File Percentile
../src/coord.rs 100

@mgree mgree merged commit a5355b2 into MaterializeInc:main Dec 12, 2024
80 checks passed
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.

4 participants