Class: Vernier::ParsedProfile::StackTable

Inherits:
Object
  • Object
show all
Includes:
StackTableHelpers
Defined in:
lib/vernier/parsed_profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from StackTableHelpers

#backtrace, #full_stack, #inspect, #stack, #to_h

Constructor Details

#initialize(thread_data) ⇒ StackTable

Returns a new instance of StackTable.



25
26
27
28
29
30
31
32
33
34
# File 'lib/vernier/parsed_profile.rb', line 25

def initialize(thread_data)
  @stack_parents = thread_data["stackTable"]["prefix"]
  @stack_frames  = thread_data["stackTable"]["frame"]
  @frame_funcs   = thread_data["frameTable"]["func"]
  @frame_lines   = thread_data["frameTable"]["line"]
  @func_names    = thread_data["funcTable"]["name"]
  @func_filenames = thread_data["funcTable"]["fileName"]
  #@func_first_linenos = thread_data["funcTable"]["first"]
  @strings  = thread_data["stringArray"]
end

Instance Attribute Details

#stringsObject (readonly)

Returns the value of attribute strings.



36
37
38
# File 'lib/vernier/parsed_profile.rb', line 36

def strings
  @strings
end

Instance Method Details

#frame_countObject



39
# File 'lib/vernier/parsed_profile.rb', line 39

def frame_count = @frame_funcs.length

#frame_func_idx(idx) ⇒ Object



45
# File 'lib/vernier/parsed_profile.rb', line 45

def frame_func_idx(idx) = @frame_funcs[idx]

#frame_line_no(idx) ⇒ Object



46
# File 'lib/vernier/parsed_profile.rb', line 46

def frame_line_no(idx) = @frame_lines[idx]

#func_countObject



40
# File 'lib/vernier/parsed_profile.rb', line 40

def func_count = @func_names.length

#func_filename(idx) ⇒ Object



51
# File 'lib/vernier/parsed_profile.rb', line 51

def func_filename(idx) = @strings[func_filename_idx(idx)]

#func_filename_idx(idx) ⇒ Object



49
# File 'lib/vernier/parsed_profile.rb', line 49

def func_filename_idx(idx) = @func_filenames[idx]

#func_first_lineno(idx) ⇒ Object



52
# File 'lib/vernier/parsed_profile.rb', line 52

def func_first_lineno(idx) = @func_first_lineno[idx]

#func_name(idx) ⇒ Object



50
# File 'lib/vernier/parsed_profile.rb', line 50

def func_name(idx) = @strings[func_name_idx(idx)]

#func_name_idx(idx) ⇒ Object



48
# File 'lib/vernier/parsed_profile.rb', line 48

def func_name_idx(idx) = @func_names[idx]

#stack_countObject



38
# File 'lib/vernier/parsed_profile.rb', line 38

def stack_count = @stack_parents.length

#stack_frame_idx(idx) ⇒ Object



43
# File 'lib/vernier/parsed_profile.rb', line 43

def stack_frame_idx(idx) = @stack_frames[idx]

#stack_parent_idx(idx) ⇒ Object



42
# File 'lib/vernier/parsed_profile.rb', line 42

def stack_parent_idx(idx) = @stack_parents[idx]