ruby-prof 0.13.0 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4981adb0602037a3dbf06674dc2df341ff80fce9
4
+ data.tar.gz: b6ba1051e11bd2e193bb99cd786bc16681ea159a
5
+ SHA512:
6
+ metadata.gz: 5c8db375d6009b0da09e60a890bc605f5d289ca8e868cebd01910b3b8c788bf140dda2473a149578bf540ab863b355905c9b87386dbc2b05f707609a031efece
7
+ data.tar.gz: 22c4d62dda4759db6d4c29581b3ab5634da90cae709715229ce30a0c57ef00a73ec7b44f9f5006a0999c7679f8595a597e441b76ad4750c66a986621c4dc6c0f
@@ -1,4 +1,5 @@
1
1
  = ruby-prof
2
+ {<img src="https://travis-ci.org/ruby-prof/ruby-prof.png?branch=master" alt="Build Status" />}[https://travis-ci.org/ruby-prof/ruby-prof]
2
3
 
3
4
  == Overview
4
5
 
@@ -224,7 +225,7 @@ ruby-prof can generate a number of different reports:
224
225
  Flat profiles show the overall time spent in each method. They
225
226
  are a good of quickly identifying which methods take the most time.
226
227
  An example of a flat profile and an explanation can be found in
227
- {examples/flat.txt}[http://github.com/rdp/ruby-prof/tree/master/examples/flat.txt].
228
+ {examples/flat.txt}[http://github.com/ruby-prof/ruby-prof/tree/master/examples/flat.txt].
228
229
 
229
230
  There are several varieties of these -- run $ ruby-prof --help
230
231
 
@@ -233,13 +234,13 @@ addition, they also show which methods call the current method and which
233
234
  methods its calls. Thus they are good for understanding how methods
234
235
  gets called and provide insight into the flow of your program. An
235
236
  example text graph profile is located at
236
- {examples/graph.txt}[http://github.com/rdp/ruby-prof/tree/master/examples/graph.txt].
237
+ {examples/graph.txt}[http://github.com/ruby-prof/ruby-prof/tree/master/examples/graph.txt].
237
238
 
238
239
  HTML Graph profiles are the same as graph profiles, except output is
239
240
  generated in hyper-linked HTML. Since graph profiles can be quite large,
240
241
  the embedded links make it much easier to navigate the results. An
241
242
  example html graph profile is located at
242
- {examples/graph.html}[http://github.com/rdp/ruby-prof/tree/master/examples/graph.html].
243
+ {examples/graph.html}[http://github.com/ruby-prof/ruby-prof/tree/master/examples/graph.html].
243
244
 
244
245
  Call graphs output results in the calltree profile format which is used
245
246
  by KCachegrind. Call graph support was generously donated by Carl
@@ -249,13 +250,13 @@ site.
249
250
 
250
251
  Call stack reports produce a HTML visualization of the time spent in
251
252
  each execution path of the profiled code. An example can be found at
252
- {examples/stack.html}[http://github.com/rdp/ruby-prof/tree/master/examples/call_stack.html].
253
+ {examples/stack.html}[http://github.com/ruby-prof/ruby-prof/tree/master/examples/call_stack.html].
253
254
 
254
255
  Another good example: [http://twitpic.com/28z94a]
255
256
 
256
257
  Finally, there's a so called MultiPrinter which can generate several
257
258
  reports in one profiling run. See
258
- {examples/multi.stack.html}[http://github.com/rdp/ruby-prof/tree/master/examples/multi.stack.html].
259
+ {examples/multi.stack.html}[http://github.com/ruby-prof/ruby-prof/tree/master/examples/multi.stack.html].
259
260
 
260
261
  There is also a graphviz .dot visualiser.
261
262
 
@@ -427,6 +428,6 @@ See LICENSE for license information.
427
428
 
428
429
  == Development
429
430
 
430
- Code is located at http://github.com/rdp/ruby-prof
431
+ Code is located at https://github.com/ruby-prof/ruby-prof
431
432
 
432
- Google group/mailing list: http://groups.google.com/group/ruby-optimization
433
+ Google group/mailing list: http://groups.google.com/group/ruby-optimization or start a github issue.
@@ -131,11 +131,11 @@ this list of conditions and the following disclaimer in the documentation
131
131
  and/or other materials provided with the distribution.</p>
132
132
  </li></ol>
133
133
 
134
- <p>THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS “AS IS” AND ANY
135
- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
136
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
137
- DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
138
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
134
+ <p>THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS “AS IS&#39;&#39;
135
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
136
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
137
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
138
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
139
139
  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
140
140
  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
141
141
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
@@ -119,6 +119,10 @@
119
119
 
120
120
  <h1 id="label-ruby-prof">ruby-prof</h1>
121
121
 
122
+ <p><a href="https://travis-ci.org/ruby-prof/ruby-prof"><img
123
+ src="https://travis-ci.org/ruby-prof/ruby-prof.png?branch=master"
124
+ alt="Build Status" /></a></p>
125
+
122
126
  <h2 id="label-Overview">Overview</h2>
123
127
 
124
128
  <p>ruby-prof is a fast code profiler for Ruby. Its features include:</p>
@@ -151,8 +155,8 @@ href="README_rdoc.html">README</a>.</p>
151
155
 
152
156
  <p>ruby-prof requires Ruby 1.8.7 or 1.9.2 and higher.</p>
153
157
 
154
- <p>If you are running Linux or Unix youll need a C compiler so the extension
155
- can be compiled when it is installed.</p>
158
+ <p>If you are running Linux or Unix you&#39;ll need a C compiler so the
159
+ extension can be compiled when it is installed.</p>
156
160
 
157
161
  <p>If you are running Windows, then you may need to install the Windows
158
162
  specific RubyGem which includes an already built extension (see Install
@@ -164,8 +168,8 @@ section).</p>
164
168
 
165
169
  <pre>gem install ruby-prof</pre>
166
170
 
167
- <p>If youre on windows then a prebuilt binary gem is available. You may of
168
- course compile it yourself via use of devkit on MinGW.</p>
171
+ <p>If you&#39;re on windows then a prebuilt binary gem is available. You may
172
+ of course compile it yourself via use of devkit on MinGW.</p>
169
173
 
170
174
  <h2 id="label-Usage">Usage</h2>
171
175
 
@@ -182,7 +186,7 @@ For more information refer to the documentation of the ruby-prof command.</p>
182
186
  <p>The second way is to use the ruby-prof API to profile particular segments
183
187
  of code.</p>
184
188
 
185
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'ruby-prof'</span>
189
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;ruby-prof&#39;</span>
186
190
 
187
191
  <span class="ruby-comment"># Profile the code</span>
188
192
  <span class="ruby-constant">RubyProf</span>.<span class="ruby-identifier">start</span>
@@ -198,7 +202,7 @@ of code.</p>
198
202
 
199
203
  <p>Alternatively, you can use a block to tell ruby-prof what to profile:</p>
200
204
 
201
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'ruby-prof'</span>
205
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;ruby-prof&#39;</span>
202
206
 
203
207
  <span class="ruby-comment"># Profile the code</span>
204
208
  <span class="ruby-identifier">result</span> = <span class="ruby-constant">RubyProf</span>.<span class="ruby-identifier">profile</span> <span class="ruby-keyword">do</span>
@@ -214,7 +218,7 @@ of code.</p>
214
218
 
215
219
  <p>ruby-prof also supports pausing and resuming profiling runs.</p>
216
220
 
217
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'ruby-prof'</span>
221
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;ruby-prof&#39;</span>
218
222
 
219
223
  <span class="ruby-comment"># Profile the code</span>
220
224
  <span class="ruby-constant">RubyProf</span>.<span class="ruby-identifier">start</span>
@@ -229,7 +233,7 @@ of code.</p>
229
233
  <p>Note that resume will automatically call start if a profiling run has not
230
234
  yet started. In addition, resume can also take a block:</p>
231
235
 
232
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'ruby-prof'</span>
236
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;ruby-prof&#39;</span>
233
237
 
234
238
  <span class="ruby-comment"># Profile the code</span>
235
239
  <span class="ruby-constant">RubyProf</span>.<span class="ruby-identifier">resume</span> <span class="ruby-keyword">do</span>
@@ -249,10 +253,10 @@ results. This is useful for reducing connectivity in the call graph, making
249
253
  it easier to identify the source of performance problems when using a graph
250
254
  printer.</p>
251
255
 
252
- <p>For example, consider Integer#times: its hardly ever useful to know how
253
- much time is spent in the method itself. Were much more interested in how
254
- much the passed in block contributes to the time spent in the method which
255
- contains the Integer#times call.</p>
256
+ <p>For example, consider Integer#times: it&#39;s hardly ever useful to know
257
+ how much time is spent in the method itself. We&#39;re much more interested
258
+ in how much the passed in block contributes to the time spent in the method
259
+ which contains the Integer#times call.</p>
256
260
 
257
261
  <p>Methods are eliminated from the collected data by calling
258
262
  `eliminate_methods!` on the profiling result, before submitting it to a
@@ -279,9 +283,10 @@ profiling.</p>
279
283
 
280
284
  <h2 id="label-Benchmarking+full+load+time+including+rubygems+startup+cost+%3D%3D">Benchmarking full load time including rubygems startup cost ==</h2>
281
285
 
282
- <p>If you want to get a more accurate measurement of what takes all of a gem’s
283
- bin/xxx command to load, you may want to also measure rubygems’ startup
284
- penalty. You can do this by calling into bin/ruby-prof directly, ex:</p>
286
+ <p>If you want to get a more accurate measurement of what takes all of a
287
+ gem&#39;s bin/xxx command to load, you may want to also measure
288
+ rubygems&#39; startup penalty. You can do this by calling into
289
+ bin/ruby-prof directly, ex:</p>
285
290
 
286
291
  <p>$ gem which ruby-prof</p>
287
292
 
@@ -299,26 +304,28 @@ g:192binsome_installed_gem_command</p>
299
304
 
300
305
  <h2 id="label-Profiling+Tests">Profiling Tests</h2>
301
306
 
302
- <p>ruby-prof supports profiling tests cases written using Rubys built-in unit
303
- test framework (ie, test derived from Test::Unit::TestCase). To enable
304
- profiling simply add the following line of code to within your test class:</p>
307
+ <p>ruby-prof supports profiling tests cases written using Ruby&#39;s built-in
308
+ unit test framework (ie, test derived from Test::Unit::TestCase). To
309
+ enable profiling simply add the following line of code to within your test
310
+ class:</p>
305
311
 
306
312
  <pre>include RubyProf::Test</pre>
307
313
 
308
314
  <p>Each test method is profiled separately. ruby-prof will run each test
309
315
  method once as a warmup and then ten additional times to gather profile
310
316
  data. Note that the profile data will <strong>not</strong> include the
311
- classs setup or teardown methods.</p>
317
+ class&#39;s setup or teardown methods.</p>
312
318
 
313
319
  <p>Separate reports are generated for each method and saved, by default, in
314
- the test processs working directory. To change this, or other profiling
315
- options, modify your test classs PROFILE_OPTIONS hash table. To globally
316
- change test profiling options, modify RubyProf::Test::PROFILE_OPTIONS.</p>
320
+ the test process&#39;s working directory. To change this, or other
321
+ profiling options, modify your test class&#39;s PROFILE_OPTIONS hash table.
322
+ To globally change test profiling options, modify
323
+ RubyProf::Test::PROFILE_OPTIONS.</p>
317
324
 
318
325
  <h2 id="label-Profiling+Rails">Profiling Rails</h2>
319
326
 
320
327
  <p>To profile a Rails application it is vital to run it using production like
321
- settings (cache classes, cache view lookups, etc.). Otherwise, Rails
328
+ settings (cache classes, cache view lookups, etc.). Otherwise, Rail&#39;s
322
329
  dependency loading code will overwhelm any time spent in the application
323
330
  itself (our tests show that Rails dependency loading causes a roughly 6x
324
331
  slowdown). The best way to do this is create a new Rails environment,
@@ -334,14 +341,14 @@ likely turn off caching.</p>
334
341
  <p>Add the ruby-prof to your gemfile:</p>
335
342
 
336
343
  <pre>group :profile do
337
- gem 'ruby-prof'
344
+ gem &#39;ruby-prof&#39;
338
345
  end</pre>
339
346
  </li><li>
340
347
  <p>Add the ruby prof rack adapter to your middleware stack. One way to do
341
348
  this is by adding the following code to config.ru:</p>
342
349
 
343
350
  <pre class="ruby"><span class="ruby-keyword">if</span> <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">env</span>.<span class="ruby-identifier">profile?</span>
344
- <span class="ruby-identifier">use</span> <span class="ruby-constant">Rack</span><span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span>, :<span class="ruby-identifier">path</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'/temp/profile'</span>
351
+ <span class="ruby-identifier">use</span> <span class="ruby-constant">Rack</span><span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span>, :<span class="ruby-identifier">path</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;/temp/profile&#39;</span>
345
352
  <span class="ruby-keyword">end</span>
346
353
  </pre>
347
354
 
@@ -373,7 +380,7 @@ profiling reports created by the previous request!</p>
373
380
  <p>Flat profiles show the overall time spent in each method. They are a good
374
381
  of quickly identifying which methods take the most time. An example of a
375
382
  flat profile and an explanation can be found in <a
376
- href="http://github.com/rdp/ruby-prof/tree/master/examples/flat.txt">examples/flat.txt</a>.</p>
383
+ href="http://github.com/ruby-prof/ruby-prof/tree/master/examples/flat.txt">examples/flat.txt</a>.</p>
377
384
 
378
385
  <p>There are several varieties of these – run $ ruby-prof –help</p>
379
386
 
@@ -382,13 +389,13 @@ addition, they also show which methods call the current method and which
382
389
  methods its calls. Thus they are good for understanding how methods gets
383
390
  called and provide insight into the flow of your program. An example text
384
391
  graph profile is located at <a
385
- href="http://github.com/rdp/ruby-prof/tree/master/examples/graph.txt">examples/graph.txt</a>.</p>
392
+ href="http://github.com/ruby-prof/ruby-prof/tree/master/examples/graph.txt">examples/graph.txt</a>.</p>
386
393
 
387
394
  <p>HTML Graph profiles are the same as graph profiles, except output is
388
395
  generated in hyper-linked HTML. Since graph profiles can be quite large,
389
396
  the embedded links make it much easier to navigate the results. An example
390
397
  html graph profile is located at <a
391
- href="http://github.com/rdp/ruby-prof/tree/master/examples/graph.html">examples/graph.html</a>.</p>
398
+ href="http://github.com/ruby-prof/ruby-prof/tree/master/examples/graph.html">examples/graph.html</a>.</p>
392
399
 
393
400
  <p>Call graphs output results in the calltree profile format which is used by
394
401
  KCachegrind. Call graph support was generously donated by Carl Shimer. More
@@ -398,14 +405,14 @@ site.</p>
398
405
 
399
406
  <p>Call stack reports produce a HTML visualization of the time spent in each
400
407
  execution path of the profiled code. An example can be found at <a
401
- href="http://github.com/rdp/ruby-prof/tree/master/examples/call_stack.html">examples/stack.html</a>.</p>
408
+ href="http://github.com/ruby-prof/ruby-prof/tree/master/examples/call_stack.html">examples/stack.html</a>.</p>
402
409
 
403
410
  <p>Another good example: [<a
404
411
  href="http://twitpic.com/28z94a">twitpic.com/28z94a</a>]</p>
405
412
 
406
- <p>Finally, theres a so called MultiPrinter which can generate several
413
+ <p>Finally, there&#39;s a so called MultiPrinter which can generate several
407
414
  reports in one profiling run. See <a
408
- href="http://github.com/rdp/ruby-prof/tree/master/examples/multi.stack.html">examples/multi.stack.html</a>.</p>
415
+ href="http://github.com/ruby-prof/ruby-prof/tree/master/examples/multi.stack.html">examples/multi.stack.html</a>.</p>
409
416
 
410
417
  <p>There is also a graphviz .dot visualiser.</p>
411
418
 
@@ -427,7 +434,7 @@ call graph report in text format</p>
427
434
  Creates a call graph report in HTML (separate files per thread)</p>
428
435
  </li><li>
429
436
  <p><a href="RubyProf/DotPrinter.html">RubyProf::DotPrinter</a> - Creates a
430
- call graph report in GraphViz's DOT format which can be converted to an
437
+ call graph report in GraphViz&#39;s DOT format which can be converted to an
431
438
  image</p>
432
439
  </li><li>
433
440
  <p><a href="RubyProf/CallTreePrinter.html">RubyProf::CallTreePrinter</a> -
@@ -497,8 +504,8 @@ significant CPU or disk time during a profiling run then the reported
497
504
  results will be too large.</p>
498
505
 
499
506
  <p>CPU time uses the CPU clock counter to measure time. The returned values
500
- are dependent on the correctly setting the CPUs frequency. This mode is
501
- only supported on Pentium or PowerPC platforms (linux only).</p>
507
+ are dependent on the correctly setting the CPU&#39;s frequency. This mode
508
+ is only supported on Pentium or PowerPC platforms (linux only).</p>
502
509
 
503
510
  <p>Object allocation reports show how many objects each method in a program
504
511
  allocates. This support was added by Sylvain Joyeux and requires a patched
@@ -510,16 +517,16 @@ This support was added by Alexander Dymo and requires a patched Ruby
510
517
  interpreter. For more information, see: <a
511
518
  href="http://rubyforge.org/tracker/index.php?func=detail&aid=17676&group_id=1814&atid=7062">rubyforge.org/tracker/index.php?func=detail&aid=17676&group_id=1814&atid=7062</a></p>
512
519
 
513
- <p>Garbage collection runs report how many times Rubys garbage collector is
514
- invoked during a profiling session. This support was added by Jeremy
520
+ <p>Garbage collection runs report how many times Ruby&#39;s garbage collector
521
+ is invoked during a profiling session. This support was added by Jeremy
515
522
  Kemper and requires a patched Ruby interpreter. For more information, see:
516
523
  <a
517
524
  href="http://rubyforge.org/tracker/index.php?func=detail&aid=17676&group_id=1814&atid=7062">rubyforge.org/tracker/index.php?func=detail&aid=17676&group_id=1814&atid=7062</a></p>
518
525
 
519
- <p>Garbage collection time reports how much time is spent in Rubys garbage
520
- collector during a profiling session. This support was added by Jeremy
521
- Kemper and requires a patched Ruby interpreter. For more information, see:
522
- <a
526
+ <p>Garbage collection time reports how much time is spent in Ruby&#39;s
527
+ garbage collector during a profiling session. This support was added by
528
+ Jeremy Kemper and requires a patched Ruby interpreter. For more
529
+ information, see: <a
523
530
  href="http://rubyforge.org/tracker/index.php?func=detail&aid=17676&group_id=1814&atid=7062">rubyforge.org/tracker/index.php?func=detail&aid=17676&group_id=1814&atid=7062</a></p>
524
531
 
525
532
  <p>To set the measurement:</p>
@@ -586,7 +593,7 @@ profiling run and is otherwise quiescent.</p>
586
593
 
587
594
  <p>On both platforms, cpu time is measured using the RDTSC assembly function
588
595
  provided by the Pentium and PowerPC platforms. CPU time is dependent on the
589
- cpus frequency. On Linux, ruby-prof attempts to read this value from
596
+ cpu&#39;s frequency. On Linux, ruby-prof attempts to read this value from
590
597
  “/proc/cpuinfo.” On Windows, you must manually specify the clock
591
598
  frequency. This can be done using the RUBY_PROF_CPU_FREQUENCY environment
592
599
  variable:</p>
@@ -603,18 +610,18 @@ variable:</p>
603
610
  context switches in 1.8. As a result, the timings ruby-prof reports for
604
611
  each thread may be slightly inaccurate. In particular, this will happen
605
612
  for newly spawned threads that go to sleep immediately (their first call).
606
- For instance, if you use Rubys timeout library to wait for 2 seconds, the
607
- 2 seconds will be assigned to the foreground thread and not the newly
613
+ For instance, if you use Ruby&#39;s timeout library to wait for 2 seconds,
614
+ the 2 seconds will be assigned to the foreground thread and not the newly
608
615
  created background thread. These errors can largely be avoided if the
609
616
  background thread performs any operation before going to sleep.</p>
610
617
 
611
618
  <h2 id="label-Performance">Performance</h2>
612
619
 
613
- <p>Significant effort has been put into reducing ruby-profs overhead as much
614
- as possible. Our tests show that the overhead associated with profiling
615
- code varies considerably with the code being profiled. Most programs will
616
- run approximately twice as slow while highly recursive programs (like the
617
- fibonacci series test) will run three times slower.</p>
620
+ <p>Significant effort has been put into reducing ruby-prof&#39;s overhead as
621
+ much as possible. Our tests show that the overhead associated with
622
+ profiling code varies considerably with the code being profiled. Most
623
+ programs will run approximately twice as slow while highly recursive
624
+ programs (like the fibonacci series test) will run three times slower.</p>
618
625
 
619
626
  <h2 id="label-License">License</h2>
620
627
 
@@ -623,10 +630,11 @@ fibonacci series test) will run three times slower.</p>
623
630
  <h2 id="label-Development">Development</h2>
624
631
 
625
632
  <p>Code is located at <a
626
- href="http://github.com/rdp/ruby-prof">github.com/rdp/ruby-prof</a></p>
633
+ href="https://github.com/ruby-prof/ruby-prof">github.com/ruby-prof/ruby-prof</a></p>
627
634
 
628
635
  <p>Google group/mailing list: <a
629
- href="http://groups.google.com/group/ruby-optimization">groups.google.com/group/ruby-optimization</a></p>
636
+ href="http://groups.google.com/group/ruby-optimization">groups.google.com/group/ruby-optimization</a>
637
+ or start a github issue.</p>
630
638
 
631
639
  </div>
632
640
 
@@ -200,10 +200,10 @@
200
200
  <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
201
201
  <span class="ruby-ivar">@options</span>[<span class="ruby-value">:min_percent</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">1</span>
202
202
  <span class="ruby-ivar">@tmpdir</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:path</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">tmpdir</span>
203
- <span class="ruby-ivar">@printer_klasses</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-value">:printers</span>] <span class="ruby-operator">||</span> {<span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">FlatPrinter</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'flat.txt'</span>,
204
- <span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">GraphPrinter</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'graph.txt'</span>,
205
- <span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">GraphHtmlPrinter</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'graph.html'</span>,
206
- <span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">CallStackPrinter</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'call_stack.html'</span>}
203
+ <span class="ruby-ivar">@printer_klasses</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-value">:printers</span>] <span class="ruby-operator">||</span> {<span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">FlatPrinter</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;flat.txt&#39;</span>,
204
+ <span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">GraphPrinter</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;graph.txt&#39;</span>,
205
+ <span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">GraphHtmlPrinter</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;graph.html&#39;</span>,
206
+ <span class="ruby-operator">::</span><span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">CallStackPrinter</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;call_stack.html&#39;</span>}
207
207
 
208
208
  <span class="ruby-ivar">@skip_paths</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:skip_paths</span>] <span class="ruby-operator">||</span> [<span class="ruby-regexp">%r{^/assets}</span>, <span class="ruby-regexp">%r{\.css$}</span>, <span class="ruby-regexp">%r{\.js$}</span>, <span class="ruby-regexp">%r{\.png$}</span>, <span class="ruby-regexp">%r{\.jpeg$}</span>, <span class="ruby-regexp">%r{\.jpg$}</span>, <span class="ruby-regexp">%r{\.gif$}</span>]
209
209
  <span class="ruby-keyword">end</span></pre>
@@ -251,7 +251,7 @@
251
251
  <span class="ruby-identifier">result</span> = <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">env</span>)
252
252
  <span class="ruby-keyword">end</span>
253
253
 
254
- <span class="ruby-identifier">path</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">path</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">'/'</span>, <span class="ruby-string">'-'</span>)
254
+ <span class="ruby-identifier">path</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">path</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&#39;/&#39;</span>, <span class="ruby-string">&#39;-&#39;</span>)
255
255
  <span class="ruby-identifier">path</span>.<span class="ruby-identifier">slice!</span>(<span class="ruby-value">0</span>)
256
256
 
257
257
  <span class="ruby-identifier">print</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">path</span>)
@@ -289,7 +289,7 @@
289
289
  <span class="ruby-ivar">@printer_klasses</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">printer_klass</span>, <span class="ruby-identifier">base_name</span><span class="ruby-operator">|</span>
290
290
  <span class="ruby-identifier">printer</span> = <span class="ruby-identifier">printer_klass</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">data</span>)
291
291
  <span class="ruby-identifier">file_name</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@tmpdir</span>, <span class="ruby-node">&quot;#{path}-#{base_name}&quot;</span>)
292
- <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file_name</span>, <span class="ruby-string">'wb'</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
292
+ <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file_name</span>, <span class="ruby-string">&#39;wb&#39;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
293
293
  <span class="ruby-identifier">printer</span>.<span class="ruby-identifier">print</span>(<span class="ruby-identifier">file</span>, <span class="ruby-ivar">@options</span>)
294
294
  <span class="ruby-keyword">end</span>
295
295
  <span class="ruby-keyword">end</span>
@@ -209,10 +209,11 @@
209
209
 
210
210
  <div id="description" class="description">
211
211
 
212
- <p>The call info visitor class does a depth-first traversal across a thread’s
213
- call stack. At each call_info node, the visitor executes the block
214
- provided in the visit method. The block is passed two parameters, the
215
- event and the call_info instance. Event will be either :enter or :exit.</p>
212
+ <p>The call info visitor class does a depth-first traversal across a
213
+ thread&#39;s call stack. At each call_info node, the visitor executes the
214
+ block provided in the visit method. The block is passed two parameters,
215
+ the event and the call_info instance. Event will be either :enter or
216
+ :exit.</p>
216
217
 
217
218
  <pre class="ruby"><span class="ruby-identifier">visitor</span> = <span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">CallInfoVisitor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">result</span>.<span class="ruby-identifier">threads</span>.<span class="ruby-identifier">first</span>)
218
219
 
@@ -510,7 +510,7 @@ options.</p>
510
510
  for it to be printed out in the report.
511
511
  Default value is 0.
512
512
 
513
- :print_file - True or false. Specifies if a method's source
513
+ :print_file - True or false. Specifies if a method&#39;s source
514
514
  file should be printed. Default value if false.
515
515
 
516
516
  :sort_method - Specifies method used for sorting method infos.
@@ -227,7 +227,7 @@
227
227
  <pre><span class="ruby-comment"># File lib/ruby-prof/call_info.rb, line 25</span>
228
228
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">call_sequence</span>
229
229
  <span class="ruby-ivar">@call_sequence</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
230
- <span class="ruby-identifier">stack</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">method</span><span class="ruby-operator">|</span> <span class="ruby-identifier">method</span>.<span class="ruby-identifier">full_name</span>}.<span class="ruby-identifier">join</span>(<span class="ruby-string">'-&gt;'</span>)
230
+ <span class="ruby-identifier">stack</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">method</span><span class="ruby-operator">|</span> <span class="ruby-identifier">method</span>.<span class="ruby-identifier">full_name</span>}.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;-&gt;&#39;</span>)
231
231
  <span class="ruby-keyword">end</span>
232
232
  <span class="ruby-keyword">end</span></pre>
233
233
  </div><!-- call_sequence-source -->
@@ -329,7 +329,7 @@ from both praent end self.</p>
329
329
  <div class="method-description">
330
330
 
331
331
  <p>find a specific call in list of children. returns nil if not found. note:
332
- there cant be more than one child with a given target method. in other
332
+ there can&#39;t be more than one child with a given target method. in other
333
333
  words: x.children.grep{|y|y.target==m}.size &lt;= 1 for all method infos m
334
334
  and call infos x</p>
335
335
 
@@ -146,7 +146,7 @@
146
146
 
147
147
  <p>Prints out the call graph based on <a href="CallInfo.html">CallInfo</a>
148
148
  instances. This is mainly for debugging purposes as it provides access
149
- into into RubyProfs internals.</p>
149
+ into into RubyProf&#39;s internals.</p>
150
150
 
151
151
  </div><!-- description -->
152
152
 
@@ -280,7 +280,7 @@
280
280
  <div class="method-source-code" id="arguments-source">
281
281
  <pre><span class="ruby-comment"># File lib/ruby-prof/printers/call_stack_printer.rb, line 166</span>
282
282
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">arguments</span>
283
- <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">' '</span>)
283
+ <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39; &#39;</span>)
284
284
  <span class="ruby-keyword">end</span></pre>
285
285
  </div><!-- arguments-source -->
286
286
 
@@ -351,7 +351,7 @@
351
351
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">copy_image_files</span>
352
352
  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">File</span>)
353
353
  <span class="ruby-identifier">target_dir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">path</span>)
354
- <span class="ruby-identifier">image_dir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword">__FILE__</span>), <span class="ruby-string">'..'</span>, <span class="ruby-string">'images'</span>)
354
+ <span class="ruby-identifier">image_dir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword">__FILE__</span>), <span class="ruby-string">&#39;..&#39;</span>, <span class="ruby-string">&#39;images&#39;</span>)
355
355
  <span class="ruby-node">%w(empty plus minus)</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">img</span><span class="ruby-operator">|</span>
356
356
  <span class="ruby-identifier">source_file</span> = <span class="ruby-node">&quot;#{image_dir}/#{img}.png&quot;</span>
357
357
  <span class="ruby-identifier">target_file</span> = <span class="ruby-node">&quot;#{target_dir}/#{img}.png&quot;</span>
@@ -449,7 +449,7 @@
449
449
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">graph_link</span>(<span class="ruby-identifier">call_info</span>)
450
450
  <span class="ruby-identifier">total_calls</span> = <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">target</span>.<span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>){<span class="ruby-operator">|</span><span class="ruby-identifier">t</span>, <span class="ruby-identifier">ci</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">ci</span>.<span class="ruby-identifier">called</span>}
451
451
  <span class="ruby-identifier">href</span> = <span class="ruby-node">&quot;#{@graph_html}##{method_href(call_info.target)}&quot;</span>
452
- <span class="ruby-identifier">totals</span> = <span class="ruby-ivar">@graph_html</span> <span class="ruby-operator">?</span> <span class="ruby-node">&quot;&lt;a href='#{href}'&gt;#{total_calls}&lt;/a&gt;&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">total_calls</span>.<span class="ruby-identifier">to_s</span>
452
+ <span class="ruby-identifier">totals</span> = <span class="ruby-ivar">@graph_html</span> <span class="ruby-operator">?</span> <span class="ruby-node">&quot;&lt;a href=&#39;#{href}&#39;&gt;#{total_calls}&lt;/a&gt;&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">total_calls</span>.<span class="ruby-identifier">to_s</span>
453
453
  <span class="ruby-node">&quot;[#{call_info.called} calls, #{totals} total]&quot;</span>
454
454
  <span class="ruby-keyword">end</span></pre>
455
455
  </div><!-- graph_link-source -->
@@ -584,7 +584,7 @@
584
584
  for it to be printed out in the report.
585
585
  Default value is 0.
586
586
 
587
- :print_file - True or false. Specifies if a method's source
587
+ :print_file - True or false. Specifies if a method&#39;s source
588
588
  file should be printed. Default value if false.
589
589
 
590
590
  :threshold - a float from 0 to 100 that sets the threshold of
@@ -838,7 +838,7 @@ input { margin-left:10px; }
838
838
  <div class="method-source-code" id="print_footer-source">
839
839
  <pre><span class="ruby-comment"># File lib/ruby-prof/printers/call_stack_printer.rb, line 206</span>
840
840
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">print_footer</span>
841
- <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-string">'&lt;div id=&quot;sentinel&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;'</span>
841
+ <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-string">&#39;&lt;div id=&quot;sentinel&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&#39;</span>
842
842
  <span class="ruby-keyword">end</span></pre>
843
843
  </div><!-- print_footer-source -->
844
844
 
@@ -869,11 +869,11 @@ input { margin-left:10px; }
869
869
  <pre><span class="ruby-comment"># File lib/ruby-prof/printers/call_stack_printer.rb, line 194</span>
870
870
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">print_header</span>
871
871
  <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;&lt;html&gt;&lt;head&gt;&quot;</span>
872
- <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-string">'&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;'</span>
872
+ <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-string">&#39;&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&#39;</span>
873
873
  <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;&lt;title&gt;#{h title}&lt;/title&gt;&quot;</span>
874
874
  <span class="ruby-identifier">print_css</span>
875
875
  <span class="ruby-identifier">print_java_script</span>
876
- <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-string">'&lt;/head&gt;&lt;body&gt;&lt;div style=&quot;display: inline-block;&quot;&gt;'</span>
876
+ <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-string">&#39;&lt;/head&gt;&lt;body&gt;&lt;div style=&quot;display: inline-block;&quot;&gt;&#39;</span>
877
877
  <span class="ruby-identifier">print_title_bar</span>
878
878
  <span class="ruby-identifier">print_commands</span>
879
879
  <span class="ruby-identifier">print_help</span>
@@ -985,7 +985,7 @@ function findUlChild(li){
985
985
 
986
986
  function isLeafNode(li) {
987
987
  var img = li.firstChild;
988
- return (img.src.indexOf('empty.png') &gt; -1);
988
+ return (img.src.indexOf(&#39;empty.png&#39;) &gt; -1);
989
989
  }
990
990
 
991
991
  function hideLI(li) {
@@ -993,11 +993,11 @@ function hideLI(li) {
993
993
  return;
994
994
 
995
995
  var img = li.firstChild;
996
- img.src = 'plus.png';
996
+ img.src = &#39;plus.png&#39;;
997
997
 
998
998
  var ul = findUlChild(li);
999
999
  if (ul) {
1000
- ul.style.display = 'none';
1000
+ ul.style.display = &#39;none&#39;;
1001
1001
  hideUL(ul);
1002
1002
  }
1003
1003
  }
@@ -1007,11 +1007,11 @@ function showLI(li) {
1007
1007
  return;
1008
1008
 
1009
1009
  var img = li.firstChild;
1010
- img.src = 'minus.png';
1010
+ img.src = &#39;minus.png&#39;;
1011
1011
 
1012
1012
  var ul = findUlChild(li);
1013
1013
  if (ul) {
1014
- ul.style.display = 'block';
1014
+ ul.style.display = &#39;block&#39;;
1015
1015
  showUL(ul);
1016
1016
  }
1017
1017
  }
@@ -1028,7 +1028,7 @@ function toggleLI(li) {
1028
1028
 
1029
1029
  function aboveThreshold(text, threshold) {
1030
1030
  var match = text.match(/\d+[.,]\d+/);
1031
- return (match &amp;&amp; parseFloat(match[0].replace(/,/, '.'))&gt;=threshold);
1031
+ return (match &amp;&amp; parseFloat(match[0].replace(/,/, &#39;.&#39;))&gt;=threshold);
1032
1032
  }
1033
1033
 
1034
1034
  function setThresholdLI(li, threshold) {
@@ -1043,16 +1043,16 @@ function setThresholdLI(li, threshold) {
1043
1043
  count = setThresholdUL(ul, threshold);
1044
1044
  }
1045
1045
  if (count&gt;0) {
1046
- img.src = 'minus.png';
1046
+ img.src = &#39;minus.png&#39;;
1047
1047
  }
1048
1048
  else {
1049
- img.src = 'empty.png';
1049
+ img.src = &#39;empty.png&#39;;
1050
1050
  }
1051
1051
  if (visible) {
1052
- li.style.display = 'block'
1052
+ li.style.display = &#39;block&#39;
1053
1053
  }
1054
1054
  else {
1055
- li.style.display = 'none'
1055
+ li.style.display = &#39;none&#39;
1056
1056
  }
1057
1057
  return visible;
1058
1058
  }
@@ -1068,10 +1068,10 @@ function setThresholdUL(node, threshold) {
1068
1068
 
1069
1069
  var visible = (count &gt; 0) ? 1 : 0;
1070
1070
  if (visible) {
1071
- node.style.display = 'block';
1071
+ node.style.display = &#39;block&#39;;
1072
1072
  }
1073
1073
  else {
1074
- node.style.display = 'none';
1074
+ node.style.display = &#39;none&#39;;
1075
1075
  }
1076
1076
  return visible;
1077
1077
  }
@@ -1079,24 +1079,24 @@ function setThresholdUL(node, threshold) {
1079
1079
  function toggleChildren(img, event) {
1080
1080
  event.cancelBubble=true;
1081
1081
 
1082
- if (img.src.indexOf('empty.png') &gt; -1)
1082
+ if (img.src.indexOf(&#39;empty.png&#39;) &gt; -1)
1083
1083
  return;
1084
1084
 
1085
- var minus = (img.src.indexOf('minus.png') &gt; -1);
1085
+ var minus = (img.src.indexOf(&#39;minus.png&#39;) &gt; -1);
1086
1086
 
1087
1087
  if (minus) {
1088
- img.src = 'plus.png';
1088
+ img.src = &#39;plus.png&#39;;
1089
1089
  }
1090
1090
  else
1091
- img.src = 'minus.png';
1091
+ img.src = &#39;minus.png&#39;;
1092
1092
 
1093
1093
  var li = img.parentNode;
1094
1094
  var ul = findUlChild(li);
1095
1095
  if (ul) {
1096
1096
  if (minus)
1097
- ul.style.display = 'none';
1097
+ ul.style.display = &#39;none&#39;;
1098
1098
  else
1099
- ul.style.display = 'block';
1099
+ ul.style.display = &#39;block&#39;;
1100
1100
  }
1101
1101
  if (minus)
1102
1102
  moveSelectionIfNecessary(li);
@@ -1104,27 +1104,27 @@ function toggleChildren(img, event) {
1104
1104
 
1105
1105
  function showChildren(li) {
1106
1106
  var img = li.firstChild;
1107
- if (img.src.indexOf('empty.png') &gt; -1)
1107
+ if (img.src.indexOf(&#39;empty.png&#39;) &gt; -1)
1108
1108
  return;
1109
- img.src = 'minus.png';
1109
+ img.src = &#39;minus.png&#39;;
1110
1110
 
1111
1111
  var ul = findUlChild(li);
1112
1112
  if (ul) {
1113
- ul.style.display = 'block';
1113
+ ul.style.display = &#39;block&#39;;
1114
1114
  }
1115
1115
  }
1116
1116
 
1117
1117
  function setThreshold() {
1118
1118
  var tv = document.getElementById(&quot;threshold&quot;).value;
1119
1119
  if (tv.match(/[0-9]+([.,][0-9]+)?/)) {
1120
- var f = parseFloat(tv.replace(/,/, '.'));
1120
+ var f = parseFloat(tv.replace(/,/, &#39;.&#39;));
1121
1121
  var threads = document.getElementsByName(&quot;thread&quot;);
1122
1122
  var l = threads.length;
1123
1123
  for ( var i = 0; i &lt; l ; i++ ) {
1124
1124
  setThresholdUL(threads[i], f);
1125
1125
  }
1126
1126
  var p = selectedNode;
1127
- while (p &amp;&amp; p.style.display=='none')
1127
+ while (p &amp;&amp; p.style.display==&#39;none&#39;)
1128
1128
  p=p.parentNode.parentNode;
1129
1129
  if (p &amp;&amp; p.nodeName==&quot;LI&quot;)
1130
1130
  selectNode(p);
@@ -1157,11 +1157,11 @@ function toggleHelp(node) {
1157
1157
  var help = document.getElementById(&quot;help&quot;);
1158
1158
  if (node.value == &quot;Show Help&quot;) {
1159
1159
  node.value = &quot;Hide Help&quot;;
1160
- help.style.display = 'block';
1160
+ help.style.display = &#39;block&#39;;
1161
1161
  }
1162
1162
  else {
1163
1163
  node.value = &quot;Show Help&quot;;
1164
- help.style.display = 'none';
1164
+ help.style.display = &#39;none&#39;;
1165
1165
  }
1166
1166
  }
1167
1167
 
@@ -1198,7 +1198,7 @@ function selectNode(node, event) {
1198
1198
 
1199
1199
  function moveUp(){
1200
1200
  var p = selectedNode.previousSibling;
1201
- while (p &amp;&amp; p.style.display == 'none')
1201
+ while (p &amp;&amp; p.style.display == &#39;none&#39;)
1202
1202
  p = p.previousSibling;
1203
1203
  if (p &amp;&amp; p.nodeName == &quot;LI&quot;) {
1204
1204
  selectNode(p, null);
@@ -1207,7 +1207,7 @@ function moveUp(){
1207
1207
 
1208
1208
  function moveDown(){
1209
1209
  var p = selectedNode.nextSibling;
1210
- while (p &amp;&amp; p.style.display == 'none')
1210
+ while (p &amp;&amp; p.style.display == &#39;none&#39;)
1211
1211
  p = p.nextSibling;
1212
1212
  if (p &amp;&amp; p.nodeName == &quot;LI&quot;) {
1213
1213
  selectNode(p, null);
@@ -1234,7 +1234,7 @@ function moveRight(){
1234
1234
  function moveForward(){
1235
1235
  if (isLeafNode(selectedNode)) {
1236
1236
  var p = selectedNode;
1237
- while ((p.nextSibling == null || p.nextSibling.style.display=='none') &amp;&amp; p.nodeName==&quot;LI&quot;) {
1237
+ while ((p.nextSibling == null || p.nextSibling.style.display==&#39;none&#39;) &amp;&amp; p.nodeName==&quot;LI&quot;) {
1238
1238
  p = p.parentNode.parentNode;
1239
1239
  }
1240
1240
  if (p.nodeName==&quot;LI&quot;)
@@ -1247,20 +1247,20 @@ function moveForward(){
1247
1247
 
1248
1248
  function isExpandedNode(li){
1249
1249
  var img = li.firstChild;
1250
- return(img.src.indexOf('minus.png')&gt;-1);
1250
+ return(img.src.indexOf(&#39;minus.png&#39;)&gt;-1);
1251
1251
  }
1252
1252
 
1253
1253
  function moveBackward(){
1254
1254
  var p = selectedNode;
1255
1255
  var q = p.previousSibling;
1256
- while (q != null &amp;&amp; q.style.display=='none')
1256
+ while (q != null &amp;&amp; q.style.display==&#39;none&#39;)
1257
1257
  q = q.previousSibling;
1258
1258
  if (q == null) {
1259
1259
  p = p.parentNode.parentNode;
1260
1260
  } else {
1261
1261
  while (!isLeafNode(q) &amp;&amp; isExpandedNode(q)) {
1262
1262
  q = findUlChild(q).lastChild;
1263
- while (q.style.display=='none')
1263
+ while (q.style.display==&#39;none&#39;)
1264
1264
  q = q.previousSibling;
1265
1265
  }
1266
1266
  p = q;
@@ -1412,7 +1412,7 @@ window.onload=function(){
1412
1412
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">expanded</span>
1413
1413
  <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">print</span> <span class="ruby-string">&quot;&lt;ul&gt;&quot;</span>
1414
1414
  <span class="ruby-keyword">else</span>
1415
- <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">print</span> <span class="ruby-string">'&lt;ul style=&quot;display:none&quot;&gt;'</span>
1415
+ <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">print</span> <span class="ruby-string">&#39;&lt;ul style=&quot;display:none&quot;&gt;&#39;</span>
1416
1416
  <span class="ruby-keyword">end</span>
1417
1417
  <span class="ruby-identifier">kids</span>.<span class="ruby-identifier">sort_by</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-operator">-</span><span class="ruby-identifier">c</span>.<span class="ruby-identifier">total_time</span>}.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">callinfo</span><span class="ruby-operator">|</span>
1418
1418
  <span class="ruby-identifier">print_stack</span> <span class="ruby-identifier">callinfo</span>, <span class="ruby-identifier">total_time</span>