RubyRun_CE 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/LICENSE +13 -0
  2. data/README +75 -0
  3. data/Rakefile +241 -0
  4. data/bin/confgure +2 -0
  5. data/docs/RubyRunCE_09.htm +6346 -0
  6. data/docs/RubyRunCE_09.pdf +0 -0
  7. data/docs/RubyRunCE_09_files/colorschememapping.xml +2 -0
  8. data/docs/RubyRunCE_09_files/filelist.xml +29 -0
  9. data/docs/RubyRunCE_09_files/header.htm +142 -0
  10. data/docs/RubyRunCE_09_files/image001.jpg +0 -0
  11. data/docs/RubyRunCE_09_files/image002.jpg +0 -0
  12. data/docs/RubyRunCE_09_files/image003.jpg +0 -0
  13. data/docs/RubyRunCE_09_files/image004.jpg +0 -0
  14. data/docs/RubyRunCE_09_files/image005.jpg +0 -0
  15. data/docs/RubyRunCE_09_files/image006.jpg +0 -0
  16. data/docs/RubyRunCE_09_files/image007.jpg +0 -0
  17. data/docs/RubyRunCE_09_files/image008.jpg +0 -0
  18. data/docs/RubyRunCE_09_files/image009.jpg +0 -0
  19. data/docs/RubyRunCE_09_files/image010.jpg +0 -0
  20. data/docs/RubyRunCE_09_files/image011.jpg +0 -0
  21. data/docs/RubyRunCE_09_files/image012.jpg +0 -0
  22. data/docs/RubyRunCE_09_files/image013.jpg +0 -0
  23. data/docs/RubyRunCE_09_files/image014.jpg +0 -0
  24. data/docs/RubyRunCE_09_files/image015.jpg +0 -0
  25. data/docs/RubyRunCE_09_files/image016.jpg +0 -0
  26. data/docs/RubyRunCE_09_files/image017.png +0 -0
  27. data/docs/RubyRunCE_09_files/image018.jpg +0 -0
  28. data/docs/RubyRunCE_09_files/image019.jpg +0 -0
  29. data/docs/RubyRunCE_09_files/image020.jpg +0 -0
  30. data/docs/RubyRunCE_09_files/image021.jpg +0 -0
  31. data/docs/RubyRunCE_09_files/image022.png +0 -0
  32. data/docs/RubyRunCE_09_files/themedata.thmx +0 -0
  33. data/etc/rubyrun_opts.yml +132 -0
  34. data/ext/extconf.rb +4 -0
  35. data/ext/rubyrunnative__.bundle +0 -0
  36. data/ext/rubyrunnative__.c +154 -0
  37. data/ext/rubyrunnative__.def +2 -0
  38. data/ext/rubyrunnative__.h +36 -0
  39. data/ext/rubyrunnative__.so +0 -0
  40. data/ext/rubyrunnative__linux.so +0 -0
  41. data/html/classes/Module.html +174 -0
  42. data/html/classes/Object.html +151 -0
  43. data/html/classes/RubyRunBufferMgr__.html +182 -0
  44. data/html/classes/RubyRunCommander__.html +578 -0
  45. data/html/classes/RubyRunDad__.html +144 -0
  46. data/html/classes/RubyRunGlobals.html +248 -0
  47. data/html/classes/RubyRunHTMLWriter.html +186 -0
  48. data/html/classes/RubyRunHTMLWriter/RubyRunHTMLDevice.html +157 -0
  49. data/html/classes/RubyRunHTML__.html +198 -0
  50. data/html/classes/RubyRunInitializer__.html +821 -0
  51. data/html/classes/RubyRunInstrumentor__.html +576 -0
  52. data/html/classes/RubyRunMonitor__.html +298 -0
  53. data/html/classes/RubyRunRSS.html +302 -0
  54. data/html/classes/RubyRunReport__.html +294 -0
  55. data/html/classes/RubyRunTracer__.html +253 -0
  56. data/html/classes/RubyRunUtils__.html +376 -0
  57. data/html/created.rid +1 -0
  58. data/html/files/LICENSE.html +119 -0
  59. data/html/files/README.html +196 -0
  60. data/html/files/lib/rubyrun/rubyrun_buffer_mgr___rb.html +101 -0
  61. data/html/files/lib/rubyrun/rubyrun_commander___rb.html +101 -0
  62. data/html/files/lib/rubyrun/rubyrun_dad___rb.html +101 -0
  63. data/html/files/lib/rubyrun/rubyrun_globals_rb.html +101 -0
  64. data/html/files/lib/rubyrun/rubyrun_html___rb.html +101 -0
  65. data/html/files/lib/rubyrun/rubyrun_html_writer___rb.html +108 -0
  66. data/html/files/lib/rubyrun/rubyrun_initializer___rb.html +112 -0
  67. data/html/files/lib/rubyrun/rubyrun_instrumentor___rb.html +116 -0
  68. data/html/files/lib/rubyrun/rubyrun_monitor___rb.html +116 -0
  69. data/html/files/lib/rubyrun/rubyrun_rb.html +121 -0
  70. data/html/files/lib/rubyrun/rubyrun_report___rb.html +101 -0
  71. data/html/files/lib/rubyrun/rubyrun_rss___rb.html +108 -0
  72. data/html/files/lib/rubyrun/rubyrun_tracer___rb.html +110 -0
  73. data/html/files/lib/rubyrun/rubyrun_utils___rb.html +108 -0
  74. data/html/files/lib/rubyrunm_rb.html +116 -0
  75. data/html/fr_class_index.html +42 -0
  76. data/html/fr_file_index.html +43 -0
  77. data/html/fr_method_index.html +96 -0
  78. data/html/index.html +24 -0
  79. data/html/rdoc-style.css +208 -0
  80. data/lib/rubyrun/rubyrun.rb +78 -0
  81. data/lib/rubyrun/rubyrun_buffer_mgr__.rb +49 -0
  82. data/lib/rubyrun/rubyrun_commander__.rb +196 -0
  83. data/lib/rubyrun/rubyrun_dad__.rb +35 -0
  84. data/lib/rubyrun/rubyrun_globals.rb +51 -0
  85. data/lib/rubyrun/rubyrun_html__.rb +136 -0
  86. data/lib/rubyrun/rubyrun_html_writer__.rb +64 -0
  87. data/lib/rubyrun/rubyrun_initializer__.rb +286 -0
  88. data/lib/rubyrun/rubyrun_instrumentor__.rb +226 -0
  89. data/lib/rubyrun/rubyrun_monitor__.rb +237 -0
  90. data/lib/rubyrun/rubyrun_report__.rb +109 -0
  91. data/lib/rubyrun/rubyrun_rss__.rb +97 -0
  92. data/lib/rubyrun/rubyrun_tracer__.rb +79 -0
  93. data/lib/rubyrun/rubyrun_utils__.rb +98 -0
  94. data/lib/rubyrunm.rb +10 -0
  95. metadata +148 -0
