RubyRun_CE 0.9.0-powerpc-darwin
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +13 -0
- data/README +75 -0
- data/Rakefile +241 -0
- data/bin/confgure +2 -0
- data/docs/RubyRunCE_09.htm +6346 -0
- data/docs/RubyRunCE_09.pdf +0 -0
- data/docs/RubyRunCE_09_files/colorschememapping.xml +2 -0
- data/docs/RubyRunCE_09_files/filelist.xml +29 -0
- data/docs/RubyRunCE_09_files/header.htm +142 -0
- data/docs/RubyRunCE_09_files/image001.jpg +0 -0
- data/docs/RubyRunCE_09_files/image002.jpg +0 -0
- data/docs/RubyRunCE_09_files/image003.jpg +0 -0
- data/docs/RubyRunCE_09_files/image004.jpg +0 -0
- data/docs/RubyRunCE_09_files/image005.jpg +0 -0
- data/docs/RubyRunCE_09_files/image006.jpg +0 -0
- data/docs/RubyRunCE_09_files/image007.jpg +0 -0
- data/docs/RubyRunCE_09_files/image008.jpg +0 -0
- data/docs/RubyRunCE_09_files/image009.jpg +0 -0
- data/docs/RubyRunCE_09_files/image010.jpg +0 -0
- data/docs/RubyRunCE_09_files/image011.jpg +0 -0
- data/docs/RubyRunCE_09_files/image012.jpg +0 -0
- data/docs/RubyRunCE_09_files/image013.jpg +0 -0
- data/docs/RubyRunCE_09_files/image014.jpg +0 -0
- data/docs/RubyRunCE_09_files/image015.jpg +0 -0
- data/docs/RubyRunCE_09_files/image016.jpg +0 -0
- data/docs/RubyRunCE_09_files/image017.png +0 -0
- data/docs/RubyRunCE_09_files/image018.jpg +0 -0
- data/docs/RubyRunCE_09_files/image019.jpg +0 -0
- data/docs/RubyRunCE_09_files/image020.jpg +0 -0
- data/docs/RubyRunCE_09_files/image021.jpg +0 -0
- data/docs/RubyRunCE_09_files/image022.png +0 -0
- data/docs/RubyRunCE_09_files/themedata.thmx +0 -0
- data/etc/rubyrun_opts.yml +132 -0
- data/ext/extconf.rb +4 -0
- data/ext/rubyrunnative__.bundle +0 -0
- data/ext/rubyrunnative__.c +154 -0
- data/ext/rubyrunnative__.def +2 -0
- data/ext/rubyrunnative__.h +36 -0
- data/ext/rubyrunnative__.so +0 -0
- data/ext/rubyrunnative__linux.so +0 -0
- data/html/classes/Module.html +174 -0
- data/html/classes/Object.html +151 -0
- data/html/classes/RubyRunBufferMgr__.html +182 -0
- data/html/classes/RubyRunCommander__.html +578 -0
- data/html/classes/RubyRunDad__.html +144 -0
- data/html/classes/RubyRunGlobals.html +248 -0
- data/html/classes/RubyRunHTMLWriter.html +186 -0
- data/html/classes/RubyRunHTMLWriter/RubyRunHTMLDevice.html +157 -0
- data/html/classes/RubyRunHTML__.html +198 -0
- data/html/classes/RubyRunInitializer__.html +821 -0
- data/html/classes/RubyRunInstrumentor__.html +576 -0
- data/html/classes/RubyRunMonitor__.html +298 -0
- data/html/classes/RubyRunRSS.html +302 -0
- data/html/classes/RubyRunReport__.html +294 -0
- data/html/classes/RubyRunTracer__.html +253 -0
- data/html/classes/RubyRunUtils__.html +376 -0
- data/html/created.rid +1 -0
- data/html/files/LICENSE.html +119 -0
- data/html/files/README.html +196 -0
- data/html/files/lib/rubyrun/rubyrun_buffer_mgr___rb.html +101 -0
- data/html/files/lib/rubyrun/rubyrun_commander___rb.html +101 -0
- data/html/files/lib/rubyrun/rubyrun_dad___rb.html +101 -0
- data/html/files/lib/rubyrun/rubyrun_globals_rb.html +101 -0
- data/html/files/lib/rubyrun/rubyrun_html___rb.html +101 -0
- data/html/files/lib/rubyrun/rubyrun_html_writer___rb.html +108 -0
- data/html/files/lib/rubyrun/rubyrun_initializer___rb.html +112 -0
- data/html/files/lib/rubyrun/rubyrun_instrumentor___rb.html +116 -0
- data/html/files/lib/rubyrun/rubyrun_monitor___rb.html +116 -0
- data/html/files/lib/rubyrun/rubyrun_rb.html +121 -0
- data/html/files/lib/rubyrun/rubyrun_report___rb.html +101 -0
- data/html/files/lib/rubyrun/rubyrun_rss___rb.html +108 -0
- data/html/files/lib/rubyrun/rubyrun_tracer___rb.html +110 -0
- data/html/files/lib/rubyrun/rubyrun_utils___rb.html +108 -0
- data/html/files/lib/rubyrunm_rb.html +116 -0
- data/html/fr_class_index.html +42 -0
- data/html/fr_file_index.html +43 -0
- data/html/fr_method_index.html +96 -0
- data/html/index.html +24 -0
- data/html/rdoc-style.css +208 -0
- data/lib/rubyrun/rubyrun.rb +78 -0
- data/lib/rubyrun/rubyrun_buffer_mgr__.rb +49 -0
- data/lib/rubyrun/rubyrun_commander__.rb +196 -0
- data/lib/rubyrun/rubyrun_dad__.rb +35 -0
- data/lib/rubyrun/rubyrun_globals.rb +51 -0
- data/lib/rubyrun/rubyrun_html__.rb +136 -0
- data/lib/rubyrun/rubyrun_html_writer__.rb +64 -0
- data/lib/rubyrun/rubyrun_initializer__.rb +286 -0
- data/lib/rubyrun/rubyrun_instrumentor__.rb +226 -0
- data/lib/rubyrun/rubyrun_monitor__.rb +237 -0
- data/lib/rubyrun/rubyrun_report__.rb +109 -0
- data/lib/rubyrun/rubyrun_rss__.rb +97 -0
- data/lib/rubyrun/rubyrun_tracer__.rb +79 -0
- data/lib/rubyrun/rubyrun_utils__.rb +98 -0
- data/lib/rubyrun/rubyrunnative__.bundle +0 -0
- data/lib/rubyrunm.rb +10 -0
- metadata +149 -0
@@ -0,0 +1,294 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: RubyRunReport__</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">RubyRunReport__</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/rubyrun/rubyrun_report___rb.html">
|
59
|
+
lib/rubyrun/rubyrun_report__.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div id="method-list">
|
80
|
+
<h3 class="section-bar">Methods</h3>
|
81
|
+
|
82
|
+
<div class="name-list">
|
83
|
+
<a href="#M000036">add_perf_summary_rss_item</a>
|
84
|
+
<a href="#M000035">add_txn_log_csv_item</a>
|
85
|
+
<a href="#M000038">create_csv_files</a>
|
86
|
+
<a href="#M000037">create_rss_channels</a>
|
87
|
+
</div>
|
88
|
+
</div>
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
|
93
|
+
<!-- if includes -->
|
94
|
+
|
95
|
+
<div id="section">
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
<!-- if method_list -->
|
105
|
+
<div id="methods">
|
106
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
107
|
+
|
108
|
+
<div id="method-M000036" class="method-detail">
|
109
|
+
<a name="M000036"></a>
|
110
|
+
|
111
|
+
<div class="method-heading">
|
112
|
+
<a href="#M000036" class="method-signature">
|
113
|
+
<span class="method-name">add_perf_summary_rss_item</span><span class="method-args">(req_count)</span>
|
114
|
+
</a>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<div class="method-description">
|
118
|
+
<p>
|
119
|
+
Add an item to performance summary RSS channel
|
120
|
+
</p>
|
121
|
+
<p><a class="source-toggle" href="#"
|
122
|
+
onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
|
123
|
+
<div class="method-source-code" id="M000036-source">
|
124
|
+
<pre>
|
125
|
+
<span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_report__.rb, line 37</span>
|
126
|
+
37: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_perf_summary_rss_item</span>(<span class="ruby-identifier">req_count</span>)
|
127
|
+
38: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">$rubyrun_host_with_port</span> <span class="ruby-comment cmt"># Server started but no request yet</span>
|
128
|
+
39: <span class="ruby-comment cmt"># First, Throughput Summary</span>
|
129
|
+
40: <span class="ruby-identifier">$rubyrun_throughput</span>.<span class="ruby-identifier">shift</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$rubyrun_throughput</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">$rubyrun_report_shift_age</span>
|
130
|
+
41: <span class="ruby-identifier">index</span> = <span class="ruby-identifier">$rubyrun_throughput</span>.<span class="ruby-identifier">length</span>
|
131
|
+
42: <span class="ruby-identifier">$rubyrun_throughput</span>[<span class="ruby-identifier">index</span>] = [<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>, <span class="ruby-identifier">req_count</span>.<span class="ruby-identifier">to_f</span><span class="ruby-operator">/</span><span class="ruby-identifier">$rubyrun_report_timer</span><span class="ruby-operator">*</span><span class="ruby-value">60</span>]
|
132
|
+
43: <span class="ruby-identifier">bar_content</span> = <span class="ruby-value str">''</span>
|
133
|
+
44: <span class="ruby-identifier">label_content</span> = <span class="ruby-value str">''</span>
|
134
|
+
45: <span class="ruby-identifier">max</span> = (<span class="ruby-identifier">$rubyrun_throughput</span>.<span class="ruby-identifier">max</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,<span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>[<span class="ruby-value">1</span>] <span class="ruby-operator"><=></span> <span class="ruby-identifier">b</span>[<span class="ruby-value">1</span>]})[<span class="ruby-value">1</span>]
|
135
|
+
46: <span class="ruby-identifier">max</span> = <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">max</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-comment cmt"># Avoid divided by zero below</span>
|
136
|
+
47: <span class="ruby-identifier">$rubyrun_throughput</span>.<span class="ruby-identifier">reverse!</span>
|
137
|
+
48: <span class="ruby-identifier">$rubyrun_report_shift_age</span>.<span class="ruby-identifier">times</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
138
|
+
49: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$rubyrun_throughput</span>[<span class="ruby-identifier">i</span>]
|
139
|
+
50: <span class="ruby-identifier">bar_content</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-constant">THROUGHPUT_BAR_TABLE</span>, <span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">'%0.0f'</span>,<span class="ruby-identifier">$rubyrun_throughput</span>[<span class="ruby-identifier">i</span>][<span class="ruby-value">1</span>]), (<span class="ruby-identifier">$rubyrun_throughput</span>[<span class="ruby-identifier">i</span>][<span class="ruby-value">1</span>]<span class="ruby-operator">*</span><span class="ruby-value">250</span><span class="ruby-operator">/</span><span class="ruby-identifier">max</span>).<span class="ruby-identifier">to_i</span>)
|
140
|
+
51: <span class="ruby-identifier">label_content</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-constant">THROUGHPUT_LABEL_TABLE</span>, <span class="ruby-identifier">$rubyrun_throughput</span>[<span class="ruby-identifier">i</span>][<span class="ruby-value">0</span>].<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">"%H:%M %b&nbsp;%d"</span>))
|
141
|
+
52: <span class="ruby-keyword kw">else</span>
|
142
|
+
53: <span class="ruby-identifier">bar_content</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-constant">THROUGHPUT_BAR_TABLE</span>, <span class="ruby-value str">''</span>, <span class="ruby-value">0</span>)
|
143
|
+
54: <span class="ruby-identifier">label_content</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-constant">THROUGHPUT_LABEL_TABLE</span>, <span class="ruby-value str">''</span>)
|
144
|
+
55: <span class="ruby-keyword kw">end</span>
|
145
|
+
56: }
|
146
|
+
57: <span class="ruby-identifier">$rubyrun_throughput</span>.<span class="ruby-identifier">reverse!</span>
|
147
|
+
58: <span class="ruby-identifier">html_content</span> = <span class="ruby-constant">THROUGHPUT_HTML</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/%THROUGHPUT_BAR_TABLE%/</span>, <span class="ruby-identifier">bar_content</span>)
|
148
|
+
59: <span class="ruby-identifier">html_content</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/%THROUGHPUT_LABEL_TABLE%/</span>, <span class="ruby-identifier">label_content</span>)
|
149
|
+
60: <span class="ruby-identifier">html_content</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/%APPS_NAME%/</span>,<span class="ruby-constant">Rails</span><span class="ruby-operator">::</span><span class="ruby-constant">Configuration</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">root_path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>).<span class="ruby-identifier">last</span>)
|
150
|
+
61: <span class="ruby-identifier">html_content</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/%TIMESTAMP%/</span>,<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">"%H:%M:%S %m/%d/%Y"</span>))
|
151
|
+
62: <span class="ruby-comment cmt"># Second, Top Slowest Requests</span>
|
152
|
+
63: <span class="ruby-identifier">results</span> = <span class="ruby-identifier">sort_performance_metrics</span>
|
153
|
+
64: <span class="ruby-identifier">table_content</span> = <span class="ruby-value str">''</span>
|
154
|
+
65: <span class="ruby-value">10</span>.<span class="ruby-identifier">times</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
155
|
+
66: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">results</span>[<span class="ruby-identifier">i</span>]
|
156
|
+
67: <span class="ruby-identifier">table_content</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-constant">TOP_SLOWEST_REQUESTS_TABLE</span>, <span class="ruby-identifier">results</span>[<span class="ruby-identifier">i</span>][<span class="ruby-value">0</span>],
|
157
|
+
68: (<span class="ruby-value">150</span><span class="ruby-operator">*</span><span class="ruby-identifier">results</span>[<span class="ruby-identifier">i</span>][<span class="ruby-value">1</span>][<span class="ruby-value">0</span>]<span class="ruby-operator">/</span><span class="ruby-identifier">results</span>[<span class="ruby-value">0</span>][<span class="ruby-value">1</span>][<span class="ruby-value">0</span>]).<span class="ruby-identifier">round</span>, <span class="ruby-identifier">results</span>[<span class="ruby-identifier">i</span>][<span class="ruby-value">1</span>][<span class="ruby-value">0</span>])
|
158
|
+
69: }
|
159
|
+
70: (<span class="ruby-identifier">html_content</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">TOP_SLOWEST_REQUESTS_HTML</span>).<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/%TOP_SLOWEST_REQUESTS_TABLE%/</span>,<span class="ruby-identifier">table_content</span>)
|
160
|
+
71: <span class="ruby-comment cmt"># Third, Request Performance Breakdown</span>
|
161
|
+
72: <span class="ruby-identifier">odd</span> = <span class="ruby-keyword kw">true</span>
|
162
|
+
73: <span class="ruby-identifier">table_content</span> = <span class="ruby-value str">''</span>
|
163
|
+
74: <span class="ruby-identifier">results</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">metrics</span><span class="ruby-operator">|</span>
|
164
|
+
75: <span class="ruby-identifier">table_content</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-node">"#{odd ? REQ_PERF_BREAKDOWN_TABLE_ODD : REQ_PERF_BREAKDOWN_TABLE_EVEN}"</span>, <span class="ruby-identifier">metrics</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">6</span>], <span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">0</span>], <span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">1</span>], (<span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">1</span>]<span class="ruby-operator">/</span><span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">0</span>]<span class="ruby-operator">*</span><span class="ruby-value">100</span>).<span class="ruby-identifier">round</span>, <span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">2</span>], (<span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">2</span>]<span class="ruby-operator">/</span><span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">0</span>]<span class="ruby-operator">*</span><span class="ruby-value">100</span>).<span class="ruby-identifier">round</span>, <span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">3</span>], (<span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">3</span>]<span class="ruby-operator">/</span><span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">0</span>]<span class="ruby-operator">*</span><span class="ruby-value">100</span>).<span class="ruby-identifier">round</span>, <span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">5</span>], (<span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">5</span>]<span class="ruby-operator">/</span><span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">0</span>]<span class="ruby-operator">*</span><span class="ruby-value">100</span>).<span class="ruby-identifier">round</span>, <span class="ruby-identifier">metrics</span>[<span class="ruby-value">1</span>][<span class="ruby-value">4</span>])
|
165
|
+
76: <span class="ruby-identifier">odd</span> = <span class="ruby-identifier">odd</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">false</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">true</span>
|
166
|
+
77: }
|
167
|
+
78: (<span class="ruby-identifier">html_content</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">REQ_PERF_BREAKDOWN_HTML</span>).<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/%REQ_PERF_BREAKDOWN_TABLE%/</span>,<span class="ruby-identifier">table_content</span>);
|
168
|
+
79: <span class="ruby-identifier">$rubyrun_perf_summary_rss</span>.<span class="ruby-identifier">add_item</span>(<span class="ruby-constant">RubyRunRSS</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBYRUN_RSS_PERF_SUMMARY_ITEM_TITLE</span>,
|
169
|
+
80: <span class="ruby-constant">RubyRunRSS</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBYRUN_RSS_PERF_SUMMARY_ITEM_DESCRIPTION</span>, <span class="ruby-identifier">html_content</span>)
|
170
|
+
81: <span class="ruby-keyword kw">end</span>
|
171
|
+
</pre>
|
172
|
+
</div>
|
173
|
+
</div>
|
174
|
+
</div>
|
175
|
+
|
176
|
+
<div id="method-M000035" class="method-detail">
|
177
|
+
<a name="M000035"></a>
|
178
|
+
|
179
|
+
<div class="method-heading">
|
180
|
+
<a href="#M000035" class="method-signature">
|
181
|
+
<span class="method-name">add_txn_log_csv_item</span><span class="method-args">(buffer)</span>
|
182
|
+
</a>
|
183
|
+
</div>
|
184
|
+
|
185
|
+
<div class="method-description">
|
186
|
+
<p>
|
187
|
+
Add entries to transaction log CSV file metrics structure metrics[0] Thread
|
188
|
+
ID metrics[1] Timestamp of the request metrics[2] URL metrics[3] Controller
|
189
|
+
name metrics[4] Action name metrics[5] Response time metrics[6] Action time
|
190
|
+
metrics[7] Database IO time metrics[8] View time metrics[9] Uncaptured time
|
191
|
+
metrics[10] Dispatch wait time CSV format is URL, thread ID, timestamp,
|
192
|
+
response time, action time,
|
193
|
+
</p>
|
194
|
+
<pre>
|
195
|
+
database io time, view time, dispatch wait time, uncaptured time
|
196
|
+
</pre>
|
197
|
+
<p><a class="source-toggle" href="#"
|
198
|
+
onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
|
199
|
+
<div class="method-source-code" id="M000035-source">
|
200
|
+
<pre>
|
201
|
+
<span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_report__.rb, line 28</span>
|
202
|
+
28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_txn_log_csv_item</span>(<span class="ruby-identifier">buffer</span>)
|
203
|
+
29: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
204
|
+
30: <span class="ruby-identifier">$rubyrun_txn_log_reporter</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"\n----- Transaction Log at #{Time.now.ctime} -----"</span>
|
205
|
+
31: <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">metrics</span><span class="ruby-operator">|</span>
|
206
|
+
32: <span class="ruby-identifier">$rubyrun_txn_log_reporter</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"#{metrics[2]},#{metrics[0]},#{metrics[1].strftime("%H:%M:%S")}.#{("%.3f" % metrics[1].to_f).split('.')[1]} #{metrics[1].strftime("%m/%d/%y")},#{sprintf("%0.3f", metrics[5])},#{sprintf("%0.3f", metrics[6])},#{sprintf("%0.3f", metrics[7])},#{sprintf("%0.3f", metrics[8])},#{sprintf("%0.3f", metrics[10])},#{sprintf("%0.3f", metrics[9])}"</span>
|
207
|
+
33: }
|
208
|
+
34: <span class="ruby-keyword kw">end</span>
|
209
|
+
</pre>
|
210
|
+
</div>
|
211
|
+
</div>
|
212
|
+
</div>
|
213
|
+
|
214
|
+
<div id="method-M000038" class="method-detail">
|
215
|
+
<a name="M000038"></a>
|
216
|
+
|
217
|
+
<div class="method-heading">
|
218
|
+
<a href="#M000038" class="method-signature">
|
219
|
+
<span class="method-name">create_csv_files</span><span class="method-args">()</span>
|
220
|
+
</a>
|
221
|
+
</div>
|
222
|
+
|
223
|
+
<div class="method-description">
|
224
|
+
<p>
|
225
|
+
Create the CSV files
|
226
|
+
</p>
|
227
|
+
<p><a class="source-toggle" href="#"
|
228
|
+
onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
|
229
|
+
<div class="method-source-code" id="M000038-source">
|
230
|
+
<pre>
|
231
|
+
<span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_report__.rb, line 104</span>
|
232
|
+
104: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_csv_files</span>
|
233
|
+
105: <span class="ruby-identifier">$rubyrun_txn_log_reporter</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"#{@rubyrun_report_folder}/#{File.basename($0, ".*")}_#{$$.to_s}_txn_log.csv"</span>, <span class="ruby-identifier">shift_age</span> = <span class="ruby-value">10</span>, <span class="ruby-identifier">shift_size</span> = <span class="ruby-value">4096000</span>)
|
234
|
+
106: <span class="ruby-identifier">$rubyrun_txn_log_reporter</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"#\n# Format: [URL],[thread ID],[timestamp],[response time],[action time],[database IO time],[view time],[dispatch delay time],[uncaptured time]\n#"</span>
|
235
|
+
107: <span class="ruby-keyword kw">end</span>
|
236
|
+
</pre>
|
237
|
+
</div>
|
238
|
+
</div>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
<div id="method-M000037" class="method-detail">
|
242
|
+
<a name="M000037"></a>
|
243
|
+
|
244
|
+
<div class="method-heading">
|
245
|
+
<a href="#M000037" class="method-signature">
|
246
|
+
<span class="method-name">create_rss_channels</span><span class="method-args">()</span>
|
247
|
+
</a>
|
248
|
+
</div>
|
249
|
+
|
250
|
+
<div class="method-description">
|
251
|
+
<p>
|
252
|
+
Create the folder for keeping RSS XML file and HTML files Create the RSS
|
253
|
+
channel
|
254
|
+
</p>
|
255
|
+
<p><a class="source-toggle" href="#"
|
256
|
+
onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
|
257
|
+
<div class="method-source-code" id="M000037-source">
|
258
|
+
<pre>
|
259
|
+
<span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_report__.rb, line 85</span>
|
260
|
+
85: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_rss_channels</span>
|
261
|
+
86: <span class="ruby-identifier">rss_folder</span> = <span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'RSS_PATH'</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'RSS_PATH'</span>] \
|
262
|
+
87: <span class="ruby-operator">:</span> <span class="ruby-node">"#{Rails::Configuration.new.root_path}/public/#{RubyRunRSS::RUBYRUN_RSS_FOLDER}"</span>
|
263
|
+
88: <span class="ruby-keyword kw">begin</span>
|
264
|
+
89: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span>(<span class="ruby-identifier">rss_folder</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">rss_folder</span>)
|
265
|
+
90: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span>
|
266
|
+
91: <span class="ruby-identifier">rss_folder</span> = <span class="ruby-ivar">@rubyrun_report_folder</span>
|
267
|
+
92: <span class="ruby-keyword kw">end</span>
|
268
|
+
93: <span class="ruby-identifier">$rubyrun_perf_summary_rss</span> = <span class="ruby-constant">RubyRunRSS</span>.<span class="ruby-identifier">new</span> \
|
269
|
+
94: <span class="ruby-constant">RubyRunRSS</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBYRUN_RSS_PERF_SUMMARY_CHANNEL_TITLE</span>,
|
270
|
+
95: <span class="ruby-constant">RubyRunRSS</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBYRUN_RSS_PERF_SUMMARY_CHANNEL_DESCRIPTION</span>,
|
271
|
+
96: <span class="ruby-identifier">rss_folder</span>,
|
272
|
+
97: <span class="ruby-constant">RubyRunRSS</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBYRUN_RSS_PERF_SUMMARY_CHANNEL_FILENAME</span>,
|
273
|
+
98: <span class="ruby-constant">RubyRunRSS</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBYRUN_RSS_PERF_SUMMARY_CHANNEL_ITEM_FILENAME</span> \
|
274
|
+
99: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">$rubyrun_perf_summary_rss</span>
|
275
|
+
100: <span class="ruby-identifier">$rubyrun_throughput</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
276
|
+
101: <span class="ruby-keyword kw">end</span>
|
277
|
+
</pre>
|
278
|
+
</div>
|
279
|
+
</div>
|
280
|
+
</div>
|
281
|
+
|
282
|
+
|
283
|
+
</div>
|
284
|
+
|
285
|
+
|
286
|
+
</div>
|
287
|
+
|
288
|
+
|
289
|
+
<div id="validator-badges">
|
290
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
291
|
+
</div>
|
292
|
+
|
293
|
+
</body>
|
294
|
+
</html>
|
@@ -0,0 +1,253 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: RubyRunTracer__</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">RubyRunTracer__</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/rubyrun/rubyrun_tracer___rb.html">
|
59
|
+
lib/rubyrun/rubyrun_tracer__.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div id="method-list">
|
80
|
+
<h3 class="section-bar">Methods</h3>
|
81
|
+
|
82
|
+
<div class="name-list">
|
83
|
+
<a href="#M000051">back_trace_all</a>
|
84
|
+
<a href="#M000049">enter_trace</a>
|
85
|
+
<a href="#M000050">write_trace</a>
|
86
|
+
</div>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
|
92
|
+
<!-- if includes -->
|
93
|
+
<div id="includes">
|
94
|
+
<h3 class="section-bar">Included Modules</h3>
|
95
|
+
|
96
|
+
<div id="includes-list">
|
97
|
+
<span class="include-name"><a href="RubyRunGlobals.html">RubyRunGlobals</a></span>
|
98
|
+
<span class="include-name"><a href="RubyRunUtils__.html">RubyRunUtils__</a></span>
|
99
|
+
<span class="include-name"><a href="RubyRunHTML__.html">RubyRunHTML__</a></span>
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
|
103
|
+
<div id="section">
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
<!-- if method_list -->
|
113
|
+
<div id="methods">
|
114
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
115
|
+
|
116
|
+
<div id="method-M000051" class="method-detail">
|
117
|
+
<a name="M000051"></a>
|
118
|
+
|
119
|
+
<div class="method-heading">
|
120
|
+
<a href="#M000051" class="method-signature">
|
121
|
+
<span class="method-name">back_trace_all</span><span class="method-args">(th_data_hash)</span>
|
122
|
+
</a>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
<div class="method-description">
|
126
|
+
<p>
|
127
|
+
The stack trace global hash is printed out in the rubyrun log in thread id
|
128
|
+
order, also showing the top stack of all these threads before they were
|
129
|
+
interrupted.
|
130
|
+
</p>
|
131
|
+
<p><a class="source-toggle" href="#"
|
132
|
+
onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
|
133
|
+
<div class="method-source-code" id="M000051-source">
|
134
|
+
<pre>
|
135
|
+
<span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_tracer__.rb, line 63</span>
|
136
|
+
63: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">back_trace_all</span>(<span class="ruby-identifier">th_data_hash</span>)
|
137
|
+
64: <span class="ruby-identifier">$rubyrun_thread_dump_reporter</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"----- RubyRun Thread Dump STARTS-----"</span>
|
138
|
+
65: <span class="ruby-identifier">$rubyrun_thread_stack</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">th</span>, <span class="ruby-identifier">stack</span><span class="ruby-operator">|</span>
|
139
|
+
66: <span class="ruby-identifier">$rubyrun_thread_dump_reporter</span>.<span class="ruby-identifier">info</span>
|
140
|
+
67: <span class="ruby-identifier">thread_id</span> = <span class="ruby-identifier">get_thread_id</span>(<span class="ruby-identifier">th</span>)
|
141
|
+
68: <span class="ruby-identifier">$rubyrun_thread_dump_reporter</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Thread ID = #{thread_id}"</span>
|
142
|
+
69: <span class="ruby-identifier">$rubyrun_thread_dump_reporter</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">" Last line before interrupt: #{get_top_stack(th_data_hash, thread_id)}"</span>
|
143
|
+
70: <span class="ruby-identifier">$rubyrun_thread_dump_reporter</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">" Stack trace at interrupt"</span>
|
144
|
+
71: <span class="ruby-identifier">stack</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
|
145
|
+
72: <span class="ruby-identifier">$rubyrun_thread_dump_reporter</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"\t#{line}"</span>
|
146
|
+
73: }
|
147
|
+
74: }
|
148
|
+
75: <span class="ruby-identifier">$rubyrun_thread_dump_reporter</span>.<span class="ruby-identifier">info</span>
|
149
|
+
76: <span class="ruby-identifier">$rubyrun_thread_dump_reporter</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"----- RubyRun Thread Dump ENDS -----"</span>
|
150
|
+
77: <span class="ruby-identifier">$rubyrun_thread_stack</span>.<span class="ruby-identifier">clear</span>
|
151
|
+
78: <span class="ruby-keyword kw">end</span>
|
152
|
+
</pre>
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
</div>
|
156
|
+
|
157
|
+
<div id="method-M000049" class="method-detail">
|
158
|
+
<a name="M000049"></a>
|
159
|
+
|
160
|
+
<div class="method-heading">
|
161
|
+
<a href="#M000049" class="method-signature">
|
162
|
+
<span class="method-name">enter_trace</span><span class="method-args">(tid, type, obj, invoker, klass, mid, *args)</span>
|
163
|
+
</a>
|
164
|
+
</div>
|
165
|
+
|
166
|
+
<div class="method-description">
|
167
|
+
<ol>
|
168
|
+
<li>If arguments are required to trace, try using kernel inspect to print it
|
169
|
+
|
170
|
+
</li>
|
171
|
+
<li>If obejct is required to trace, try using kernel inspect to print it.
|
172
|
+
|
173
|
+
</li>
|
174
|
+
</ol>
|
175
|
+
<p>
|
176
|
+
Otherwise print class name, The inspect can cause recursion and blow up
|
177
|
+
ruby. Rescue only delays the issue hence not used here.
|
178
|
+
</p>
|
179
|
+
<ol>
|
180
|
+
<li>Show the last caller and line
|
181
|
+
|
182
|
+
</li>
|
183
|
+
</ol>
|
184
|
+
<p><a class="source-toggle" href="#"
|
185
|
+
onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
|
186
|
+
<div class="method-source-code" id="M000049-source">
|
187
|
+
<pre>
|
188
|
+
<span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_tracer__.rb, line 33</span>
|
189
|
+
33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">enter_trace</span>(<span class="ruby-identifier">tid</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">obj</span>, <span class="ruby-identifier">invoker</span>, <span class="ruby-identifier">klass</span>, <span class="ruby-identifier">mid</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
190
|
+
34: <span class="ruby-ivar">@rubyrun_trace_odd_row</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@rubyrun_trace_odd_row</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
191
|
+
35: <span class="ruby-identifier">cur_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
192
|
+
36: <span class="ruby-identifier">html_content</span> = <span class="ruby-identifier">sprintf</span>(<span class="ruby-node">"#{@rubyrun_trace_odd_row ? METHOD_TRACE_ODD_ROW : METHOD_TRACE_EVEN_ROW}"</span>,
|
193
|
+
37: <span class="ruby-node">"#{cur_time.strftime("%H:%M:%S")}.#{("%.3f" % cur_time.to_f).split('.')[1]} #{cur_time.strftime("%m/%d/%y")}"</span>,
|
194
|
+
38: <span class="ruby-identifier">get_thread_id</span>,
|
195
|
+
39: <span class="ruby-node">"#{type.split(' ').reverse.first}"</span>,
|
196
|
+
40: <span class="ruby-node">"#{type.split(' ').length == 3 ? '#3B9C9C' : (@rubyrun_trace_odd_row ? '#AFDCEC' : 'white')}"</span>,
|
197
|
+
41: <span class="ruby-node">"#{type.split(' ').length == 1 ? '' : (type.split(' ').length == 3 ? '*'+type.split(' ').reverse[1]+'s' : type.split(' ').reverse[1]+'s')}"</span>,
|
198
|
+
42: <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">to_s</span>,
|
199
|
+
43: <span class="ruby-identifier">return_method_name</span>(<span class="ruby-identifier">mid</span>),
|
200
|
+
44: <span class="ruby-node">"#{args.each {|arg| arg.inspect} if $rubyrun_debug_args || is_in_hash?($rubyrun_adapter_hash, klass, mid)}"</span>,
|
201
|
+
45: <span class="ruby-node">"#{$rubyrun_debug_obj && obj ? obj.inspect : obj.class if obj}"</span>,
|
202
|
+
46: <span class="ruby-node">"#{invoker if invoker}"</span>)
|
203
|
+
47: <span class="ruby-identifier">write_trace</span>(<span class="ruby-identifier">html_content</span>)
|
204
|
+
48: <span class="ruby-ivar">@rubyrun_trace_odd_row</span> = <span class="ruby-operator">!</span><span class="ruby-ivar">@rubyrun_trace_odd_row</span>
|
205
|
+
49: <span class="ruby-keyword kw">end</span>
|
206
|
+
</pre>
|
207
|
+
</div>
|
208
|
+
</div>
|
209
|
+
</div>
|
210
|
+
|
211
|
+
<div id="method-M000050" class="method-detail">
|
212
|
+
<a name="M000050"></a>
|
213
|
+
|
214
|
+
<div class="method-heading">
|
215
|
+
<a href="#M000050" class="method-signature">
|
216
|
+
<span class="method-name">write_trace</span><span class="method-args">(html_content)</span>
|
217
|
+
</a>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
<div class="method-description">
|
221
|
+
<p>
|
222
|
+
Write a trace entry to the trace destination
|
223
|
+
</p>
|
224
|
+
<p><a class="source-toggle" href="#"
|
225
|
+
onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
|
226
|
+
<div class="method-source-code" id="M000050-source">
|
227
|
+
<pre>
|
228
|
+
<span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_tracer__.rb, line 52</span>
|
229
|
+
52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_trace</span>(<span class="ruby-identifier">html_content</span>)
|
230
|
+
53: <span class="ruby-keyword kw">begin</span>
|
231
|
+
54: <span class="ruby-identifier">$rubyrun_tracer</span>.<span class="ruby-identifier">info</span>(<span class="ruby-identifier">html_content</span>)
|
232
|
+
55: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
233
|
+
56: <span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_s</span>)
|
234
|
+
57: <span class="ruby-keyword kw">end</span>
|
235
|
+
58: <span class="ruby-keyword kw">end</span>
|
236
|
+
</pre>
|
237
|
+
</div>
|
238
|
+
</div>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
|
242
|
+
</div>
|
243
|
+
|
244
|
+
|
245
|
+
</div>
|
246
|
+
|
247
|
+
|
248
|
+
<div id="validator-badges">
|
249
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
250
|
+
</div>
|
251
|
+
|
252
|
+
</body>
|
253
|
+
</html>
|