Module: Fiber::Profiler
- Defined in:
- lib/fiber/profiler/version.rb,
lib/fiber/profiler/fork_handler.rb,
ext/fiber/profiler/profiler.c,
lib/fiber/profiler/capture.rb,
lib/fiber/profiler.rb
Overview
Released under the MIT License. Copyright, 2026, by Samuel Williams.
Defined Under Namespace
Classes: Capture
Constant Summary collapse
- VERSION =
"0.6.0"
Instance Attribute Summary collapse
-
#fiber_profiler_capture ⇒ Object
Thread-local storage for the active profiler capture.
Class Method Summary collapse
-
.capture ⇒ Object
Execute the given block with the Profiler.default profiler, if any.
-
.default ⇒ Object
The default profiler to use, if any.
Instance Attribute Details
#fiber_profiler_capture ⇒ Object
Thread-local storage for the active profiler capture.
11 12 13 |
# File 'lib/fiber/profiler/capture.rb', line 11 def fiber_profiler_capture @fiber_profiler_capture end |
Class Method Details
.capture ⇒ Object
Execute the given block with the default profiler, if any.
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/fiber/profiler.rb', line 23 def self.capture if capture = self.default begin capture.start yield ensure capture.stop end else yield end end |