@@ -0,0 +1,157 @@
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>Class: RubyRunHTMLWriter::RubyRunHTMLDevice</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>Class</strong></td>
53
+ <td class="class-name-in-header">RubyRunHTMLWriter::RubyRunHTMLDevice</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/rubyrun/rubyrun_html_writer___rb.html">
59
+ lib/rubyrun/rubyrun_html_writer__.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Logger::LogDevice
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000007">new</a>&nbsp;&nbsp;
90
+ </div>
91
+ </div>
92
+
93
+ </div>
94
+
95
+
96
+ <!-- if includes -->
97
+
98
+ <div id="section">
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ <!-- if method_list -->
108
+ <div id="methods">
109
+ <h3 class="section-bar">Public Class methods</h3>
110
+
111
+ <div id="method-M000007" class="method-detail">
112
+ <a name="M000007"></a>
113
+
114
+ <div class="method-heading">
115
+ <a href="#M000007" class="method-signature">
116
+ <span class="method-name">new</span><span class="method-args">(log = nil, header = nil, opt = {})</span>
117
+ </a>
118
+ </div>
119
+
120
+ <div class="method-description">
121
+ <p><a class="source-toggle" href="#"
122
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
123
+ <div class="method-source-code" id="M000007-source">
124
+ <pre>
125
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_html_writer__.rb, line 42</span>
126
+ 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">log</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">header</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opt</span> = {})
127
+ 43: <span class="ruby-ivar">@header</span> = <span class="ruby-identifier">header</span>
128
+ 44: <span class="ruby-ivar">@dev</span> = <span class="ruby-ivar">@filename</span> = <span class="ruby-ivar">@shift_age</span> = <span class="ruby-ivar">@shift_size</span> = <span class="ruby-keyword kw">nil</span>
129
+ 45: <span class="ruby-ivar">@mutex</span> = <span class="ruby-constant">LogDeviceMutex</span>.<span class="ruby-identifier">new</span>
130
+ 46: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">log</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:write</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">log</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:close</span>)
131
+ 47: <span class="ruby-ivar">@dev</span> = <span class="ruby-identifier">log</span>
132
+ 48: <span class="ruby-keyword kw">else</span>
133
+ 49: <span class="ruby-ivar">@dev</span> = <span class="ruby-identifier">open_logfile</span>(<span class="ruby-identifier">log</span>)
134
+ 50: <span class="ruby-ivar">@dev</span>.<span class="ruby-identifier">sync</span> = <span class="ruby-keyword kw">true</span>
135
+ 51: <span class="ruby-ivar">@filename</span> = <span class="ruby-identifier">log</span>
136
+ 52: <span class="ruby-ivar">@shift_age</span> = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:shift_age</span>] <span class="ruby-operator">||</span> <span class="ruby-value">7</span>
137
+ 53: <span class="ruby-ivar">@shift_size</span> = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:shift_size</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1048576</span>
138
+ 54: <span class="ruby-keyword kw">end</span>
139
+ 55: <span class="ruby-keyword kw">end</span>
140
+ </pre>
141
+ </div>
142
+ </div>
143
+ </div>
144
+
145
+
146
+ </div>
147
+
148
+
149
+ </div>
150
+
151
+
152
+ <div id="validator-badges">
153
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
154
+ </div>
155
+
156
+ </body>
157
+ </html>
@@ -0,0 +1,198 @@
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: RubyRunHTML__</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">RubyRunHTML__</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/rubyrun/rubyrun_html___rb.html">
59
+ lib/rubyrun/rubyrun_html__.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
+
80
+ </div>
81
+
82
+
83
+ <!-- if includes -->
84
+
85
+ <div id="section">
86
+
87
+
88
+ <div id="constants-list">
89
+ <h3 class="section-bar">Constants</h3>
90
+
91
+ <div class="name-list">
92
+ <table summary="Constants">
93
+ <tr class="top-aligned-row context-row">
94
+ <td class="context-item-name">OBJ_MAP_HTML</td>
95
+ <td>=</td>
96
+ <td class="context-item-value">&quot;&lt;table cellspacing='2' width='55%'&gt; &lt;tr align='middle' bgcolor='#43bfc7'&gt; &lt;th colspan='2'&gt;&lt;font face='Helvetica' size='2' color='white'&gt;Top 20 Ruby classes with the largest number of objects (%START_TIMESTAMP%)&lt;/font&gt;&lt;/th&gt;&lt;/tr&gt; &lt;tr align='middle' bgcolor='#43bfc7'&gt; &lt;th&gt;&lt;font face='Helvetica' size='2' color='white'&gt;Class name&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face='Helvetica' size='2' color='white'&gt;Number of objects&lt;/font&gt;&lt;/th&gt; %OBJ_MAP_ROW% &lt;/table&gt;&lt;br&gt;&lt;/br&gt;&quot;</td>
97
+ </tr>
98
+ <tr class="top-aligned-row context-row">
99
+ <td class="context-item-name">OBJ_MAP_ODD_ROW</td>
100
+ <td>=</td>
101
+ <td class="context-item-value">&quot;&lt;tr align='middle'&gt; &lt;td align='left' bgcolor='#afdcec'&gt;&lt;font face='Tahoma' size='2' color='black'&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align='left' bgcolor='#afdcec'&gt;&lt;font face='Tahoma' size='2' color='black'&gt;%s&lt;/font&gt;&lt;/td&gt;&quot;</td>
102
+ </tr>
103
+ <tr class="top-aligned-row context-row">
104
+ <td class="context-item-name">OBJ_MAP_EVEN_ROW</td>
105
+ <td>=</td>
106
+ <td class="context-item-value">&quot;&lt;tr align='middle'&gt; &lt;td align='left'&gt;&lt;font face='Tahoma' size='2' color='black'&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align='left'&gt;&lt;font face='Tahoma' size='2' color='black'&gt;%s&lt;/font&gt;&lt;/td&gt;&quot;</td>
107
+ </tr>
108
+ <tr class="top-aligned-row context-row">
109
+ <td class="context-item-name">THREAD_STATUS_HTML</td>
110
+ <td>=</td>
111
+ <td class="context-item-value">&quot;&lt;table cellspacing='2' width='100%'&gt; &lt;tr align='middle' bgcolor='#43bfc7'&gt; &lt;th colspan='3'&gt;&lt;font face='Helvetica' size='2' color='white'&gt;RubyRun Thread Status Starts (%START_TIMESTAMP%)&lt;/font&gt;&lt;/th&gt; &lt;tr align='middle' bgcolor='#43bfc7'&gt; &lt;th&gt;&lt;font face='Helvetica' size='2' color='white'&gt;Thread ID&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face='Helvetica' size='2' color='white'&gt;Status&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face='Helvetica' size='2' color='white'&gt;Top of the stack&lt;/font&gt;&lt;/th&gt; %THREAD_STATUS_ROW% &lt;/table&gt;&lt;br&gt;&lt;/br&gt;&quot;</td>
112
+ </tr>
113
+ <tr class="top-aligned-row context-row">
114
+ <td class="context-item-name">THREAD_STATUS_ODD_ROW</td>
115
+ <td>=</td>
116
+ <td class="context-item-value">&quot;&lt;tr align='middle'&gt; &lt;td bgcolor='#afdcec'&gt;&lt;font face='Tahoma' size='2' color='black'&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td bgcolor='#afdcec'&gt;&lt;font face='Tahoma' size='2' color='black'&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align='left' bgcolor='#afdcec'&gt;&lt;font face='Tahoma' size='2' color='black'&gt;%s&lt;/font&gt;&lt;/td&gt;&quot;</td>
117
+ </tr>
118
+ <tr class="top-aligned-row context-row">
119
+ <td class="context-item-name">THREAD_STATUS_EVEN_ROW</td>
120
+ <td>=</td>
121
+ <td class="context-item-value">&quot;&lt;tr align='middle'&gt; &lt;td&gt;&lt;font face='Tahoma' size='2' color='black'&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font face='Tahoma' size='2' color='black'&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align='left'&gt;&lt;font face='Tahoma' size='2' color='black'&gt;%s&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&quot;</td>
122
+ </tr>
123
+ <tr class="top-aligned-row context-row">
124
+ <td class="context-item-name">METHOD_TRACE_HEADER</td>
125
+ <td>=</td>
126
+ <td class="context-item-value">&quot;&lt;table cellspacing=2 width=100%&gt; &lt;tr align=center bgcolor=#43BFC7&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=white&gt;Time&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=white&gt;Thread ID&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=white&gt;Method Entry/Exit&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=white&gt;Time Taken&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=white&gt;Class&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=white&gt;Method&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=white&gt;Parameter Value(s)&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=white&gt;Caller Object Class&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=white&gt;Caller Method&lt;/font&gt;&lt;/th&gt;&lt;/tr&gt;&quot;</td>
127
+ </tr>
128
+ <tr class="top-aligned-row context-row">
129
+ <td class="context-item-name">METHOD_TRACE_ODD_ROW</td>
130
+ <td>=</td>
131
+ <td class="context-item-value">&quot;&lt;tr align=center&gt; &lt;td bgcolor=#AFDCEC&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td bgcolor=#AFDCEC&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td bgcolor=#AFDCEC&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td bgcolor=%s&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align=left bgcolor=#AFDCEC&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align=left bgcolor=#AFDCEC&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align=left bgcolor=#AFDCEC&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align=left bgcolor=#AFDCEC&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align=left bgcolor=#AFDCEC&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&quot;</td>
132
+ </tr>
133
+ <tr class="top-aligned-row context-row">
134
+ <td class="context-item-name">METHOD_TRACE_EVEN_ROW</td>
135
+ <td>=</td>
136
+ <td class="context-item-value">&quot;&lt;tr align=center&gt; &lt;td&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td bgcolor=%s&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align=left&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align=left&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align=left&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align=left&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td align=left&gt;&lt;font face='Tahoma' size=2 color=black&gt;%s&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&quot;</td>
137
+ </tr>
138
+ <tr class="top-aligned-row context-row">
139
+ <td class="context-item-name">THROUGHPUT_HTML</td>
140
+ <td>=</td>
141
+ <td class="context-item-value">&quot;&lt;p align=center&gt;&lt;font size='3' face='Verdana'&gt;Performance summary of %APPS_NAME% as of %TIMESTAMP%&lt;/font&gt;&lt;/p&gt; &lt;table id=tblgraph align=center width=80 cellpadding=2 cellspacing=0 border=0&gt; &lt;tr&gt;&lt;td bgcolor=WHITE align=center valign=middle width=22 style='writing-mode:tb-rl'&gt;&lt;font face=arial size='-1'&gt;Average throughput per min&lt;/font&gt;&lt;/td&gt;%THROUGHPUT_BAR_TABLE%&lt;/tr&gt; &lt;tr bgcolor=#505050&gt; &lt;td align=center bordor=1 bgcolor=#FFFFFF&gt;&amp;nbsp;&lt;/td&gt;%THROUGHPUT_LABEL_TABLE% &lt;td bgcolor=white align=center&gt;&lt;font face=arial size='-2' color=black&gt;Time&lt;/font&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/table&gt;&quot;</td>
142
+ </tr>
143
+ <tr class="top-aligned-row context-row">
144
+ <td class="context-item-name">THROUGHPUT_BAR_TABLE</td>
145
+ <td>=</td>
146
+ <td class="context-item-value">&quot;&lt;td align=center valign=bottom width=22&gt; &lt;font face=arial size='-2'&gt;%s&lt;/font&gt;&lt;br&gt; &lt;div style='writing-mode:tb-rl; background-color:firebrick; width:30; height:%d;' /&gt; &lt;/td&gt;&quot;</td>
147
+ </tr>
148
+ <tr class="top-aligned-row context-row">
149
+ <td class="context-item-name">THROUGHPUT_LABEL_TABLE</td>
150
+ <td>=</td>
151
+ <td class="context-item-value">&quot;&lt;td align=center&gt;&lt;font face=arial size='-2' color=white&gt;%s&lt;/font&gt;&lt;/td&gt;&quot;</td>
152
+ </tr>
153
+ <tr class="top-aligned-row context-row">
154
+ <td class="context-item-name">TOP_SLOWEST_REQUESTS_HTML</td>
155
+ <td>=</td>
156
+ <td class="context-item-value">&quot;&lt;p&gt;&lt;font size='2' face='Verdana'&gt;Top 10 Slowest Requests&lt;/font&gt;&lt;/p&gt; &lt;table cellspacing=0 width=50%%&gt;&lt;tr bgcolor=FF6633&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=#FFFFFF&gt;Controller/Action&lt;font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=#FFFFFF&gt;Response Time&lt;font&gt;&lt;/th&gt;&lt;/tr&gt; %TOP_SLOWEST_REQUESTS_TABLE% &lt;/table&gt;&quot;</td>
157
+ </tr>
158
+ <tr class="top-aligned-row context-row">
159
+ <td class="context-item-name">TOP_SLOWEST_REQUESTS_TABLE</td>
160
+ <td>=</td>
161
+ <td class="context-item-value">&quot;&lt;tr&gt;&lt;td align=left bgcolor=585858&gt;&lt;font face=Helvetica size=2 color=white&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;table&gt;&lt;tr&gt;&lt;td bgcolor=firebrick&gt;&lt;div style='writing-mode:tb-rl; background-color:firebrick; width:%d; height:5;' /&gt;&lt;/td&gt;&lt;td&gt;&lt;font face=Helvetica SIZE=1&gt;%0.3fs&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&quot;</td>
162
+ </tr>
163
+ <tr class="top-aligned-row context-row">
164
+ <td class="context-item-name">REQ_PERF_BREAKDOWN_HTML</td>
165
+ <td>=</td>
166
+ <td class="context-item-value">&quot;&lt;p&gt;&lt;font size='2' face='Verdana'&gt;Request Performance Breakdown&lt;/font&gt;&lt;/p&gt; &lt;table cellspacing=0 width=100%&gt; &lt;tr bgcolor=FF6633&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=#FFFFFF&gt;Controller/Action&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=#FFFFFF&gt;Request Count&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=#FFFFFF&gt;Response Time&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=#FFFFFF&gt;Action Time&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=#FFFFFF&gt;Database IO Time&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=#FFFFFF&gt;View Time&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=#FFFFFF&gt;Dispatch Delay Time&lt;/font&gt;&lt;/th&gt; &lt;th&gt;&lt;font face=Helvetica size=2 color=#FFFFFF&gt;Uncaptured Time&lt;/font&gt;&lt;/th&gt; &lt;/tr&gt;%REQ_PERF_BREAKDOWN_TABLE%&lt;/table&gt; &lt;font size='1' face='Verdana'&gt;Note: Process components are results of functional decomposition which overlap each other. As a result, times do not add up to 100%. The hotspots of performance slowdowns, however, are easily accountable from functional standpoint.&lt;/font&gt;&lt;br&gt;&lt;/br&gt;&quot;</td>
167
+ </tr>
168
+ <tr class="top-aligned-row context-row">
169
+ <td class="context-item-name">REQ_PERF_BREAKDOWN_TABLE_ODD</td>
170
+ <td>=</td>
171
+ <td class="context-item-value">'&lt;tr align=center&gt; &lt;td align=left bgcolor=585858&gt;&lt;font face=Helvetica size=2 color=white&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td bgcolor=C0C0C0&gt;&lt;font face=Helvetica size=2 color=black&gt;%d&lt;/font&gt;&lt;/td&gt; &lt;td bgcolor=C0C0C0&gt;&lt;font face=Helvetica size=2 color=black&gt;%0.3fs&lt;/font&gt;&lt;/td&gt; &lt;td bgcolor=C0C0C0&gt;&lt;font face=Helvetica size=2 color=black&gt;%0.3fs (%d%%)&lt;/font&gt;&lt;/td&gt; &lt;td bgcolor=C0C0C0&gt;&lt;font face=Helvetica size=2 color=black&gt;%0.3fs (%d%%)&lt;/font&gt;&lt;/td&gt; &lt;td bgcolor=C0C0C0&gt;&lt;font face=Helvetica size=2 color=black&gt;%0.3fs (%d%%)&lt;/font&gt;&lt;/td&gt; &lt;td bgcolor=C0C0C0&gt;&lt;font face=Helvetica size=2 color=black&gt;%0.3fs (%d%%)&lt;/font&gt;&lt;/td&gt; &lt;td bgcolor=C0C0C0&gt;&lt;font face=Helvetica size=2 color=black&gt;%0.3fs&lt;/font&gt;&lt;/td&gt; &lt;/tr&gt;'</td>
172
+ </tr>
173
+ <tr class="top-aligned-row context-row">
174
+ <td class="context-item-name">REQ_PERF_BREAKDOWN_TABLE_EVEN</td>
175
+ <td>=</td>
176
+ <td class="context-item-value">'&lt;tr align=center&gt; &lt;td align=left bgcolor=585858&gt;&lt;font face=Helvetica size=2 color=white&gt;%s&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font face=Helvetica size=2 color=black&gt;%d&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font face=Helvetica size=2 color=black&gt;%0.3fs &lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font face=Helvetica size=2 color=black&gt;%0.3fs (%d%%)&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font face=Helvetica size=2 color=black&gt;%0.3fs (%d%%)&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font face=Helvetica size=2 color=black&gt;%0.3fs (%d%%)&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font face=Helvetica size=2 color=black&gt;%0.3fs (%d%%)&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font face=Helvetica size=2 color=black&gt;%0.3fs&lt;/font&gt;&lt;/td&gt; &lt;/tr&gt;'</td>
177
+ </tr>
178
+ </table>
179
+ </div>
180
+ </div>
181
+
182
+
183
+
184
+
185
+
186
+
187
+ <!-- if method_list -->
188
+
189
+
190
+ </div>
191
+
192
+
193
+ <div id="validator-badges">
194
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
195
+ </div>
196
+
197
+ </body>
198
+ </html>
@@ -0,0 +1,821 @@
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: RubyRunInitializer__</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">RubyRunInitializer__</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/rubyrun/rubyrun_initializer___rb.html">
59
+ lib/rubyrun/rubyrun_initializer__.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="#M000058">config_prop_exists?</a>&nbsp;&nbsp;
84
+ <a href="#M000065">deserialize_scan_history</a>&nbsp;&nbsp;
85
+ <a href="#M000062">directory_changed?</a>&nbsp;&nbsp;
86
+ <a href="#M000059">discover_targets</a>&nbsp;&nbsp;
87
+ <a href="#M000061">expand_folder</a>&nbsp;&nbsp;
88
+ <a href="#M000063">generate_hash</a>&nbsp;&nbsp;
89
+ <a href="#M000070">get_dir_hash_file</a>&nbsp;&nbsp;
90
+ <a href="#M000069">get_exclude_hash_file</a>&nbsp;&nbsp;
91
+ <a href="#M000068">get_include_hash_file</a>&nbsp;&nbsp;
92
+ <a href="#M000060">identify_candidates</a>&nbsp;&nbsp;
93
+ <a href="#M000052">init_rubyrun</a>&nbsp;&nbsp;
94
+ <a href="#M000056">load_config_props</a>&nbsp;&nbsp;
95
+ <a href="#M000054">make_folder</a>&nbsp;&nbsp;
96
+ <a href="#M000055">ready_logfile</a>&nbsp;&nbsp;
97
+ <a href="#M000053">ready_rubyrun_env</a>&nbsp;&nbsp;
98
+ <a href="#M000066">scan_module_class</a>&nbsp;&nbsp;
99
+ <a href="#M000067">scan_super</a>&nbsp;&nbsp;
100
+ <a href="#M000064">serialize_scan_history</a>&nbsp;&nbsp;
101
+ <a href="#M000057">validate_opts</a>&nbsp;&nbsp;
102
+ </div>
103
+ </div>
104
+
105
+ </div>
106
+
107
+
108
+ <!-- if includes -->
109
+ <div id="includes">
110
+ <h3 class="section-bar">Included Modules</h3>
111
+
112
+ <div id="includes-list">
113
+ <span class="include-name"><a href="RubyRunGlobals.html">RubyRunGlobals</a></span>
114
+ <span class="include-name"><a href="RubyRunUtils__.html">RubyRunUtils__</a></span>
115
+ </div>
116
+ </div>
117
+
118
+ <div id="section">
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+ <!-- if method_list -->
128
+ <div id="methods">
129
+ <h3 class="section-bar">Public Instance methods</h3>
130
+
131
+ <div id="method-M000058" class="method-detail">
132
+ <a name="M000058"></a>
133
+
134
+ <div class="method-heading">
135
+ <a href="#M000058" class="method-signature">
136
+ <span class="method-name">config_prop_exists?</span><span class="method-args">(prop)</span>
137
+ </a>
138
+ </div>
139
+
140
+ <div class="method-description">
141
+ <p>
142
+ If the property is not defined or defined but with nil value, it is deemed
143
+ to be non-existent
144
+ </p>
145
+ <p><a class="source-toggle" href="#"
146
+ onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
147
+ <div class="method-source-code" id="M000058-source">
148
+ <pre>
149
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 129</span>
150
+ 129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config_prop_exists?</span>(<span class="ruby-identifier">prop</span>)
151
+ 130: <span class="ruby-identifier">$rubyrun_config</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">prop</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-identifier">prop</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
152
+ 131: <span class="ruby-keyword kw">end</span>
153
+ </pre>
154
+ </div>
155
+ </div>
156
+ </div>
157
+
158
+ <div id="method-M000065" class="method-detail">
159
+ <a name="M000065"></a>
160
+
161
+ <div class="method-heading">
162
+ <a href="#M000065" class="method-signature">
163
+ <span class="method-name">deserialize_scan_history</span><span class="method-args">()</span>
164
+ </a>
165
+ </div>
166
+
167
+ <div class="method-description">
168
+ <p>
169
+ Use Marshal to de-serialize the include and exclude hashes
170
+ </p>
171
+ <p><a class="source-toggle" href="#"
172
+ onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
173
+ <div class="method-source-code" id="M000065-source">
174
+ <pre>
175
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 223</span>
176
+ 223: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deserialize_scan_history</span>
177
+ 224: <span class="ruby-identifier">f</span> = <span class="ruby-identifier">get_include_hash_file</span>
178
+ 225: <span class="ruby-identifier">$rubyrun_include_hash</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">f</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">f</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">f</span>)} <span class="ruby-operator">:</span> {}
179
+ 226: <span class="ruby-identifier">f</span> = <span class="ruby-identifier">get_exclude_hash_file</span>
180
+ 227: <span class="ruby-identifier">$rubyrun_exclude_hash</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">f</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">f</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">f</span>)} <span class="ruby-operator">:</span> {}
181
+ 228: <span class="ruby-keyword kw">end</span>
182
+ </pre>
183
+ </div>
184
+ </div>
185
+ </div>
186
+
187
+ <div id="method-M000062" class="method-detail">
188
+ <a name="M000062"></a>
189
+
190
+ <div class="method-heading">
191
+ <a href="#M000062" class="method-signature">
192
+ <span class="method-name">directory_changed?</span><span class="method-args">(dir_signature)</span>
193
+ </a>
194
+ </div>
195
+
196
+ <div class="method-description">
197
+ <p>
198
+ Compare the digest calculated from the current APP_PATHS directory contents
199
+ to the last serialized one. Return true(changed) or false (unchanged)
200
+ </p>
201
+ <p><a class="source-toggle" href="#"
202
+ onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
203
+ <div class="method-source-code" id="M000062-source">
204
+ <pre>
205
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 204</span>
206
+ 204: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">directory_changed?</span>(<span class="ruby-identifier">dir_signature</span>)
207
+ 205: <span class="ruby-identifier">f</span> = <span class="ruby-identifier">get_dir_hash_file</span>
208
+ 206: <span class="ruby-identifier">dir_sig</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">f</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">f</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">f</span>)} <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
209
+ 207: <span class="ruby-identifier">dir_signature</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">dir_sig</span>
210
+ 208: <span class="ruby-keyword kw">end</span>
211
+ </pre>
212
+ </div>
213
+ </div>
214
+ </div>
215
+
216
+ <div id="method-M000059" class="method-detail">
217
+ <a name="M000059"></a>
218
+
219
+ <div class="method-heading">
220
+ <a href="#M000059" class="method-signature">
221
+ <span class="method-name">discover_targets</span><span class="method-args">()</span>
222
+ </a>
223
+ </div>
224
+
225
+ <div class="method-description">
226
+ <p>
227
+ Set up global variables from the property file rubyrun_config.yml For
228
+ APP_PATHS property, expand any subdirectories and look for .rb files
229
+ recursively
230
+ </p>
231
+ <p><a class="source-toggle" href="#"
232
+ onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
233
+ <div class="method-source-code" id="M000059-source">
234
+ <pre>
235
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 136</span>
236
+ 136: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">discover_targets</span>
237
+ 137: <span class="ruby-identifier">identify_candidates</span>
238
+ 138: <span class="ruby-identifier">$rubyrun_include_hash</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'INCLUDE_HASH'</span>])
239
+ 139: [<span class="ruby-value str">'DB_ADAPTER_HASH'</span>,<span class="ruby-value str">'OUTER_DISPATCH_HASH'</span>,<span class="ruby-value str">'INNER_DISPATCH_HASH'</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">hash_key</span><span class="ruby-operator">|</span>
240
+ 140: <span class="ruby-identifier">$rubyrun_include_hash</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-identifier">hash_key</span>]) { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">o</span>,<span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">n</span>) } <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">config_prop_exists?</span>(<span class="ruby-identifier">hash_key</span>)
241
+ 141: }
242
+ 142: [<span class="ruby-constant">RUBYRUN_OUTER_DISPATCH_HASH</span>,<span class="ruby-constant">RUBYRUN_INNER_DISPATCH_HASH</span>,<span class="ruby-constant">RUBYRUN_THREAD_END_HASH</span>,<span class="ruby-constant">RUBYRUN_VIEW_HASH</span>].<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">hash</span><span class="ruby-operator">|</span>
243
+ 143: <span class="ruby-identifier">$rubyrun_include_hash</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">hash</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">o</span>,<span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">n</span>) }
244
+ 144: }
245
+ 145: <span class="ruby-identifier">$rubyrun_exclude_hash</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'EXCLUDE_HASH'</span>])
246
+ 146: <span class="ruby-identifier">$rubyrun_outer_dispatch_hash</span> = <span class="ruby-identifier">config_prop_exists?</span>(<span class="ruby-value str">'OUTER_DISPATCH_HASH'</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">RUBYRUN_OUTER_DISPATCH_HASH</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'OUTER_DISPATCH_HASH'</span>]) <span class="ruby-operator">:</span> <span class="ruby-constant">RUBYRUN_OUTER_DISPATCH_HASH</span>
247
+ 147: <span class="ruby-identifier">$rubyrun_inner_dispatch_hash</span> = <span class="ruby-identifier">config_prop_exists?</span>(<span class="ruby-value str">'INNER_DISPATCH_HASH'</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">RUBYRUN_INNER_DISPATCH_HASH</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'INNER_DISPATCH_HASH'</span>]) <span class="ruby-operator">:</span> <span class="ruby-constant">RUBYRUN_INNER_DISPATCH_HASH</span>
248
+ 148: <span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Final INCLUDE_HASH = #{$rubyrun_include_hash.inspect}&quot;</span>
249
+ 149: <span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Final EXCLUDE_HASH = #{$rubyrun_exclude_hash.inspect}&quot;</span>
250
+ 150: <span class="ruby-keyword kw">end</span>
251
+ </pre>
252
+ </div>
253
+ </div>
254
+ </div>
255
+
256
+ <div id="method-M000061" class="method-detail">
257
+ <a name="M000061"></a>
258
+
259
+ <div class="method-heading">
260
+ <a href="#M000061" class="method-signature">
261
+ <span class="method-name">expand_folder</span><span class="method-args">(folder)</span>
262
+ </a>
263
+ </div>
264
+
265
+ <div class="method-description">
266
+ <p>
267
+ For each directory, expand into a list of filenames and its modifed time.
268
+ </p>
269
+ <p><a class="source-toggle" href="#"
270
+ onclick="toggleCode('M000061-source');return false;">[Source]</a></p>
271
+ <div class="method-source-code" id="M000061-source">
272
+ <pre>
273
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 180</span>
274
+ 180: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expand_folder</span>(<span class="ruby-identifier">folder</span>)
275
+ 181: (<span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-node">&quot;WARN: APP_PATHS not found: #{folder}&quot;</span>) ; <span class="ruby-keyword kw">return</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">folder</span>)
276
+ 182: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">folder</span>)
277
+ 183: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">folder</span>) <span class="ruby-operator">!=</span> <span class="ruby-value str">'.rb'</span>
278
+ 184: <span class="ruby-identifier">path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">folder</span>)
279
+ 185: <span class="ruby-identifier">$rubyrun_file_date_hash</span>[<span class="ruby-identifier">path</span>] = <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">to_i</span>
280
+ 186: <span class="ruby-keyword kw">else</span>
281
+ 187: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">entries</span>(<span class="ruby-identifier">folder</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span>
282
+ 188: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">entry</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\.+/</span>
283
+ 189: <span class="ruby-identifier">path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">entry</span>, <span class="ruby-identifier">folder</span>)
284
+ 190: <span class="ruby-keyword kw">case</span>
285
+ 191: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">path</span>)
286
+ 192: <span class="ruby-identifier">expand_folder</span>(<span class="ruby-identifier">path</span>)
287
+ 193: <span class="ruby-keyword kw">else</span>
288
+ 194: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">entry</span>) <span class="ruby-operator">!=</span> <span class="ruby-value str">'.rb'</span>
289
+ 195: <span class="ruby-identifier">$rubyrun_file_date_hash</span>[<span class="ruby-identifier">path</span>] = <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">to_i</span>
290
+ 196: <span class="ruby-keyword kw">end</span>
291
+ 197: }
292
+ 198: <span class="ruby-keyword kw">end</span>
293
+ 199: <span class="ruby-keyword kw">end</span>
294
+ </pre>
295
+ </div>
296
+ </div>
297
+ </div>
298
+
299
+ <div id="method-M000063" class="method-detail">
300
+ <a name="M000063"></a>
301
+
302
+ <div class="method-heading">
303
+ <a href="#M000063" class="method-signature">
304
+ <span class="method-name">generate_hash</span><span class="method-args">(hash)</span>
305
+ </a>
306
+ </div>
307
+
308
+ <div class="method-description">
309
+ <p>
310
+ Calcualte the digest from the directory contents of APP_PATHS
311
+ </p>
312
+ <p><a class="source-toggle" href="#"
313
+ onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
314
+ <div class="method-source-code" id="M000063-source">
315
+ <pre>
316
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 211</span>
317
+ 211: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_hash</span>(<span class="ruby-identifier">hash</span>)
318
+ 212: <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">MD5</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">hash</span>.<span class="ruby-identifier">to_s</span>)
319
+ 213: <span class="ruby-keyword kw">end</span>
320
+ </pre>
321
+ </div>
322
+ </div>
323
+ </div>
324
+
325
+ <div id="method-M000070" class="method-detail">
326
+ <a name="M000070"></a>
327
+
328
+ <div class="method-heading">
329
+ <a href="#M000070" class="method-signature">
330
+ <span class="method-name">get_dir_hash_file</span><span class="method-args">()</span>
331
+ </a>
332
+ </div>
333
+
334
+ <div class="method-description">
335
+ <p>
336
+ Return the target file name that stores the serialized directory contents
337
+ digest This file has to be application dependent, and we use the current
338
+ directory of the running process to represent the application directory.
339
+ </p>
340
+ <p><a class="source-toggle" href="#"
341
+ onclick="toggleCode('M000070-source');return false;">[Source]</a></p>
342
+ <div class="method-source-code" id="M000070-source">
343
+ <pre>
344
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 282</span>
345
+ 282: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_dir_hash_file</span>
346
+ 283: <span class="ruby-ivar">@rubyrun_signature_folder</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'/'</span> <span class="ruby-operator">+</span> <span class="ruby-constant">RUBYRUN_DIR_HASH_FILE</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'_'</span> <span class="ruby-operator">+</span> <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">MD5</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">getwd</span>)
347
+ 284: <span class="ruby-keyword kw">end</span>
348
+ </pre>
349
+ </div>
350
+ </div>
351
+ </div>
352
+
353
+ <div id="method-M000069" class="method-detail">
354
+ <a name="M000069"></a>
355
+
356
+ <div class="method-heading">
357
+ <a href="#M000069" class="method-signature">
358
+ <span class="method-name">get_exclude_hash_file</span><span class="method-args">()</span>
359
+ </a>
360
+ </div>
361
+
362
+ <div class="method-description">
363
+ <p>
364
+ return the target file name that stores the serialized EXCLUDE_HASH
365
+ </p>
366
+ <p><a class="source-toggle" href="#"
367
+ onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
368
+ <div class="method-source-code" id="M000069-source">
369
+ <pre>
370
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 275</span>
371
+ 275: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_exclude_hash_file</span>
372
+ 276: <span class="ruby-ivar">@rubyrun_signature_folder</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'/'</span> <span class="ruby-operator">+</span> <span class="ruby-constant">RUBYRUN_EXCLUDE_HASH_FILE</span>
373
+ 277: <span class="ruby-keyword kw">end</span>
374
+ </pre>
375
+ </div>
376
+ </div>
377
+ </div>
378
+
379
+ <div id="method-M000068" class="method-detail">
380
+ <a name="M000068"></a>
381
+
382
+ <div class="method-heading">
383
+ <a href="#M000068" class="method-signature">
384
+ <span class="method-name">get_include_hash_file</span><span class="method-args">()</span>
385
+ </a>
386
+ </div>
387
+
388
+ <div class="method-description">
389
+ <p>
390
+ Return the target file name that stores the serialized INCLUDE_HASH
391
+ </p>
392
+ <p><a class="source-toggle" href="#"
393
+ onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
394
+ <div class="method-source-code" id="M000068-source">
395
+ <pre>
396
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 270</span>
397
+ 270: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_include_hash_file</span>
398
+ 271: <span class="ruby-ivar">@rubyrun_signature_folder</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'/'</span> <span class="ruby-operator">+</span> <span class="ruby-constant">RUBYRUN_INCLUDE_HASH_FILE</span>
399
+ 272: <span class="ruby-keyword kw">end</span>
400
+ </pre>
401
+ </div>
402
+ </div>
403
+ </div>
404
+
405
+ <div id="method-M000060" class="method-detail">
406
+ <a name="M000060"></a>
407
+
408
+ <div class="method-heading">
409
+ <a href="#M000060" class="method-signature">
410
+ <span class="method-name">identify_candidates</span><span class="method-args">()</span>
411
+ </a>
412
+ </div>
413
+
414
+ <div class="method-description">
415
+ <p>
416
+ If the directory content has changed (new files, modified files, new
417
+ APP_PATHS) a new scan will be required, otherwise the last scan results
418
+ will simply be reused. When a new scan is finished, the results are
419
+ serialized.
420
+ </p>
421
+ <p>
422
+ Digest technique is used to detect changes in directory content.
423
+ </p>
424
+ <p><a class="source-toggle" href="#"
425
+ onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
426
+ <div class="method-source-code" id="M000060-source">
427
+ <pre>
428
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 158</span>
429
+ 158: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">identify_candidates</span>
430
+ 159: <span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'APP_PATHS'</span>].<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">element</span><span class="ruby-operator">|</span>
431
+ 160: <span class="ruby-identifier">element</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">getwd</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">element</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'.'</span>
432
+ 161: <span class="ruby-identifier">expand_folder</span>(<span class="ruby-identifier">element</span>)
433
+ 162: }
434
+ 163: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">$rubyrun_file_date_hash</span>.<span class="ruby-identifier">empty?</span>
435
+ 164: <span class="ruby-identifier">dir_signature</span> = <span class="ruby-identifier">generate_hash</span>(<span class="ruby-identifier">$rubyrun_file_date_hash</span>)
436
+ 165: <span class="ruby-identifier">exclude_array</span> = []
437
+ 166: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">directory_changed?</span>(<span class="ruby-identifier">dir_signature</span>)
438
+ 167: <span class="ruby-identifier">$rubyrun_file_date_hash</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span>, <span class="ruby-identifier">date</span><span class="ruby-operator">|</span>
439
+ 168: <span class="ruby-identifier">scan_module_class</span>(<span class="ruby-identifier">f</span>)
440
+ 169: <span class="ruby-identifier">scan_super</span>(<span class="ruby-identifier">f</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span> <span class="ruby-identifier">exclude_array</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">name</span>}
441
+ 170: }
442
+ 171: <span class="ruby-identifier">$rubyrun_exclude_hash</span>[<span class="ruby-value str">'*'</span>] = <span class="ruby-identifier">exclude_array</span>.<span class="ruby-identifier">uniq</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">exclude_array</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
443
+ 172: <span class="ruby-identifier">serialize_scan_history</span>(<span class="ruby-identifier">dir_signature</span>)
444
+ 173: <span class="ruby-keyword kw">end</span>
445
+ 174: <span class="ruby-keyword kw">end</span>
446
+ 175: <span class="ruby-identifier">deserialize_scan_history</span>
447
+ 176: <span class="ruby-identifier">$rubyrun_file_date_hash</span>.<span class="ruby-identifier">clear</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$rubyrun_file_date_hash</span>
448
+ 177: <span class="ruby-keyword kw">end</span>
449
+ </pre>
450
+ </div>
451
+ </div>
452
+ </div>
453
+
454
+ <div id="method-M000052" class="method-detail">
455
+ <a name="M000052"></a>
456
+
457
+ <div class="method-heading">
458
+ <a href="#M000052" class="method-signature">
459
+ <span class="method-name">init_rubyrun</span><span class="method-args">()</span>
460
+ </a>
461
+ </div>
462
+
463
+ <div class="method-description">
464
+ <ol>
465
+ <li>Get all directories, logs and properties set up correctly
466
+
467
+ </li>
468
+ <li>Scan files in APP_PATHS to create an initial INCLUDE_HASH
469
+
470
+ </li>
471
+ </ol>
472
+ <p>
473
+ and an EXCLUDE_HASH
474
+ </p>
475
+ <p><a class="source-toggle" href="#"
476
+ onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
477
+ <div class="method-source-code" id="M000052-source">
478
+ <pre>
479
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 33</span>
480
+ 33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_rubyrun</span>
481
+ 34: <span class="ruby-identifier">ready_rubyrun_env</span>
482
+ 35: <span class="ruby-identifier">discover_targets</span>
483
+ 36: <span class="ruby-keyword kw">end</span>
484
+ </pre>
485
+ </div>
486
+ </div>
487
+ </div>
488
+
489
+ <div id="method-M000056" class="method-detail">
490
+ <a name="M000056"></a>
491
+
492
+ <div class="method-heading">
493
+ <a href="#M000056" class="method-signature">
494
+ <span class="method-name">load_config_props</span><span class="method-args">(config_file)</span>
495
+ </a>
496
+ </div>
497
+
498
+ <div class="method-description">
499
+ <p>
500
+ Property file is a yml file. Load the properties into $config hash
501
+ </p>
502
+ <p><a class="source-toggle" href="#"
503
+ onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
504
+ <div class="method-source-code" id="M000056-source">
505
+ <pre>
506
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 91</span>
507
+ 91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_config_props</span>(<span class="ruby-identifier">config_file</span>)
508
+ 92: <span class="ruby-keyword kw">begin</span>
509
+ 93: <span class="ruby-identifier">$rubyrun_config</span> = <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">load_file</span>(<span class="ruby-identifier">config_file</span>)
510
+ 94: <span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Properties found in #{config_file}:&quot;</span>
511
+ 95: <span class="ruby-constant">RUBYRUN_PROP_DEFAULTS</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">prop</span>, <span class="ruby-identifier">def_value</span><span class="ruby-operator">|</span>
512
+ 96: <span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-identifier">prop</span>] = <span class="ruby-identifier">def_value</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">config_prop_exists?</span>(<span class="ruby-identifier">prop</span>)
513
+ 97: <span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;#{prop} = #{$rubyrun_config[prop].inspect}&quot;</span>
514
+ 98: }
515
+ 99: <span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">&quot;***** APP_PATHS is nil. Applications will not be instrumented. *****&quot;</span> \
516
+ 100: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'APP_PATHS'</span>].<span class="ruby-identifier">empty?</span>
517
+ 101: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
518
+ 102: <span class="ruby-identifier">fatal_exit</span>(<span class="ruby-identifier">e</span>)
519
+ 103: <span class="ruby-keyword kw">end</span>
520
+ 104: <span class="ruby-identifier">$rubyrun_debug_args</span> = <span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'DEBUG_ARGS'</span>]
521
+ 105: <span class="ruby-identifier">$rubyrun_debug_obj</span> = <span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'DEBUG_OBJ'</span>]
522
+ 106: <span class="ruby-identifier">$rubyrun_dad</span> = <span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'DAD'</span>]
523
+ 107: <span class="ruby-identifier">$rubyrun_report_timer</span> = <span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'REPORT_TIMER'</span>]
524
+ 108: <span class="ruby-identifier">$rubyrun_report_shift_age</span> = <span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'REPORT_SHIFT_AGE'</span>]
525
+ 109: <span class="ruby-identifier">$rubyrun_trace_hash</span> = <span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'TRACE_HASH'</span>]
526
+ 110: <span class="ruby-identifier">$rubyrun_adapter_hash</span> = <span class="ruby-identifier">$rubyrun_config</span>[<span class="ruby-value str">'DB_ADAPTER_HASH'</span>]
527
+ 111: <span class="ruby-identifier">validate_opts</span>
528
+ 112: <span class="ruby-keyword kw">end</span>
529
+ </pre>
530
+ </div>
531
+ </div>
532
+ </div>
533
+
534
+ <div id="method-M000054" class="method-detail">
535
+ <a name="M000054"></a>
536
+
537
+ <div class="method-heading">
538
+ <a href="#M000054" class="method-signature">
539
+ <span class="method-name">make_folder</span><span class="method-args">(rubyrun_folders)</span>
540
+ </a>
541
+ </div>
542
+
543
+ <div class="method-description">
544
+ <p>
545
+ Make sub-directories (folders)
546
+ </p>
547
+ <p><a class="source-toggle" href="#"
548
+ onclick="toggleCode('M000054-source');return false;">[Source]</a></p>
549
+ <div class="method-source-code" id="M000054-source">
550
+ <pre>
551
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 67</span>
552
+ 67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">make_folder</span>(<span class="ruby-identifier">rubyrun_folders</span>)
553
+ 68: <span class="ruby-identifier">rubyrun_folders</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">rubyrun_folder</span><span class="ruby-operator">|</span>
554
+ 69: <span class="ruby-keyword kw">begin</span>
555
+ 70: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span>(<span class="ruby-identifier">rubyrun_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">rubyrun_folder</span>)
556
+ 71: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
557
+ 72: <span class="ruby-identifier">fatal_exit</span>(<span class="ruby-identifier">e</span>)
558
+ 73: <span class="ruby-keyword kw">end</span>
559
+ 74: }
560
+ 75: <span class="ruby-keyword kw">end</span>
561
+ </pre>
562
+ </div>
563
+ </div>
564
+ </div>
565
+
566
+ <div id="method-M000055" class="method-detail">
567
+ <a name="M000055"></a>
568
+
569
+ <div class="method-heading">
570
+ <a href="#M000055" class="method-signature">
571
+ <span class="method-name">ready_logfile</span><span class="method-args">(logname)</span>
572
+ </a>
573
+ </div>
574
+
575
+ <div class="method-description">
576
+ <p>
577
+ Initialize rubyrun logger and create its own log format
578
+ </p>
579
+ <p><a class="source-toggle" href="#"
580
+ onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
581
+ <div class="method-source-code" id="M000055-source">
582
+ <pre>
583
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 78</span>
584
+ 78: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ready_logfile</span>(<span class="ruby-identifier">logname</span>)
585
+ 79: <span class="ruby-identifier">$rubyrun_logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rubyrun_log_folder</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'/'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">logname</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'_'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">$$</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'.log'</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>)
586
+ 80: <span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">level</span> = <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">INFO</span>
587
+ 81: <span class="ruby-keyword kw">class</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">$rubyrun_logger</span>
588
+ 82: <span class="ruby-identifier">include</span> <span class="ruby-constant">RubyRunUtils__</span>
589
+ 83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_message</span> (<span class="ruby-identifier">severity</span>, <span class="ruby-identifier">timestamp</span>, <span class="ruby-identifier">progname</span>, <span class="ruby-identifier">msg</span>)
590
+ 84: <span class="ruby-node">&quot;[#{timestamp.strftime(&quot;%Y-%m-%d %H:%M:%S&quot;)}.#{(&quot;%.3f&quot; % timestamp.to_f).split('.')[1]}] #{get_thread_id} #{msg}\n&quot;</span>
591
+ 85: <span class="ruby-keyword kw">end</span>
592
+ 86: <span class="ruby-keyword kw">end</span>
593
+ 87: <span class="ruby-keyword kw">end</span>
594
+ </pre>
595
+ </div>
596
+ </div>
597
+ </div>
598
+
599
+ <div id="method-M000053" class="method-detail">
600
+ <a name="M000053"></a>
601
+
602
+ <div class="method-heading">
603
+ <a href="#M000053" class="method-signature">
604
+ <span class="method-name">ready_rubyrun_env</span><span class="method-args">()</span>
605
+ </a>
606
+ </div>
607
+
608
+ <div class="method-description">
609
+ <ol>
610
+ <li>Extract the working directory from ENV VAR and recursively create all the
611
+
612
+ </li>
613
+ </ol>
614
+ <p>
615
+ subdirectories if they dont exist
616
+ </p>
617
+ <ol>
618
+ <li>Create the log and trace folers
619
+
620
+ </li>
621
+ <li>Initialize the loggers
622
+
623
+ </li>
624
+ <li>Load the properties from either the current working directory or
625
+
626
+ </li>
627
+ </ol>
628
+ <p>
629
+ rubyrun working directory
630
+ </p>
631
+ <ol>
632
+ <li>Spawn a separate thread to for monitoring and commands
633
+
634
+ </li>
635
+ </ol>
636
+ <p><a class="source-toggle" href="#"
637
+ onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
638
+ <div class="method-source-code" id="M000053-source">
639
+ <pre>
640
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 45</span>
641
+ 45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ready_rubyrun_env</span>
642
+ 46: <span class="ruby-keyword kw">begin</span>
643
+ 47: <span class="ruby-identifier">raise</span> <span class="ruby-constant">RuntimeError</span>, <span class="ruby-node">&quot;environment variable #{RUBYRUN_WORKING_DIR} not set&quot;</span>, <span class="ruby-identifier">caller</span> \
644
+ 48: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">env_var_exists?</span>(<span class="ruby-constant">RUBYRUN_WORKING_DIR</span>)
645
+ 49: <span class="ruby-identifier">rubyrun_working_dir</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-constant">RUBYRUN_WORKING_DIR</span>]
646
+ 50: <span class="ruby-identifier">raise</span> <span class="ruby-constant">RuntimeError</span>, <span class="ruby-node">&quot;Missing #{RUBYRUN_OPTS_FILE} in #{rubyrun_working_dir}&quot;</span>, <span class="ruby-identifier">caller</span> \
647
+ 51: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">rubyrun_working_dir</span> <span class="ruby-operator">+</span> <span class="ruby-constant">RUBYRUN_OPTS_FILE</span>)
648
+ 52: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
649
+ 53: <span class="ruby-identifier">fatal_exit</span>(<span class="ruby-identifier">e</span>)
650
+ 54: <span class="ruby-keyword kw">end</span>
651
+ 55: <span class="ruby-operator">*</span><span class="ruby-identifier">rubyrun_folders</span> = <span class="ruby-identifier">rubyrun_working_dir</span> <span class="ruby-operator">+</span> <span class="ruby-constant">RUBYRUN_LOG</span>, <span class="ruby-identifier">rubyrun_working_dir</span> <span class="ruby-operator">+</span> <span class="ruby-constant">RUBYRUN_REPORT</span>, <span class="ruby-identifier">rubyrun_working_dir</span> <span class="ruby-operator">+</span> <span class="ruby-constant">RUBYRUN_SIGNATURE</span>
652
+ 56: <span class="ruby-identifier">make_folder</span>(<span class="ruby-identifier">rubyrun_folders</span>)
653
+ 57: <span class="ruby-ivar">@rubyrun_log_folder</span>, <span class="ruby-ivar">@rubyrun_report_folder</span>, <span class="ruby-ivar">@rubyrun_signature_folder</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">rubyrun_folders</span>
654
+ 58: <span class="ruby-identifier">logname</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">$0</span>, <span class="ruby-value str">&quot;.*&quot;</span>)
655
+ 59: <span class="ruby-identifier">ready_logfile</span>(<span class="ruby-identifier">logname</span>)
656
+ 60: <span class="ruby-identifier">system_wide_opts</span> = <span class="ruby-identifier">rubyrun_working_dir</span> <span class="ruby-operator">+</span> <span class="ruby-constant">RUBYRUN_OPTS_FILE</span>
657
+ 61: <span class="ruby-identifier">app_wide_opts</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">getwd</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'/'</span> <span class="ruby-operator">+</span> <span class="ruby-constant">RUBYRUN_OPTS_FILE</span>
658
+ 62: <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">app_wide_opts</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">load_config_props</span>(<span class="ruby-identifier">app_wide_opts</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">load_config_props</span>(<span class="ruby-identifier">system_wide_opts</span>)
659
+ 63: <span class="ruby-identifier">$rubyrun_tracer</span> = <span class="ruby-constant">RubyRunHTMLWriter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rubyrun_report_folder</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'/'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">logname</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'_'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">$$</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'_trace.html'</span>, <span class="ruby-constant">METHOD_TRACE_HEADER</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>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">$rubyrun_trace_hash</span>.<span class="ruby-identifier">empty?</span>
660
+ 64: <span class="ruby-keyword kw">end</span>
661
+ </pre>
662
+ </div>
663
+ </div>
664
+ </div>
665
+
666
+ <div id="method-M000066" class="method-detail">
667
+ <a name="M000066"></a>
668
+
669
+ <div class="method-heading">
670
+ <a href="#M000066" class="method-signature">
671
+ <span class="method-name">scan_module_class</span><span class="method-args">(path)</span>
672
+ </a>
673
+ </div>
674
+
675
+ <div class="method-description">
676
+ <p>
677
+ Regular expression that detects the class or module names of a given file
678
+ </p>
679
+ <p><a class="source-toggle" href="#"
680
+ onclick="toggleCode('M000066-source');return false;">[Source]</a></p>
681
+ <div class="method-source-code" id="M000066-source">
682
+ <pre>
683
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 231</span>
684
+ 231: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scan_module_class</span>(<span class="ruby-identifier">path</span>)
685
+ 232: <span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Candidate modules/classes for instrumentation in #{path}:&quot;</span>
686
+ 233: <span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">grep</span>(<span class="ruby-regexp re">/^\s*(class|module)\s+([[:upper:]][A-Za-z0-9_:]*)/</span><span class="ruby-identifier">m</span>) {
687
+ 234: <span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;\t #{$2}&quot;</span>
688
+ 235: <span class="ruby-identifier">$rubyrun_include_hash</span>[<span class="ruby-identifier">$2</span>] = []
689
+ 236: }
690
+ 237: <span class="ruby-keyword kw">end</span>
691
+ </pre>
692
+ </div>
693
+ </div>
694
+ </div>
695
+
696
+ <div id="method-M000067" class="method-detail">
697
+ <a name="M000067"></a>
698
+
699
+ <div class="method-heading">
700
+ <a href="#M000067" class="method-signature">
701
+ <span class="method-name">scan_super</span><span class="method-args">(path)</span>
702
+ </a>
703
+ </div>
704
+
705
+ <div class="method-description">
706
+ <p>
707
+ Line up all the method names in a file by line # Line up all the line
708
+ numbers that contain the keyworkd super Collate the two arrays to determine
709
+ which method has super in it Put these method names in EXCLUDE_HASH and
710
+ skip instrumentation
711
+ </p>
712
+ <p><a class="source-toggle" href="#"
713
+ onclick="toggleCode('M000067-source');return false;">[Source]</a></p>
714
+ <div class="method-source-code" id="M000067-source">
715
+ <pre>
716
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 243</span>
717
+ 243: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scan_super</span>(<span class="ruby-identifier">path</span>)
718
+ 244: <span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Method(s) to be excluded from instrumentation in #{path}:&quot;</span>
719
+ 245: <span class="ruby-identifier">method_name_array</span>, <span class="ruby-identifier">method_lineno_array</span>, <span class="ruby-identifier">super_array</span>, <span class="ruby-identifier">exclude_array</span> = [],[],[],[]
720
+ 246: <span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
721
+ 247: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">readlines</span>.<span class="ruby-identifier">each_with_index</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">code</span>, <span class="ruby-identifier">lineno</span><span class="ruby-operator">|</span>
722
+ 248: <span class="ruby-identifier">code</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/^\s*def\s+(.*)\(+.*\)+/</span><span class="ruby-identifier">m</span>)
723
+ 249: (<span class="ruby-identifier">method_name_array</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">$1</span>; <span class="ruby-identifier">method_lineno_array</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">lineno</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$1</span>
724
+ 250: <span class="ruby-identifier">code</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/^\s*(super)/</span><span class="ruby-identifier">m</span>)
725
+ 251: <span class="ruby-identifier">super_array</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">lineno</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$1</span>
726
+ 252: }
727
+ 253: }
728
+ 254: <span class="ruby-identifier">method_name_array</span>.<span class="ruby-identifier">reverse!</span>
729
+ 255: <span class="ruby-identifier">method_lineno_array</span>.<span class="ruby-identifier">reverse!</span>
730
+ 256: <span class="ruby-identifier">super_array</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">lineno</span><span class="ruby-operator">|</span>
731
+ 257: <span class="ruby-identifier">method_lineno_array</span>.<span class="ruby-identifier">each_with_index</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">linenum</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
732
+ 258: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">lineno</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">linenum</span>
733
+ 259: <span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;\t #{method_name_array[i]}&quot;</span>
734
+ 260: <span class="ruby-identifier">m</span> = <span class="ruby-identifier">method_name_array</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">'.'</span>)
735
+ 261: <span class="ruby-identifier">exclude_array</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-identifier">m</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">m</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">m</span>[<span class="ruby-value">0</span>])
736
+ 262: <span class="ruby-keyword kw">break</span>
737
+ 263: <span class="ruby-keyword kw">end</span>
738
+ 264: }
739
+ 265: }
740
+ 266: <span class="ruby-identifier">exclude_array</span>
741
+ 267: <span class="ruby-keyword kw">end</span>
742
+ </pre>
743
+ </div>
744
+ </div>
745
+ </div>
746
+
747
+ <div id="method-M000064" class="method-detail">
748
+ <a name="M000064"></a>
749
+
750
+ <div class="method-heading">
751
+ <a href="#M000064" class="method-signature">
752
+ <span class="method-name">serialize_scan_history</span><span class="method-args">(dir_signature)</span>
753
+ </a>
754
+ </div>
755
+
756
+ <div class="method-description">
757
+ <p>
758
+ Use Marshal to serialize scan results (the include and exclude hashes)
759
+ </p>
760
+ <p><a class="source-toggle" href="#"
761
+ onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
762
+ <div class="method-source-code" id="M000064-source">
763
+ <pre>
764
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 216</span>
765
+ 216: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">serialize_scan_history</span>(<span class="ruby-identifier">dir_signature</span>)
766
+ 217: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">get_include_hash_file</span>, <span class="ruby-value str">'w'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">dump</span>(<span class="ruby-identifier">$rubyrun_include_hash</span>, <span class="ruby-identifier">f</span>)}
767
+ 218: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">get_exclude_hash_file</span>, <span class="ruby-value str">'w'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">dump</span>(<span class="ruby-identifier">$rubyrun_exclude_hash</span>, <span class="ruby-identifier">f</span>)}
768
+ 219: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">get_dir_hash_file</span>, <span class="ruby-value str">'w'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">dump</span>(<span class="ruby-identifier">dir_signature</span>, <span class="ruby-identifier">f</span>)}
769
+ 220: <span class="ruby-keyword kw">end</span>
770
+ </pre>
771
+ </div>
772
+ </div>
773
+ </div>
774
+
775
+ <div id="method-M000057" class="method-detail">
776
+ <a name="M000057"></a>
777
+
778
+ <div class="method-heading">
779
+ <a href="#M000057" class="method-signature">
780
+ <span class="method-name">validate_opts</span><span class="method-args">()</span>
781
+ </a>
782
+ </div>
783
+
784
+ <div class="method-description">
785
+ <p>
786
+ Validate the range of REPORT_TIMER and REPORT_SHIFT_AGE Use default values
787
+ if out of acceptable range
788
+ </p>
789
+ <p><a class="source-toggle" href="#"
790
+ onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
791
+ <div class="method-source-code" id="M000057-source">
792
+ <pre>
793
+ <span class="ruby-comment cmt"># File lib/rubyrun/rubyrun_initializer__.rb, line 116</span>
794
+ 116: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate_opts</span>
795
+ 117: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$rubyrun_report_timer</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">3600</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">$rubyrun_report_timer</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">60</span>
796
+ 118: <span class="ruby-identifier">$rubyrun_report_timer</span> = <span class="ruby-constant">RUBYRUN_PROP_DEFAULTS</span>[<span class="ruby-value str">'REPORT_TIMER'</span>]
797
+ 119: <span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">warn</span> <span class="ruby-node">&quot;REPORT_TIMER value must be between 60 and 3600. #{$rubyrun_report_timer}is used.&quot;</span>
798
+ 120: <span class="ruby-keyword kw">end</span>
799
+ 121: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$rubyrun_report_shift_age</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">120</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">$rubyrun_report_shift_age</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">1</span>
800
+ 122: <span class="ruby-identifier">$rubyrun_report_shift_age</span> = <span class="ruby-constant">RUBYRUN_PROP_DEFAULTS</span>[<span class="ruby-value str">'REPORT_SHIFT_AGE'</span>]
801
+ 123: <span class="ruby-identifier">$rubyrun_logger</span>.<span class="ruby-identifier">warn</span> <span class="ruby-node">&quot;REPORT_SHIFT_AGE value must be between 1 and 120. #{$rubyrun_report_shift_age}is used.&quot;</span>
802
+ 124: <span class="ruby-keyword kw">end</span>
803
+ 125: <span class="ruby-keyword kw">end</span>
804
+ </pre>
805
+ </div>
806
+ </div>
807
+ </div>
808
+
809
+
810
+ </div>
811
+
812
+
813
+ </div>
814
+
815
+
816
+ <div id="validator-badges">
817
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
818
+ </div>
819
+
820
+ </body>
821
+ </html>