-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable GC profiling when it's enabled in an app (#879)
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
- Loading branch information
Showing
5 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
bump: "patch" | ||
type: "change" | ||
--- | ||
|
||
Listen if the Ruby Garbage Collection profiler is enabled and collect how long the GC is running for the Ruby VM magic dashboard. An app will need to call `GC::Profiler.enable` to enable the GC profiler. Do not enable this in production environments, or at least not for long, because this can negatively impact performance of apps. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters