Class: JRubyProf::Invocation

Inherits:
Object
  • Object
show all
Defined in:
lib/jruby-prof/profile_invocation.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new_idObject



30
31
32
33
34
# File 'lib/jruby-prof/profile_invocation.rb', line 30

def self.new_id
  @id ||= 0
  @id += 1
  @id
end

Instance Method Details

#childrens_durationObject



12
13
14
# File 'lib/jruby-prof/profile_invocation.rb', line 12

def childrens_duration
  children.inject(0) {|m, inv| m + inv.duration}
end

#get_methodsObject



36
37
38
39
40
# File 'lib/jruby-prof/profile_invocation.rb', line 36

def get_methods
  h = {}
  ThreadSet.add_methods(h, self)
  h
end

#idObject



26
27
28
# File 'lib/jruby-prof/profile_invocation.rb', line 26

def id
  @id ||= Invocation.new_id
end

#nameObject



8
9
10
# File 'lib/jruby-prof/profile_invocation.rb', line 8

def name
  "#{class_name}#{static? ? "." : "#"}#{method_name}"
end

#static?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/jruby-prof/profile_invocation.rb', line 16

def static?
  false
end

#to_methodObject



20
21
22
23
24
# File 'lib/jruby-prof/profile_invocation.rb', line 20

def to_method
  method = Method.new(class_name, method_name, static?)
  method.add_invocation(self)
  method
end