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

[DOP-18570] Implement SparkMetricsRecorder #302

Merged
merged 1 commit into from
Aug 9, 2024
Merged

Conversation

dolfinus
Copy link
Member

@dolfinus dolfinus commented Aug 6, 2024

Change Summary

  • Implement SparkListener which captures events for object chain execution -> job -> stage -> task. It also records raw metrics for tasks, stages and executions od metric values.
  • Implement SparkMetricsCollector which converts raw metrics to a set of models with human-readable representation of metric values.
  • Add unit tests for metric classes.
  • Add integration tests for all classes and methods which may read or write dataframe. Tests are a bit flaky, as metrics sometimes appear long after execution was finished.

DBWriter and FileDFWriter will be modified in a separated PR: #303

Related issue number

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 96.47436% with 22 lines in your changes missing coverage. Please review.

Project coverage is 94.96%. Comparing base (c4a9cb8) to head (8b5c8b0).
Report is 58 commits behind head on develop.

Files with missing lines Patch % Lines
onetl/_metrics/listener/stage.py 86.95% 3 Missing and 3 partials ⚠️
onetl/_metrics/listener/execution.py 92.53% 4 Missing and 1 partial ⚠️
onetl/_metrics/listener/job.py 93.10% 3 Missing and 1 partial ⚠️
onetl/_metrics/listener/listener.py 96.38% 1 Missing and 2 partials ⚠️
onetl/_metrics/listener/task.py 96.07% 2 Missing ⚠️
onetl/_metrics/driver.py 95.65% 0 Missing and 1 partial ⚠️
onetl/_metrics/listener/base.py 97.29% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #302      +/-   ##
===========================================
+ Coverage    94.84%   94.96%   +0.12%     
===========================================
  Files          210      225      +15     
  Lines         8200     8823     +623     
  Branches      1413     1507      +94     
===========================================
+ Hits          7777     8379     +602     
- Misses         299      312      +13     
- Partials       124      132       +8     

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

@dolfinus dolfinus added the ci:skip-changelog Add this label to skip changelog file check label Aug 7, 2024
@dolfinus dolfinus marked this pull request as ready for review August 7, 2024 20:33
@dolfinus dolfinus changed the title [DOP-18570] Collect Spark metrics in DBWriter and FileDFWriter [DOP-18570] Implement SparkMetricsRecorder Aug 8, 2024
@dolfinus dolfinus merged commit abff632 into develop Aug 9, 2024
38 checks passed
@dolfinus dolfinus deleted the feature/DOP-18570 branch August 9, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:skip-changelog Add this label to skip changelog file check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants