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

DM-48600: Add helper function for parsing metadata added by timeMethod #199

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

isullivan
Copy link
Contributor

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.21%. Comparing base (5a2f84e) to head (25533b7).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #199      +/-   ##
==========================================
+ Coverage   94.19%   94.21%   +0.02%     
==========================================
  Files          47       47              
  Lines        3463     3476      +13     
==========================================
+ Hits         3262     3275      +13     
  Misses        201      201              

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

@isullivan isullivan force-pushed the tickets/DM-48600 branch 4 times, most recently from fda5220 to 6d67ac0 Compare January 30, 2025 05:51
@isullivan isullivan force-pushed the tickets/DM-48600 branch 3 times, most recently from dae3749 to 37d54e2 Compare January 30, 2025 06:34
@@ -480,3 +479,33 @@ def profile(filename: str | None, log: LsstLoggers | None = None) -> Iterator[cP
profile.dump_stats(filename)
if log is not None:
log.info("cProfile stats written to %s", filename)


def durationFromTimeMethod(
Copy link
Member

Choose a reason for hiding this comment

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

Please use underscores in names and variables for new functions in this package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@timj Since this is a helper function that works with the results of timeMethod, is the name duration_from_timeMethod OK, or should I just change it to something like calculate_duration?

Copy link
Member

Choose a reason for hiding this comment

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

I can live with duration_from_timeMethod. I should have fixed up the name timeMethod years ago when I migrated the code to the new location. I've been trying to think of other ways to organize this but we are sort of stymied by the historical baggage of timeMethod not knowing what it's updating and so there not being an obvious class that could have this functionality -- TaskMetadata itself is hamstrung by it having to originally be a PropertySet, whereas if we were doign this now we'd have dedicated facilities in TaskMetadata for task execution metadata.

Copy link

@BrunoSanchez BrunoSanchez left a comment

Choose a reason for hiding this comment

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

This looks good to me.

@isullivan isullivan merged commit 8149115 into main Jan 31, 2025
16 checks passed
@isullivan isullivan deleted the tickets/DM-48600 branch January 31, 2025 19:50
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.

3 participants