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

Make trace_retained API consistent with profile #69

Merged

Conversation

joshuay03
Copy link
Collaborator

Mostly a cosmetic change. #61 moved the options to the collector itself, a benefit of that is not having to update all the profile method APIs every time a new option is added.

This ensures trace_contained is consistent with the rest of these methods.

@joshuay03 joshuay03 force-pushed the make-trace-retained-options-consistent branch from 90d7616 to c4c9dd2 Compare May 6, 2024 00:41
@joshuay03 joshuay03 changed the title Make trace_retained API consistent with profile Make trace_retained API consistent with profile May 6, 2024
def self.trace_retained(out: nil, gc: true, &block)
profile(mode: :retained, out:, gc:, &block)
def self.trace_retained(**profile_options, &block)
profile(**profile_options.merge(mode: :retained), &block)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to ensure the mode isn't overriden.

@jhawthorn jhawthorn merged commit 79f3961 into jhawthorn:main May 8, 2024
7 checks passed
@joshuay03 joshuay03 deleted the make-trace-retained-options-consistent branch May 8, 2024 21:06
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.

None yet

2 participants