Class: JRubyProf
- Inherits:
-
Object
show all
- Defined in:
- lib/jruby-prof.rb,
lib/jruby-prof/method.rb,
lib/jruby-prof/invocation_set.rb,
lib/jruby-prof/abstract_printer.rb,
lib/jruby-prof/flat_text_printer.rb,
lib/jruby-prof/graph_html_printer.rb,
lib/jruby-prof/graph_text_printer.rb,
lib/jruby-prof/profile_invocation.rb,
lib/jruby-prof/simple_tree_printer.rb
Defined Under Namespace
Classes: AbstractPrinter, FlatTextPrinter, GraphHtmlPrinter, GraphTextPrinter, Invocation, Method, SimpleTreePrinter, ThreadSet
Class Method Summary
collapse
Class Method Details
.print_call_tree(result, filename) ⇒ Object
42
43
44
45
|
# File 'lib/jruby-prof.rb', line 42
def self.print_call_tree(result, filename)
printer = SimpleTreePrinter.new(ThreadSet.new(result.values.to_a, JRubyProf.lastTracingDuration))
printer.print_to_file(filename)
end
|
.print_flat_text(result, filename) ⇒ Object
52
53
54
55
|
# File 'lib/jruby-prof.rb', line 52
def self.print_flat_text(result, filename)
printer = FlatTextPrinter.new(ThreadSet.new(result.values.to_a, JRubyProf.lastTracingDuration))
printer.print_to_file(filename)
end
|
.print_graph_html(result, filename) ⇒ Object
62
63
64
65
|
# File 'lib/jruby-prof.rb', line 62
def self.print_graph_html(result, filename)
printer = GraphHtmlPrinter.new(ThreadSet.new(result.values.to_a, JRubyProf.lastTracingDuration))
printer.print_to_file(filename)
end
|
.print_graph_text(result, filename) ⇒ Object
57
58
59
60
|
# File 'lib/jruby-prof.rb', line 57
def self.print_graph_text(result, filename)
printer = GraphTextPrinter.new(ThreadSet.new(result.values.to_a, JRubyProf.lastTracingDuration))
printer.print_to_file(filename)
end
|
.print_tree_html(result, filename) ⇒ Object
47
48
49
50
|
# File 'lib/jruby-prof.rb', line 47
def self.print_tree_html(result, filename)
printer = TreeHtmlPrinter.new(ThreadSet.new(result.values.to_a, JRubyProf.lastTracingDuration))
printer.print_to_file(filename)
end
|
.profile ⇒ Object
35
36
37
38
39
40
|
# File 'lib/jruby-prof.rb', line 35
def self.profile
raise ArgumentError, "profile requires a block" unless block_given?
start
yield
stop
end
|
.running? ⇒ Boolean
31
32
33
|
# File 'lib/jruby-prof.rb', line 31
def self.running?
self.is_running
end
|
.start ⇒ Object
22
23
24
25
|
# File 'lib/jruby-prof.rb', line 22
def self.start
raise RuntimeError, "JRubyProf already running" if running?
start_tracing
end
|
.stop ⇒ Object
27
28
29
|
# File 'lib/jruby-prof.rb', line 27
def self.stop
stop_tracing
end
|