Class: Vernier::ParsedProfile::Thread
- Inherits:
-
Object
- Object
- Vernier::ParsedProfile::Thread
- Defined in:
- lib/vernier/parsed_profile.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#[](name) ⇒ Object
Emulate hash.
-
#initialize(data) ⇒ Thread
constructor
A new instance of Thread.
- #main_thread? ⇒ Boolean
- #samples ⇒ Object
- #stack_table ⇒ Object
- #weights ⇒ Object
Constructor Details
#initialize(data) ⇒ Thread
Returns a new instance of Thread.
60 61 62 |
# File 'lib/vernier/parsed_profile.rb', line 60 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
58 59 60 |
# File 'lib/vernier/parsed_profile.rb', line 58 def data @data end |
Instance Method Details
#[](name) ⇒ Object
Emulate hash
81 82 83 |
# File 'lib/vernier/parsed_profile.rb', line 81 def [](name) send(name) end |
#main_thread? ⇒ Boolean
68 69 70 |
# File 'lib/vernier/parsed_profile.rb', line 68 def main_thread? @data["isMainThread"] end |
#samples ⇒ Object
72 73 74 |
# File 'lib/vernier/parsed_profile.rb', line 72 def samples @data["samples"]["stack"] end |
#stack_table ⇒ Object
64 65 66 |
# File 'lib/vernier/parsed_profile.rb', line 64 def stack_table @stack_table ||= StackTable.new(@data) end |
#weights ⇒ Object
76 77 78 |
# File 'lib/vernier/parsed_profile.rb', line 76 def weights @data["samples"]["weight"] end |