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

Enable GC profiling when it's enabled in an app #879

Merged
merged 1 commit into from
Aug 10, 2022
Merged

Conversation

tombruijn
Copy link
Member

When the app calls GC::Profiler.enable we will now automatically
collect the Garbage Collection time for the Ruby VM magic dashboard.

We check if an app has enabled the GC profiler by calling
GC::Profiler.enabled?. This operation is only checking a boolean value
in Ruby, which is also much faster the previous implementation of
checking the now removed enable_gc_instrumentation config option.

Previously we had the undocumented enable_gc_instrumentation config
option, which called GC::Profiler.enable. We removed this in PR #876.

We want to give developers more flexibility and allow to enable and
disable it at will. This way they can choose to only profile certain
parts of their app without having it enabled on app start.

Part of #868

When the app calls `GC::Profiler.enable` we will now automatically
collect the Garbage Collection time for the Ruby VM magic dashboard.

We check if an app has enabled the GC profiler by calling
`GC::Profiler.enabled?`. This operation is only checking a boolean value
in Ruby, which is also much faster the previous implementation of
checking the now removed `enable_gc_instrumentation` config option.

Previously we had the undocumented `enable_gc_instrumentation` config
option, which called `GC::Profiler.enable`. We removed this in PR #876.

We want to give developers more flexibility and allow to enable and
disable it at will. This way they can choose to only profile certain
parts of their app without having it enabled on app start.

Part of #868
@tombruijn tombruijn changed the base branch from remove-transaction-gc-tracking to main August 10, 2022 12:23
@tombruijn tombruijn merged commit af7e666 into main Aug 10, 2022
@tombruijn tombruijn deleted the gc-profiling branch July 31, 2023 09:27
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