ruby-prof 0.16.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGES +532 -467
- data/LICENSE +24 -24
- data/README.rdoc +5 -454
- data/Rakefile +110 -113
- data/bin/ruby-prof +380 -340
- data/bin/ruby-prof-check-trace +45 -45
- data/ext/ruby_prof/extconf.rb +36 -64
- data/ext/ruby_prof/rp_allocation.c +279 -0
- data/ext/ruby_prof/rp_allocation.h +31 -0
- data/ext/ruby_prof/rp_call_info.c +271 -407
- data/ext/ruby_prof/rp_call_info.h +35 -48
- data/ext/ruby_prof/rp_measure_allocations.c +52 -76
- data/ext/ruby_prof/rp_measure_memory.c +42 -77
- data/ext/ruby_prof/rp_measure_process_time.c +67 -71
- data/ext/ruby_prof/rp_measure_wall_time.c +62 -45
- data/ext/ruby_prof/rp_measurement.c +230 -0
- data/ext/ruby_prof/rp_measurement.h +50 -0
- data/ext/ruby_prof/rp_method.c +630 -411
- data/ext/ruby_prof/rp_method.h +70 -52
- data/ext/ruby_prof/rp_profile.c +895 -0
- data/ext/ruby_prof/rp_profile.h +37 -0
- data/ext/ruby_prof/rp_stack.c +196 -128
- data/ext/ruby_prof/rp_stack.h +56 -51
- data/ext/ruby_prof/rp_thread.c +337 -273
- data/ext/ruby_prof/rp_thread.h +36 -27
- data/ext/ruby_prof/ruby_prof.c +48 -671
- data/ext/ruby_prof/ruby_prof.h +17 -56
- data/ext/ruby_prof/vc/ruby_prof.sln +20 -21
- data/ext/ruby_prof/vc/{ruby_prof_20.vcxproj → ruby_prof.vcxproj} +38 -5
- data/lib/ruby-prof.rb +52 -58
- data/lib/ruby-prof/assets/call_stack_printer.html.erb +713 -0
- data/lib/ruby-prof/assets/call_stack_printer.png +0 -0
- data/lib/ruby-prof/assets/graph_printer.html.erb +356 -0
- data/lib/ruby-prof/call_info.rb +57 -126
- data/lib/ruby-prof/call_info_visitor.rb +38 -40
- data/lib/ruby-prof/compatibility.rb +109 -178
- data/lib/ruby-prof/exclude_common_methods.rb +198 -0
- data/lib/ruby-prof/measurement.rb +14 -0
- data/lib/ruby-prof/method_info.rb +90 -129
- data/lib/ruby-prof/printers/abstract_printer.rb +127 -85
- data/lib/ruby-prof/printers/call_info_printer.rb +51 -41
- data/lib/ruby-prof/printers/call_stack_printer.rb +182 -260
- data/lib/ruby-prof/printers/call_tree_printer.rb +151 -130
- data/lib/ruby-prof/printers/dot_printer.rb +132 -132
- data/lib/ruby-prof/printers/flat_printer.rb +52 -70
- data/lib/ruby-prof/printers/graph_html_printer.rb +63 -244
- data/lib/ruby-prof/printers/graph_printer.rb +114 -116
- data/lib/ruby-prof/printers/multi_printer.rb +127 -58
- data/lib/ruby-prof/profile.rb +33 -55
- data/lib/ruby-prof/rack.rb +171 -95
- data/lib/ruby-prof/task.rb +147 -147
- data/lib/ruby-prof/thread.rb +35 -41
- data/lib/ruby-prof/version.rb +3 -3
- data/lib/unprof.rb +10 -10
- data/ruby-prof.gemspec +58 -57
- data/test/abstract_printer_test.rb +26 -0
- data/test/alias_test.rb +129 -0
- data/test/basic_test.rb +129 -128
- data/test/call_info_visitor_test.rb +31 -31
- data/test/duplicate_names_test.rb +32 -32
- data/test/dynamic_method_test.rb +53 -55
- data/test/enumerable_test.rb +21 -21
- data/test/exceptions_test.rb +24 -16
- data/test/exclude_methods_test.rb +146 -0
- data/test/exclude_threads_test.rb +53 -53
- data/test/fiber_test.rb +73 -79
- data/test/gc_test.rb +96 -0
- data/test/line_number_test.rb +161 -71
- data/test/marshal_test.rb +119 -0
- data/test/measure_allocations.rb +30 -0
- data/test/measure_allocations_test.rb +385 -26
- data/test/measure_allocations_trace_test.rb +385 -0
- data/test/measure_memory_trace_test.rb +756 -0
- data/test/measure_process_time_test.rb +849 -63
- data/test/measure_times.rb +54 -0
- data/test/measure_wall_time_test.rb +459 -255
- data/test/multi_printer_test.rb +71 -83
- data/test/no_method_class_test.rb +15 -15
- data/test/parser_timings.rb +24 -0
- data/test/pause_resume_test.rb +166 -166
- data/test/prime.rb +56 -54
- data/test/printer_call_stack_test.rb +28 -0
- data/test/printer_call_tree_test.rb +31 -0
- data/test/printer_flat_test.rb +68 -0
- data/test/printer_graph_html_test.rb +60 -0
- data/test/printer_graph_test.rb +41 -0
- data/test/printers_test.rb +141 -255
- data/test/printing_recursive_graph_test.rb +81 -127
- data/test/rack_test.rb +157 -93
- data/test/recursive_test.rb +210 -215
- data/test/singleton_test.rb +38 -38
- data/test/stack_printer_test.rb +64 -78
- data/test/start_stop_test.rb +109 -112
- data/test/test_helper.rb +24 -264
- data/test/thread_test.rb +144 -187
- data/test/unique_call_path_test.rb +190 -202
- data/test/yarv_test.rb +56 -55
- metadata +34 -114
- data/doc/LICENSE.html +0 -114
- data/doc/README_rdoc.html +0 -603
- data/doc/Rack.html +0 -95
- data/doc/Rack/RubyProf.html +0 -226
- data/doc/RubyProf.html +0 -962
- data/doc/RubyProf/AbstractPrinter.html +0 -546
- data/doc/RubyProf/AggregateCallInfo.html +0 -551
- data/doc/RubyProf/CallInfo.html +0 -639
- data/doc/RubyProf/CallInfoPrinter.html +0 -120
- data/doc/RubyProf/CallInfoVisitor.html +0 -198
- data/doc/RubyProf/CallStackPrinter.html +0 -1121
- data/doc/RubyProf/CallTreePrinter.html +0 -641
- data/doc/RubyProf/Cmd.html +0 -631
- data/doc/RubyProf/DotPrinter.html +0 -257
- data/doc/RubyProf/FlatPrinter.html +0 -163
- data/doc/RubyProf/FlatPrinterWithLineNumbers.html +0 -208
- data/doc/RubyProf/GraphHtmlPrinter.html +0 -552
- data/doc/RubyProf/GraphPrinter.html +0 -139
- data/doc/RubyProf/MethodInfo.html +0 -745
- data/doc/RubyProf/MultiPrinter.html +0 -360
- data/doc/RubyProf/Profile.html +0 -763
- data/doc/RubyProf/ProfileTask.html +0 -490
- data/doc/RubyProf/Thread.html +0 -310
- data/doc/created.rid +0 -31
- data/doc/css/fonts.css +0 -167
- data/doc/css/rdoc.css +0 -590
- data/doc/examples/flat_txt.html +0 -138
- data/doc/examples/graph_html.html +0 -909
- data/doc/examples/graph_txt.html +0 -247
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +0 -626
- data/doc/js/darkfish.js +0 -161
- data/doc/js/jquery.js +0 -4
- data/doc/js/navigation.js +0 -142
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +0 -109
- data/doc/js/search_index.js +0 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +0 -228
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +0 -942
- data/examples/cachegrind.out.1 +0 -114
- data/examples/cachegrind.out.1.32313213 +0 -114
- data/examples/flat.txt +0 -50
- data/examples/graph.dot +0 -84
- data/examples/graph.html +0 -823
- data/examples/graph.txt +0 -139
- data/examples/multi.flat.txt +0 -23
- data/examples/multi.graph.html +0 -760
- data/examples/multi.grind.dat +0 -114
- data/examples/multi.stack.html +0 -547
- data/examples/stack.html +0 -547
- data/ext/ruby_prof/rp_measure.c +0 -40
- data/ext/ruby_prof/rp_measure.h +0 -45
- data/ext/ruby_prof/rp_measure_cpu_time.c +0 -136
- data/ext/ruby_prof/rp_measure_gc_runs.c +0 -73
- data/ext/ruby_prof/rp_measure_gc_time.c +0 -60
- data/ext/ruby_prof/vc/ruby_prof_18.vcxproj +0 -108
- data/ext/ruby_prof/vc/ruby_prof_19.vcxproj +0 -110
- data/lib/ruby-prof/aggregate_call_info.rb +0 -76
- data/lib/ruby-prof/assets/call_stack_printer.css.html +0 -117
- data/lib/ruby-prof/assets/call_stack_printer.js.html +0 -385
- data/lib/ruby-prof/printers/flat_printer_with_line_numbers.rb +0 -64
- data/test/aggregate_test.rb +0 -136
- data/test/block_test.rb +0 -74
- data/test/call_info_test.rb +0 -78
- data/test/issue137_test.rb +0 -63
- data/test/measure_cpu_time_test.rb +0 -213
- data/test/measure_gc_runs_test.rb +0 -32
- data/test/measure_gc_time_test.rb +0 -36
- data/test/measure_memory_test.rb +0 -33
- data/test/method_elimination_test.rb +0 -84
- data/test/module_test.rb +0 -45
- data/test/stack_test.rb +0 -138
data/doc/Rack.html
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>module Rack - ruby-prof</title>
|
8
|
-
|
9
|
-
<script type="text/javascript">
|
10
|
-
var rdoc_rel_prefix = "./";
|
11
|
-
</script>
|
12
|
-
|
13
|
-
<script src="./js/jquery.js"></script>
|
14
|
-
<script src="./js/darkfish.js"></script>
|
15
|
-
|
16
|
-
<link href="./css/fonts.css" rel="stylesheet">
|
17
|
-
<link href="./css/rdoc.css" rel="stylesheet">
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<body id="top" role="document" class="module">
|
22
|
-
<nav role="navigation">
|
23
|
-
<div id="project-navigation">
|
24
|
-
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
25
|
-
<h2>
|
26
|
-
<a href="./index.html" rel="home">Home</a>
|
27
|
-
</h2>
|
28
|
-
|
29
|
-
<div id="table-of-contents-navigation">
|
30
|
-
<a href="./table_of_contents.html#pages">Pages</a>
|
31
|
-
<a href="./table_of_contents.html#classes">Classes</a>
|
32
|
-
<a href="./table_of_contents.html#methods">Methods</a>
|
33
|
-
</div>
|
34
|
-
</div>
|
35
|
-
|
36
|
-
<div id="search-section" role="search" class="project-section initially-hidden">
|
37
|
-
<form action="#" method="get" accept-charset="utf-8">
|
38
|
-
<div id="search-field-wrapper">
|
39
|
-
<input id="search-field" role="combobox" aria-label="Search"
|
40
|
-
aria-autocomplete="list" aria-controls="search-results"
|
41
|
-
type="text" name="search" placeholder="Search" spellcheck="false"
|
42
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
43
|
-
</div>
|
44
|
-
|
45
|
-
<ul id="search-results" aria-label="Search Results"
|
46
|
-
aria-busy="false" aria-expanded="false"
|
47
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
48
|
-
</form>
|
49
|
-
</div>
|
50
|
-
|
51
|
-
</div>
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
<div id="class-metadata">
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
</div>
|
62
|
-
</nav>
|
63
|
-
|
64
|
-
<main role="main" aria-labelledby="module-Rack">
|
65
|
-
<h1 id="module-Rack" class="module">
|
66
|
-
module Rack
|
67
|
-
</h1>
|
68
|
-
|
69
|
-
<section class="description">
|
70
|
-
|
71
|
-
</section>
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
</section>
|
87
|
-
</main>
|
88
|
-
|
89
|
-
|
90
|
-
<footer id="validator-badges" role="contentinfo">
|
91
|
-
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
92
|
-
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.2.
|
93
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
94
|
-
</footer>
|
95
|
-
|
data/doc/Rack/RubyProf.html
DELETED
@@ -1,226 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>class Rack::RubyProf - ruby-prof</title>
|
8
|
-
|
9
|
-
<script type="text/javascript">
|
10
|
-
var rdoc_rel_prefix = "../";
|
11
|
-
</script>
|
12
|
-
|
13
|
-
<script src="../js/jquery.js"></script>
|
14
|
-
<script src="../js/darkfish.js"></script>
|
15
|
-
|
16
|
-
<link href="../css/fonts.css" rel="stylesheet">
|
17
|
-
<link href="../css/rdoc.css" rel="stylesheet">
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<body id="top" role="document" class="class">
|
22
|
-
<nav role="navigation">
|
23
|
-
<div id="project-navigation">
|
24
|
-
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
25
|
-
<h2>
|
26
|
-
<a href="../index.html" rel="home">Home</a>
|
27
|
-
</h2>
|
28
|
-
|
29
|
-
<div id="table-of-contents-navigation">
|
30
|
-
<a href="../table_of_contents.html#pages">Pages</a>
|
31
|
-
<a href="../table_of_contents.html#classes">Classes</a>
|
32
|
-
<a href="../table_of_contents.html#methods">Methods</a>
|
33
|
-
</div>
|
34
|
-
</div>
|
35
|
-
|
36
|
-
<div id="search-section" role="search" class="project-section initially-hidden">
|
37
|
-
<form action="#" method="get" accept-charset="utf-8">
|
38
|
-
<div id="search-field-wrapper">
|
39
|
-
<input id="search-field" role="combobox" aria-label="Search"
|
40
|
-
aria-autocomplete="list" aria-controls="search-results"
|
41
|
-
type="text" name="search" placeholder="Search" spellcheck="false"
|
42
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
43
|
-
</div>
|
44
|
-
|
45
|
-
<ul id="search-results" aria-label="Search Results"
|
46
|
-
aria-busy="false" aria-expanded="false"
|
47
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
48
|
-
</form>
|
49
|
-
</div>
|
50
|
-
|
51
|
-
</div>
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
<div id="class-metadata">
|
56
|
-
|
57
|
-
<div id="parent-class-section" class="nav-section">
|
58
|
-
<h3>Parent</h3>
|
59
|
-
|
60
|
-
|
61
|
-
<p class="link">Object
|
62
|
-
|
63
|
-
</div>
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
<!-- Method Quickref -->
|
68
|
-
<div id="method-list-section" class="nav-section">
|
69
|
-
<h3>Methods</h3>
|
70
|
-
|
71
|
-
<ul class="link-list" role="directory">
|
72
|
-
|
73
|
-
<li ><a href="#method-c-new">::new</a>
|
74
|
-
|
75
|
-
<li ><a href="#method-i-call">#call</a>
|
76
|
-
|
77
|
-
</ul>
|
78
|
-
</div>
|
79
|
-
|
80
|
-
</div>
|
81
|
-
</nav>
|
82
|
-
|
83
|
-
<main role="main" aria-labelledby="class-Rack::RubyProf">
|
84
|
-
<h1 id="class-Rack::RubyProf" class="class">
|
85
|
-
class Rack::RubyProf
|
86
|
-
</h1>
|
87
|
-
|
88
|
-
<section class="description">
|
89
|
-
|
90
|
-
</section>
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
106
|
-
<header>
|
107
|
-
<h3>Public Class Methods</h3>
|
108
|
-
</header>
|
109
|
-
|
110
|
-
|
111
|
-
<div id="method-c-new" class="method-detail ">
|
112
|
-
|
113
|
-
<div class="method-heading">
|
114
|
-
<span class="method-name">new</span><span
|
115
|
-
class="method-args">(app, options = {})</span>
|
116
|
-
|
117
|
-
<span class="method-click-advice">click to toggle source</span>
|
118
|
-
|
119
|
-
</div>
|
120
|
-
|
121
|
-
|
122
|
-
<div class="method-description">
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
<div class="method-source-code" id="new-source">
|
130
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/rack.rb, line 5</span>
|
131
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">app</span>, <span class="ruby-identifier">options</span> = {})
|
132
|
-
<span class="ruby-ivar">@app</span> = <span class="ruby-identifier">app</span>
|
133
|
-
<span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
|
134
|
-
<span class="ruby-ivar">@options</span>[<span class="ruby-value">:min_percent</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">1</span>
|
135
|
-
|
136
|
-
<span class="ruby-ivar">@tmpdir</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:path</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">tmpdir</span>
|
137
|
-
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-ivar">@tmpdir</span>)
|
138
|
-
|
139
|
-
<span class="ruby-ivar">@printer_klasses</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-value">:printers</span>] <span class="ruby-operator">||</span> {<span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">FlatPrinter</span> =<span class="ruby-operator">></span> <span class="ruby-string">'flat.txt'</span>,
|
140
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">GraphPrinter</span> =<span class="ruby-operator">></span> <span class="ruby-string">'graph.txt'</span>,
|
141
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">GraphHtmlPrinter</span> =<span class="ruby-operator">></span> <span class="ruby-string">'graph.html'</span>,
|
142
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">CallStackPrinter</span> =<span class="ruby-operator">></span> <span class="ruby-string">'call_stack.html'</span>}
|
143
|
-
|
144
|
-
<span class="ruby-ivar">@skip_paths</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:skip_paths</span>] <span class="ruby-operator">||</span> [<span class="ruby-regexp">%r{^/assets}</span>, <span class="ruby-regexp">%r{\.(css|js|png|jpeg|jpg|gif)$}</span>]
|
145
|
-
<span class="ruby-ivar">@only_paths</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:only_paths</span>]
|
146
|
-
<span class="ruby-keyword">end</span></pre>
|
147
|
-
</div>
|
148
|
-
|
149
|
-
</div>
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
</div>
|
155
|
-
|
156
|
-
|
157
|
-
</section>
|
158
|
-
|
159
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
160
|
-
<header>
|
161
|
-
<h3>Public Instance Methods</h3>
|
162
|
-
</header>
|
163
|
-
|
164
|
-
|
165
|
-
<div id="method-i-call" class="method-detail ">
|
166
|
-
|
167
|
-
<div class="method-heading">
|
168
|
-
<span class="method-name">call</span><span
|
169
|
-
class="method-args">(env)</span>
|
170
|
-
|
171
|
-
<span class="method-click-advice">click to toggle source</span>
|
172
|
-
|
173
|
-
</div>
|
174
|
-
|
175
|
-
|
176
|
-
<div class="method-description">
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
<div class="method-source-code" id="call-source">
|
184
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/rack.rb, line 22</span>
|
185
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-identifier">env</span>)
|
186
|
-
<span class="ruby-identifier">request</span> = <span class="ruby-constant">Rack</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">env</span>)
|
187
|
-
|
188
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">should_profile?</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">path</span>)
|
189
|
-
<span class="ruby-keyword">begin</span>
|
190
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-keyword">nil</span>
|
191
|
-
<span class="ruby-identifier">data</span> = <span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">Profile</span>.<span class="ruby-identifier">profile</span>(<span class="ruby-identifier">profiling_options</span>) <span class="ruby-keyword">do</span>
|
192
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">env</span>)
|
193
|
-
<span class="ruby-keyword">end</span>
|
194
|
-
|
195
|
-
<span class="ruby-identifier">path</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">path</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">'/'</span>, <span class="ruby-string">'-'</span>)
|
196
|
-
<span class="ruby-identifier">path</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-value">0</span>)
|
197
|
-
|
198
|
-
<span class="ruby-identifier">print</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">path</span>)
|
199
|
-
<span class="ruby-identifier">result</span>
|
200
|
-
<span class="ruby-keyword">end</span>
|
201
|
-
<span class="ruby-keyword">else</span>
|
202
|
-
<span class="ruby-ivar">@app</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">env</span>)
|
203
|
-
<span class="ruby-keyword">end</span>
|
204
|
-
<span class="ruby-keyword">end</span></pre>
|
205
|
-
</div>
|
206
|
-
|
207
|
-
</div>
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
</div>
|
213
|
-
|
214
|
-
|
215
|
-
</section>
|
216
|
-
|
217
|
-
</section>
|
218
|
-
</main>
|
219
|
-
|
220
|
-
|
221
|
-
<footer id="validator-badges" role="contentinfo">
|
222
|
-
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
223
|
-
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.2.
|
224
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
225
|
-
</footer>
|
226
|
-
|
data/doc/RubyProf.html
DELETED
@@ -1,962 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>module RubyProf - ruby-prof</title>
|
8
|
-
|
9
|
-
<script type="text/javascript">
|
10
|
-
var rdoc_rel_prefix = "./";
|
11
|
-
</script>
|
12
|
-
|
13
|
-
<script src="./js/jquery.js"></script>
|
14
|
-
<script src="./js/darkfish.js"></script>
|
15
|
-
|
16
|
-
<link href="./css/fonts.css" rel="stylesheet">
|
17
|
-
<link href="./css/rdoc.css" rel="stylesheet">
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<body id="top" role="document" class="module">
|
22
|
-
<nav role="navigation">
|
23
|
-
<div id="project-navigation">
|
24
|
-
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
25
|
-
<h2>
|
26
|
-
<a href="./index.html" rel="home">Home</a>
|
27
|
-
</h2>
|
28
|
-
|
29
|
-
<div id="table-of-contents-navigation">
|
30
|
-
<a href="./table_of_contents.html#pages">Pages</a>
|
31
|
-
<a href="./table_of_contents.html#classes">Classes</a>
|
32
|
-
<a href="./table_of_contents.html#methods">Methods</a>
|
33
|
-
</div>
|
34
|
-
</div>
|
35
|
-
|
36
|
-
<div id="search-section" role="search" class="project-section initially-hidden">
|
37
|
-
<form action="#" method="get" accept-charset="utf-8">
|
38
|
-
<div id="search-field-wrapper">
|
39
|
-
<input id="search-field" role="combobox" aria-label="Search"
|
40
|
-
aria-autocomplete="list" aria-controls="search-results"
|
41
|
-
type="text" name="search" placeholder="Search" spellcheck="false"
|
42
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
43
|
-
</div>
|
44
|
-
|
45
|
-
<ul id="search-results" aria-label="Search Results"
|
46
|
-
aria-busy="false" aria-expanded="false"
|
47
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
48
|
-
</form>
|
49
|
-
</div>
|
50
|
-
|
51
|
-
</div>
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
<div id="class-metadata">
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
<!-- Method Quickref -->
|
61
|
-
<div id="method-list-section" class="nav-section">
|
62
|
-
<h3>Methods</h3>
|
63
|
-
|
64
|
-
<ul class="link-list" role="directory">
|
65
|
-
|
66
|
-
<li ><a href="#method-c-cpu_frequency">::cpu_frequency</a>
|
67
|
-
|
68
|
-
<li ><a href="#method-c-exclude_threads">::exclude_threads</a>
|
69
|
-
|
70
|
-
<li ><a href="#method-c-exclude_threads-3D">::exclude_threads=</a>
|
71
|
-
|
72
|
-
<li ><a href="#method-c-figure_measure_mode">::figure_measure_mode</a>
|
73
|
-
|
74
|
-
<li ><a href="#method-c-measure_allocations">::measure_allocations</a>
|
75
|
-
|
76
|
-
<li ><a href="#method-c-measure_cpu_time">::measure_cpu_time</a>
|
77
|
-
|
78
|
-
<li ><a href="#method-c-measure_gc_runs">::measure_gc_runs</a>
|
79
|
-
|
80
|
-
<li ><a href="#method-c-measure_gc_time">::measure_gc_time</a>
|
81
|
-
|
82
|
-
<li ><a href="#method-c-measure_memory">::measure_memory</a>
|
83
|
-
|
84
|
-
<li ><a href="#method-c-measure_mode">::measure_mode</a>
|
85
|
-
|
86
|
-
<li ><a href="#method-c-measure_mode-3D">::measure_mode=</a>
|
87
|
-
|
88
|
-
<li ><a href="#method-c-measure_mode_string">::measure_mode_string</a>
|
89
|
-
|
90
|
-
<li ><a href="#method-c-measure_process_time">::measure_process_time</a>
|
91
|
-
|
92
|
-
<li ><a href="#method-c-measure_wall_time">::measure_wall_time</a>
|
93
|
-
|
94
|
-
<li ><a href="#method-c-pause">::pause</a>
|
95
|
-
|
96
|
-
<li ><a href="#method-c-profile">::profile</a>
|
97
|
-
|
98
|
-
<li ><a href="#method-c-resume">::resume</a>
|
99
|
-
|
100
|
-
<li ><a href="#method-c-running-3F">::running?</a>
|
101
|
-
|
102
|
-
<li ><a href="#method-c-start">::start</a>
|
103
|
-
|
104
|
-
<li ><a href="#method-c-start_script">::start_script</a>
|
105
|
-
|
106
|
-
<li ><a href="#method-c-stop">::stop</a>
|
107
|
-
|
108
|
-
</ul>
|
109
|
-
</div>
|
110
|
-
|
111
|
-
</div>
|
112
|
-
</nav>
|
113
|
-
|
114
|
-
<main role="main" aria-labelledby="module-RubyProf">
|
115
|
-
<h1 id="module-RubyProf" class="module">
|
116
|
-
module RubyProf
|
117
|
-
</h1>
|
118
|
-
|
119
|
-
<section class="description">
|
120
|
-
|
121
|
-
<p>The call info visitor class does a depth-first traversal across a list of
|
122
|
-
method infos. At each call_info node, the visitor executes the block
|
123
|
-
provided in the visit method. The block is passed two parameters, the event
|
124
|
-
and the call_info instance. Event will be either :enter or :exit.</p>
|
125
|
-
|
126
|
-
<pre class="ruby"><span class="ruby-identifier">visitor</span> = <span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">CallInfoVisitor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">result</span>.<span class="ruby-identifier">threads</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">top_call_infos</span>)
|
127
|
-
|
128
|
-
<span class="ruby-identifier">method_names</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
129
|
-
|
130
|
-
<span class="ruby-identifier">visitor</span>.<span class="ruby-identifier">visit</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span>, <span class="ruby-identifier">event</span><span class="ruby-operator">|</span>
|
131
|
-
<span class="ruby-identifier">method_names</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">target</span>.<span class="ruby-identifier">full_name</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">event</span> <span class="ruby-operator">==</span> :<span class="ruby-identifier">enter</span>
|
132
|
-
<span class="ruby-keyword">end</span>
|
133
|
-
|
134
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">method_names</span>
|
135
|
-
</pre>
|
136
|
-
|
137
|
-
<p>These methods are here for backwards compatability with previous <a
|
138
|
-
href="RubyProf.html">RubyProf</a> releases</p>
|
139
|
-
|
140
|
-
</section>
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
<section class="constants-list">
|
152
|
-
<header>
|
153
|
-
<h3>Constants</h3>
|
154
|
-
</header>
|
155
|
-
<dl>
|
156
|
-
|
157
|
-
<dt id="VERSION">VERSION
|
158
|
-
|
159
|
-
<dd>
|
160
|
-
|
161
|
-
|
162
|
-
</dl>
|
163
|
-
</section>
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
170
|
-
<header>
|
171
|
-
<h3>Public Class Methods</h3>
|
172
|
-
</header>
|
173
|
-
|
174
|
-
|
175
|
-
<div id="method-c-cpu_frequency" class="method-detail ">
|
176
|
-
|
177
|
-
<div class="method-heading">
|
178
|
-
<span class="method-name">cpu_frequency</span><span
|
179
|
-
class="method-args">()</span>
|
180
|
-
|
181
|
-
<span class="method-click-advice">click to toggle source</span>
|
182
|
-
|
183
|
-
</div>
|
184
|
-
|
185
|
-
|
186
|
-
<div class="method-description">
|
187
|
-
|
188
|
-
<p>Measurements</p>
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
<div class="method-source-code" id="cpu_frequency-source">
|
194
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 5</span>
|
195
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">cpu_frequency</span>
|
196
|
-
<span class="ruby-constant">Measure</span><span class="ruby-operator">::</span><span class="ruby-constant">CpuTime</span>.<span class="ruby-identifier">frequency</span>
|
197
|
-
<span class="ruby-keyword">end</span></pre>
|
198
|
-
</div>
|
199
|
-
|
200
|
-
</div>
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
</div>
|
206
|
-
|
207
|
-
|
208
|
-
<div id="method-c-exclude_threads" class="method-detail ">
|
209
|
-
|
210
|
-
|
211
|
-
<div class="method-heading">
|
212
|
-
<span class="method-callseq">
|
213
|
-
exclude_threads → exclude_threads
|
214
|
-
</span>
|
215
|
-
|
216
|
-
<span class="method-click-advice">click to toggle source</span>
|
217
|
-
|
218
|
-
</div>
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
<div class="method-description">
|
223
|
-
|
224
|
-
<p>Returns threads ruby-prof should exclude from profiling</p>
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
<div class="method-source-code" id="exclude_threads-source">
|
230
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 87</span>
|
231
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">exclude_threads</span>
|
232
|
-
<span class="ruby-ivar">@exclude_threads</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
233
|
-
<span class="ruby-keyword">end</span></pre>
|
234
|
-
</div>
|
235
|
-
|
236
|
-
</div>
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
</div>
|
242
|
-
|
243
|
-
|
244
|
-
<div id="method-c-exclude_threads-3D" class="method-detail ">
|
245
|
-
|
246
|
-
|
247
|
-
<div class="method-heading">
|
248
|
-
<span class="method-callseq">
|
249
|
-
exclude_threads= → void
|
250
|
-
</span>
|
251
|
-
|
252
|
-
<span class="method-click-advice">click to toggle source</span>
|
253
|
-
|
254
|
-
</div>
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
<div class="method-description">
|
259
|
-
|
260
|
-
<p>Specifies what threads ruby-prof should exclude from profiling</p>
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
<div class="method-source-code" id="exclude_threads-3D-source">
|
266
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 96</span>
|
267
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">exclude_threads=</span>(<span class="ruby-identifier">value</span>)
|
268
|
-
<span class="ruby-ivar">@exclude_threads</span> = <span class="ruby-identifier">value</span>
|
269
|
-
<span class="ruby-keyword">end</span></pre>
|
270
|
-
</div>
|
271
|
-
|
272
|
-
</div>
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
</div>
|
278
|
-
|
279
|
-
|
280
|
-
<div id="method-c-figure_measure_mode" class="method-detail ">
|
281
|
-
|
282
|
-
<div class="method-heading">
|
283
|
-
<span class="method-name">figure_measure_mode</span><span
|
284
|
-
class="method-args">()</span>
|
285
|
-
|
286
|
-
<span class="method-click-advice">click to toggle source</span>
|
287
|
-
|
288
|
-
</div>
|
289
|
-
|
290
|
-
|
291
|
-
<div class="method-description">
|
292
|
-
|
293
|
-
<p>Checks if the user specified the clock mode via the RUBY_PROF_MEASURE_MODE
|
294
|
-
environment variable</p>
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
<div class="method-source-code" id="figure_measure_mode-source">
|
300
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof.rb, line 35</span>
|
301
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">figure_measure_mode</span>
|
302
|
-
<span class="ruby-keyword">case</span> <span class="ruby-constant">ENV</span>[<span class="ruby-string">"RUBY_PROF_MEASURE_MODE"</span>]
|
303
|
-
<span class="ruby-keyword">when</span> <span class="ruby-string">"wall"</span>, <span class="ruby-string">"wall_time"</span>
|
304
|
-
<span class="ruby-constant">RubyProf</span>.<span class="ruby-identifier">measure_mode</span> = <span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">WALL_TIME</span>
|
305
|
-
<span class="ruby-keyword">when</span> <span class="ruby-string">"cpu"</span>, <span class="ruby-string">"cpu_time"</span>
|
306
|
-
<span class="ruby-constant">RubyProf</span>.<span class="ruby-identifier">measure_mode</span> = <span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">CPU_TIME</span>
|
307
|
-
<span class="ruby-keyword">when</span> <span class="ruby-string">"allocations"</span>
|
308
|
-
<span class="ruby-constant">RubyProf</span>.<span class="ruby-identifier">measure_mode</span> = <span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">ALLOCATIONS</span>
|
309
|
-
<span class="ruby-keyword">when</span> <span class="ruby-string">"memory"</span>
|
310
|
-
<span class="ruby-constant">RubyProf</span>.<span class="ruby-identifier">measure_mode</span> = <span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">MEMORY</span>
|
311
|
-
<span class="ruby-keyword">when</span> <span class="ruby-string">"process"</span>, <span class="ruby-string">"process_time"</span>
|
312
|
-
<span class="ruby-constant">RubyProf</span>.<span class="ruby-identifier">measure_mode</span> = <span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">PROCESS_TIME</span>
|
313
|
-
<span class="ruby-keyword">when</span> <span class="ruby-string">"gc_time"</span>
|
314
|
-
<span class="ruby-constant">RubyProf</span>.<span class="ruby-identifier">measure_mode</span> = <span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">GC_TIME</span>
|
315
|
-
<span class="ruby-keyword">when</span> <span class="ruby-string">"gc_runs"</span>
|
316
|
-
<span class="ruby-constant">RubyProf</span>.<span class="ruby-identifier">measure_mode</span> = <span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">GC_RUNS</span>
|
317
|
-
<span class="ruby-keyword">else</span>
|
318
|
-
<span class="ruby-comment"># the default is defined in the measure_mode reader</span>
|
319
|
-
<span class="ruby-keyword">end</span>
|
320
|
-
<span class="ruby-keyword">end</span></pre>
|
321
|
-
</div>
|
322
|
-
|
323
|
-
</div>
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
</div>
|
329
|
-
|
330
|
-
|
331
|
-
<div id="method-c-measure_allocations" class="method-detail ">
|
332
|
-
|
333
|
-
<div class="method-heading">
|
334
|
-
<span class="method-name">measure_allocations</span><span
|
335
|
-
class="method-args">()</span>
|
336
|
-
|
337
|
-
<span class="method-click-advice">click to toggle source</span>
|
338
|
-
|
339
|
-
</div>
|
340
|
-
|
341
|
-
|
342
|
-
<div class="method-description">
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
<div class="method-source-code" id="measure_allocations-source">
|
350
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 9</span>
|
351
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">measure_allocations</span>
|
352
|
-
<span class="ruby-constant">Measure</span><span class="ruby-operator">::</span><span class="ruby-constant">Allocations</span>.<span class="ruby-identifier">measure</span>
|
353
|
-
<span class="ruby-keyword">end</span></pre>
|
354
|
-
</div>
|
355
|
-
|
356
|
-
</div>
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
</div>
|
362
|
-
|
363
|
-
|
364
|
-
<div id="method-c-measure_cpu_time" class="method-detail ">
|
365
|
-
|
366
|
-
<div class="method-heading">
|
367
|
-
<span class="method-name">measure_cpu_time</span><span
|
368
|
-
class="method-args">()</span>
|
369
|
-
|
370
|
-
<span class="method-click-advice">click to toggle source</span>
|
371
|
-
|
372
|
-
</div>
|
373
|
-
|
374
|
-
|
375
|
-
<div class="method-description">
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
<div class="method-source-code" id="measure_cpu_time-source">
|
383
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 13</span>
|
384
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">measure_cpu_time</span>
|
385
|
-
<span class="ruby-constant">Measure</span><span class="ruby-operator">::</span><span class="ruby-constant">CpuTime</span>.<span class="ruby-identifier">measure</span>
|
386
|
-
<span class="ruby-keyword">end</span></pre>
|
387
|
-
</div>
|
388
|
-
|
389
|
-
</div>
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
</div>
|
395
|
-
|
396
|
-
|
397
|
-
<div id="method-c-measure_gc_runs" class="method-detail ">
|
398
|
-
|
399
|
-
<div class="method-heading">
|
400
|
-
<span class="method-name">measure_gc_runs</span><span
|
401
|
-
class="method-args">()</span>
|
402
|
-
|
403
|
-
<span class="method-click-advice">click to toggle source</span>
|
404
|
-
|
405
|
-
</div>
|
406
|
-
|
407
|
-
|
408
|
-
<div class="method-description">
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
<div class="method-source-code" id="measure_gc_runs-source">
|
416
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 17</span>
|
417
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">measure_gc_runs</span>
|
418
|
-
<span class="ruby-constant">Measure</span><span class="ruby-operator">::</span><span class="ruby-constant">GcRuns</span>.<span class="ruby-identifier">measure</span>
|
419
|
-
<span class="ruby-keyword">end</span></pre>
|
420
|
-
</div>
|
421
|
-
|
422
|
-
</div>
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
</div>
|
428
|
-
|
429
|
-
|
430
|
-
<div id="method-c-measure_gc_time" class="method-detail ">
|
431
|
-
|
432
|
-
<div class="method-heading">
|
433
|
-
<span class="method-name">measure_gc_time</span><span
|
434
|
-
class="method-args">()</span>
|
435
|
-
|
436
|
-
<span class="method-click-advice">click to toggle source</span>
|
437
|
-
|
438
|
-
</div>
|
439
|
-
|
440
|
-
|
441
|
-
<div class="method-description">
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
<div class="method-source-code" id="measure_gc_time-source">
|
449
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 21</span>
|
450
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">measure_gc_time</span>
|
451
|
-
<span class="ruby-constant">Measure</span><span class="ruby-operator">::</span><span class="ruby-constant">GcTime</span>.<span class="ruby-identifier">measure</span>
|
452
|
-
<span class="ruby-keyword">end</span></pre>
|
453
|
-
</div>
|
454
|
-
|
455
|
-
</div>
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
</div>
|
461
|
-
|
462
|
-
|
463
|
-
<div id="method-c-measure_memory" class="method-detail ">
|
464
|
-
|
465
|
-
<div class="method-heading">
|
466
|
-
<span class="method-name">measure_memory</span><span
|
467
|
-
class="method-args">()</span>
|
468
|
-
|
469
|
-
<span class="method-click-advice">click to toggle source</span>
|
470
|
-
|
471
|
-
</div>
|
472
|
-
|
473
|
-
|
474
|
-
<div class="method-description">
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
<div class="method-source-code" id="measure_memory-source">
|
482
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 25</span>
|
483
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">measure_memory</span>
|
484
|
-
<span class="ruby-constant">Measure</span><span class="ruby-operator">::</span><span class="ruby-constant">Memory</span>.<span class="ruby-identifier">measure</span>
|
485
|
-
<span class="ruby-keyword">end</span></pre>
|
486
|
-
</div>
|
487
|
-
|
488
|
-
</div>
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
</div>
|
494
|
-
|
495
|
-
|
496
|
-
<div id="method-c-measure_mode" class="method-detail ">
|
497
|
-
|
498
|
-
|
499
|
-
<div class="method-heading">
|
500
|
-
<span class="method-callseq">
|
501
|
-
measure_mode → measure_mode
|
502
|
-
</span>
|
503
|
-
|
504
|
-
<span class="method-click-advice">click to toggle source</span>
|
505
|
-
|
506
|
-
</div>
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
<div class="method-description">
|
511
|
-
|
512
|
-
<p>Returns what ruby-prof is measuring. Valid values include:</p>
|
513
|
-
|
514
|
-
<p>*RubyProf::WALL_TIME - Measure wall time using gettimeofday on Linx and
|
515
|
-
GetLocalTime on Windows. This is default. *RubyProf::PROCESS_TIME -
|
516
|
-
Measure process time. It is implemented using the clock functions in the C
|
517
|
-
Runtime library. *RubyProf::CPU_TIME - Measure time using the CPU clock
|
518
|
-
counter. This mode is only supported on Pentium or PowerPC platforms.
|
519
|
-
*RubyProf::ALLOCATIONS - Measure object allocations. This requires a
|
520
|
-
patched Ruby interpreter. *RubyProf::MEMORY - Measure memory size. This
|
521
|
-
requires a patched Ruby interpreter. *RubyProf::GC_RUNS - Measure number of
|
522
|
-
garbage collections. This requires a patched Ruby interpreter.
|
523
|
-
*RubyProf::GC_TIME - Measure time spent doing garbage collection. This
|
524
|
-
requires a patched Ruby interpreter.*/</p>
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
<div class="method-source-code" id="measure_mode-source">
|
530
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 50</span>
|
531
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">measure_mode</span>
|
532
|
-
<span class="ruby-ivar">@measure_mode</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">WALL_TIME</span>
|
533
|
-
<span class="ruby-keyword">end</span></pre>
|
534
|
-
</div>
|
535
|
-
|
536
|
-
</div>
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
</div>
|
542
|
-
|
543
|
-
|
544
|
-
<div id="method-c-measure_mode-3D" class="method-detail ">
|
545
|
-
|
546
|
-
|
547
|
-
<div class="method-heading">
|
548
|
-
<span class="method-callseq">
|
549
|
-
measure_mode=value → void
|
550
|
-
</span>
|
551
|
-
|
552
|
-
<span class="method-click-advice">click to toggle source</span>
|
553
|
-
|
554
|
-
</div>
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
<div class="method-description">
|
559
|
-
|
560
|
-
<p>Specifies what ruby-prof should measure. Valid values include:</p>
|
561
|
-
|
562
|
-
<p>*RubyProf::WALL_TIME - Measure wall time using gettimeofday on Linx and
|
563
|
-
GetLocalTime on Windows. This is default. *RubyProf::PROCESS_TIME -
|
564
|
-
Measure process time. It is implemented using the clock functions in the C
|
565
|
-
Runtime library. *RubyProf::CPU_TIME - Measure time using the CPU clock
|
566
|
-
counter. This mode is only supported on Pentium or PowerPC platforms.
|
567
|
-
*RubyProf::ALLOCATIONS - Measure object allocations. This requires a
|
568
|
-
patched Ruby interpreter. *RubyProf::MEMORY - Measure memory size. This
|
569
|
-
requires a patched Ruby interpreter. *RubyProf::GC_RUNS - Measure number of
|
570
|
-
garbage collections. This requires a patched Ruby interpreter.
|
571
|
-
*RubyProf::GC_TIME - Measure time spent doing garbage collection. This
|
572
|
-
requires a patched Ruby interpreter.*/</p>
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
<div class="method-source-code" id="measure_mode-3D-source">
|
578
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 66</span>
|
579
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">measure_mode=</span>(<span class="ruby-identifier">value</span>)
|
580
|
-
<span class="ruby-ivar">@measure_mode</span> = <span class="ruby-identifier">value</span>
|
581
|
-
<span class="ruby-keyword">end</span></pre>
|
582
|
-
</div>
|
583
|
-
|
584
|
-
</div>
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
</div>
|
590
|
-
|
591
|
-
|
592
|
-
<div id="method-c-measure_mode_string" class="method-detail ">
|
593
|
-
|
594
|
-
<div class="method-heading">
|
595
|
-
<span class="method-name">measure_mode_string</span><span
|
596
|
-
class="method-args">()</span>
|
597
|
-
|
598
|
-
<span class="method-click-advice">click to toggle source</span>
|
599
|
-
|
600
|
-
</div>
|
601
|
-
|
602
|
-
|
603
|
-
<div class="method-description">
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
<div class="method-source-code" id="measure_mode_string-source">
|
611
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 70</span>
|
612
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">measure_mode_string</span>
|
613
|
-
<span class="ruby-keyword">case</span> <span class="ruby-identifier">measure_mode</span>
|
614
|
-
<span class="ruby-keyword">when</span> <span class="ruby-constant">WALL_TIME</span> <span class="ruby-keyword">then</span> <span class="ruby-string">"wall_time"</span>
|
615
|
-
<span class="ruby-keyword">when</span> <span class="ruby-constant">CPU_TIME</span> <span class="ruby-keyword">then</span> <span class="ruby-string">"cpu_time"</span>
|
616
|
-
<span class="ruby-keyword">when</span> <span class="ruby-constant">PROCESS_TIME</span> <span class="ruby-keyword">then</span> <span class="ruby-string">"process_time_time"</span>
|
617
|
-
<span class="ruby-keyword">when</span> <span class="ruby-constant">ALLOCATIONS</span> <span class="ruby-keyword">then</span> <span class="ruby-string">"allocations"</span>
|
618
|
-
<span class="ruby-keyword">when</span> <span class="ruby-constant">MEMORY</span> <span class="ruby-keyword">then</span> <span class="ruby-string">"memory"</span>
|
619
|
-
<span class="ruby-keyword">when</span> <span class="ruby-constant">GC_TIME</span> <span class="ruby-keyword">then</span> <span class="ruby-string">"gc_time"</span>
|
620
|
-
<span class="ruby-keyword">when</span> <span class="ruby-constant">GC_RUNS</span> <span class="ruby-keyword">then</span> <span class="ruby-string">"gc_runs"</span>
|
621
|
-
<span class="ruby-keyword">end</span>
|
622
|
-
<span class="ruby-keyword">end</span></pre>
|
623
|
-
</div>
|
624
|
-
|
625
|
-
</div>
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
</div>
|
631
|
-
|
632
|
-
|
633
|
-
<div id="method-c-measure_process_time" class="method-detail ">
|
634
|
-
|
635
|
-
<div class="method-heading">
|
636
|
-
<span class="method-name">measure_process_time</span><span
|
637
|
-
class="method-args">()</span>
|
638
|
-
|
639
|
-
<span class="method-click-advice">click to toggle source</span>
|
640
|
-
|
641
|
-
</div>
|
642
|
-
|
643
|
-
|
644
|
-
<div class="method-description">
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
<div class="method-source-code" id="measure_process_time-source">
|
652
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 29</span>
|
653
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">measure_process_time</span>
|
654
|
-
<span class="ruby-constant">Measure</span><span class="ruby-operator">::</span><span class="ruby-constant">ProcessTime</span>.<span class="ruby-identifier">measure</span>
|
655
|
-
<span class="ruby-keyword">end</span></pre>
|
656
|
-
</div>
|
657
|
-
|
658
|
-
</div>
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
</div>
|
664
|
-
|
665
|
-
|
666
|
-
<div id="method-c-measure_wall_time" class="method-detail ">
|
667
|
-
|
668
|
-
<div class="method-heading">
|
669
|
-
<span class="method-name">measure_wall_time</span><span
|
670
|
-
class="method-args">()</span>
|
671
|
-
|
672
|
-
<span class="method-click-advice">click to toggle source</span>
|
673
|
-
|
674
|
-
</div>
|
675
|
-
|
676
|
-
|
677
|
-
<div class="method-description">
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
<div class="method-source-code" id="measure_wall_time-source">
|
685
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 33</span>
|
686
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">measure_wall_time</span>
|
687
|
-
<span class="ruby-constant">Measure</span><span class="ruby-operator">::</span><span class="ruby-constant">WallTime</span>.<span class="ruby-identifier">measure</span>
|
688
|
-
<span class="ruby-keyword">end</span></pre>
|
689
|
-
</div>
|
690
|
-
|
691
|
-
</div>
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
</div>
|
697
|
-
|
698
|
-
|
699
|
-
<div id="method-c-pause" class="method-detail ">
|
700
|
-
|
701
|
-
<div class="method-heading">
|
702
|
-
<span class="method-name">pause</span><span
|
703
|
-
class="method-args">()</span>
|
704
|
-
|
705
|
-
<span class="method-click-advice">click to toggle source</span>
|
706
|
-
|
707
|
-
</div>
|
708
|
-
|
709
|
-
|
710
|
-
<div class="method-description">
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
<div class="method-source-code" id="pause-source">
|
718
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 113</span>
|
719
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">pause</span>
|
720
|
-
<span class="ruby-identifier">ensure_running!</span>
|
721
|
-
<span class="ruby-identifier">disable_gc_stats_if_needed</span>
|
722
|
-
<span class="ruby-ivar">@profile</span>.<span class="ruby-identifier">pause</span>
|
723
|
-
<span class="ruby-keyword">end</span></pre>
|
724
|
-
</div>
|
725
|
-
|
726
|
-
</div>
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
</div>
|
732
|
-
|
733
|
-
|
734
|
-
<div id="method-c-profile" class="method-detail ">
|
735
|
-
|
736
|
-
<div class="method-heading">
|
737
|
-
<span class="method-name">profile</span><span
|
738
|
-
class="method-args">(options = {}, &block)</span>
|
739
|
-
|
740
|
-
<span class="method-click-advice">click to toggle source</span>
|
741
|
-
|
742
|
-
</div>
|
743
|
-
|
744
|
-
|
745
|
-
<div class="method-description">
|
746
|
-
|
747
|
-
<p><a href="RubyProf/Profile.html">Profile</a> a block</p>
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
<div class="method-source-code" id="profile-source">
|
753
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 142</span>
|
754
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">profile</span>(<span class="ruby-identifier">options</span> = {}, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
755
|
-
<span class="ruby-identifier">ensure_not_running!</span>
|
756
|
-
<span class="ruby-identifier">gc_stat_was_enabled</span> = <span class="ruby-identifier">enable_gc_stats_if_needed</span>
|
757
|
-
<span class="ruby-identifier">options</span> = { <span class="ruby-identifier">measure_mode</span><span class="ruby-operator">:</span> <span class="ruby-identifier">measure_mode</span>, <span class="ruby-identifier">exclude_threads</span><span class="ruby-operator">:</span> <span class="ruby-identifier">exclude_threads</span> }.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">options</span>)
|
758
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-constant">Profile</span>.<span class="ruby-identifier">profile</span>(<span class="ruby-identifier">options</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
759
|
-
<span class="ruby-identifier">disable_gc_stats_if_needed</span>(<span class="ruby-identifier">gc_stat_was_enabled</span>)
|
760
|
-
<span class="ruby-identifier">result</span>
|
761
|
-
<span class="ruby-keyword">end</span></pre>
|
762
|
-
</div>
|
763
|
-
|
764
|
-
</div>
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
</div>
|
770
|
-
|
771
|
-
|
772
|
-
<div id="method-c-resume" class="method-detail ">
|
773
|
-
|
774
|
-
<div class="method-heading">
|
775
|
-
<span class="method-name">resume</span><span
|
776
|
-
class="method-args">()</span>
|
777
|
-
|
778
|
-
<span class="method-click-advice">click to toggle source</span>
|
779
|
-
|
780
|
-
</div>
|
781
|
-
|
782
|
-
|
783
|
-
<div class="method-description">
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
<div class="method-source-code" id="resume-source">
|
791
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 127</span>
|
792
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">resume</span>
|
793
|
-
<span class="ruby-identifier">ensure_running!</span>
|
794
|
-
<span class="ruby-identifier">enable_gc_stats_if_needed</span>
|
795
|
-
<span class="ruby-ivar">@profile</span>.<span class="ruby-identifier">resume</span>
|
796
|
-
<span class="ruby-keyword">end</span></pre>
|
797
|
-
</div>
|
798
|
-
|
799
|
-
</div>
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
</div>
|
805
|
-
|
806
|
-
|
807
|
-
<div id="method-c-running-3F" class="method-detail ">
|
808
|
-
|
809
|
-
<div class="method-heading">
|
810
|
-
<span class="method-name">running?</span><span
|
811
|
-
class="method-args">()</span>
|
812
|
-
|
813
|
-
<span class="method-click-advice">click to toggle source</span>
|
814
|
-
|
815
|
-
</div>
|
816
|
-
|
817
|
-
|
818
|
-
<div class="method-description">
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
<div class="method-source-code" id="running-3F-source">
|
826
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 119</span>
|
827
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">running?</span>
|
828
|
-
<span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-ivar">@profile</span>) <span class="ruby-keyword">and</span> <span class="ruby-ivar">@profile</span>
|
829
|
-
<span class="ruby-ivar">@profile</span>.<span class="ruby-identifier">running?</span>
|
830
|
-
<span class="ruby-keyword">else</span>
|
831
|
-
<span class="ruby-keyword">false</span>
|
832
|
-
<span class="ruby-keyword">end</span>
|
833
|
-
<span class="ruby-keyword">end</span></pre>
|
834
|
-
</div>
|
835
|
-
|
836
|
-
</div>
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
</div>
|
842
|
-
|
843
|
-
|
844
|
-
<div id="method-c-start" class="method-detail ">
|
845
|
-
|
846
|
-
<div class="method-heading">
|
847
|
-
<span class="method-name">start</span><span
|
848
|
-
class="method-args">()</span>
|
849
|
-
|
850
|
-
<span class="method-click-advice">click to toggle source</span>
|
851
|
-
|
852
|
-
</div>
|
853
|
-
|
854
|
-
|
855
|
-
<div class="method-description">
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
<div class="method-source-code" id="start-source">
|
863
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 106</span>
|
864
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span>
|
865
|
-
<span class="ruby-identifier">ensure_not_running!</span>
|
866
|
-
<span class="ruby-ivar">@profile</span> = <span class="ruby-constant">Profile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">measure_mode</span><span class="ruby-operator">:</span> <span class="ruby-identifier">measure_mode</span>, <span class="ruby-identifier">exclude_threads</span><span class="ruby-operator">:</span> <span class="ruby-identifier">exclude_threads</span>)
|
867
|
-
<span class="ruby-identifier">enable_gc_stats_if_needed</span>
|
868
|
-
<span class="ruby-ivar">@profile</span>.<span class="ruby-identifier">start</span>
|
869
|
-
<span class="ruby-keyword">end</span></pre>
|
870
|
-
</div>
|
871
|
-
|
872
|
-
</div>
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
</div>
|
878
|
-
|
879
|
-
|
880
|
-
<div id="method-c-start_script" class="method-detail ">
|
881
|
-
|
882
|
-
<div class="method-heading">
|
883
|
-
<span class="method-name">start_script</span><span
|
884
|
-
class="method-args">(script)</span>
|
885
|
-
|
886
|
-
<span class="method-click-advice">click to toggle source</span>
|
887
|
-
|
888
|
-
</div>
|
889
|
-
|
890
|
-
|
891
|
-
<div class="method-description">
|
892
|
-
|
893
|
-
<p>Profiling</p>
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
<div class="method-source-code" id="start_script-source">
|
899
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 101</span>
|
900
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">start_script</span>(<span class="ruby-identifier">script</span>)
|
901
|
-
<span class="ruby-identifier">start</span>
|
902
|
-
<span class="ruby-identifier">load</span> <span class="ruby-identifier">script</span>
|
903
|
-
<span class="ruby-keyword">end</span></pre>
|
904
|
-
</div>
|
905
|
-
|
906
|
-
</div>
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
</div>
|
912
|
-
|
913
|
-
|
914
|
-
<div id="method-c-stop" class="method-detail ">
|
915
|
-
|
916
|
-
<div class="method-heading">
|
917
|
-
<span class="method-name">stop</span><span
|
918
|
-
class="method-args">()</span>
|
919
|
-
|
920
|
-
<span class="method-click-advice">click to toggle source</span>
|
921
|
-
|
922
|
-
</div>
|
923
|
-
|
924
|
-
|
925
|
-
<div class="method-description">
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
<div class="method-source-code" id="stop-source">
|
933
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/compatibility.rb, line 133</span>
|
934
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">stop</span>
|
935
|
-
<span class="ruby-identifier">ensure_running!</span>
|
936
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-ivar">@profile</span>.<span class="ruby-identifier">stop</span>
|
937
|
-
<span class="ruby-identifier">disable_gc_stats_if_needed</span>
|
938
|
-
<span class="ruby-ivar">@profile</span> = <span class="ruby-keyword">nil</span>
|
939
|
-
<span class="ruby-identifier">result</span>
|
940
|
-
<span class="ruby-keyword">end</span></pre>
|
941
|
-
</div>
|
942
|
-
|
943
|
-
</div>
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
</div>
|
949
|
-
|
950
|
-
|
951
|
-
</section>
|
952
|
-
|
953
|
-
</section>
|
954
|
-
</main>
|
955
|
-
|
956
|
-
|
957
|
-
<footer id="validator-badges" role="contentinfo">
|
958
|
-
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
959
|
-
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.2.
|
960
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
961
|
-
</footer>
|
962
|
-
|