Created
January 26, 2022 00:13
-
-
Save marcotc/880ad3bc4970acd50e1526e825f44877 to your computer and use it in GitHub Desktop.
profiler proposal
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
module Datadog | |
module Profiling | |
# Starts the profiler, if the profiler is supported by in | |
# this runtime environment and if the profiler has been enabled | |
# in configuration. | |
# | |
# @return [Boolean] `true` if the profiler has successfully started, otherwise `false`. | |
# @public_api | |
def self.start | |
return false unless Datadog.send(:components).profiler | |
Datadog.send(:components).profiler.start | |
true | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment