Class: StackProf
- Inherits:
-
Object
- Object
- StackProf
- Defined in:
- lib/scout_apm/utils/fake_stack_prof.rb
Overview
A fake implementation of stackprof, for systems that don’t support it.
Class Method Summary collapse
- .fake? ⇒ Boolean
- .results(*args) ⇒ Object
- .run(*args) ⇒ Object
- .running? ⇒ Boolean
- .sample(*args) ⇒ Object
- .start(*args) ⇒ Object
- .stop(*args) ⇒ Object
Class Method Details
.fake? ⇒ Boolean
37 38 39 |
# File 'lib/scout_apm/utils/fake_stack_prof.rb', line 37 def self.fake? true end |
.results(*args) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/scout_apm/utils/fake_stack_prof.rb', line 25 def self.results(*args) { :version => 0.0, :mode => :wall, :interval => 1000, :samples => 0, :gc_samples => 0, :missed_samples => 0, :frames => {}, } end |
.run(*args) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/scout_apm/utils/fake_stack_prof.rb', line 15 def self.run(*args) start yield stop results end |
.running? ⇒ Boolean
11 12 13 |
# File 'lib/scout_apm/utils/fake_stack_prof.rb', line 11 def self.running? !!@running end |
.sample(*args) ⇒ Object
22 23 |
# File 'lib/scout_apm/utils/fake_stack_prof.rb', line 22 def self.sample(*args) end |
.start(*args) ⇒ Object
3 4 5 |
# File 'lib/scout_apm/utils/fake_stack_prof.rb', line 3 def self.start(*args) @running = true end |
.stop(*args) ⇒ Object
7 8 9 |
# File 'lib/scout_apm/utils/fake_stack_prof.rb', line 7 def self.stop(*args) @running = false end |