ruby-prof 0.15.7 → 0.15.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +5 -0
  3. data/doc/created.rid +4 -4
  4. data/doc/js/search_index.js.gz +0 -0
  5. data/examples/graph.dot +53 -75
  6. data/examples/multi.flat.txt +21 -21
  7. data/examples/multi.graph.html +693 -839
  8. data/examples/multi.grind.dat +93 -173
  9. data/examples/multi.stack.html +411 -437
  10. data/examples/stack.html +411 -437
  11. data/lib/ruby-prof/assets/call_stack_printer.css.html +117 -0
  12. data/lib/ruby-prof/assets/call_stack_printer.js.html +385 -0
  13. data/lib/ruby-prof/assets/call_stack_printer.png +0 -0
  14. data/lib/ruby-prof/printers/flat_printer.rb +1 -1
  15. data/lib/ruby-prof/printers/graph_html_printer.rb +43 -48
  16. data/lib/ruby-prof/version.rb +1 -1
  17. data/ruby-prof.gemspec +1 -1
  18. data/test/measure_memory_test.rb +5 -3
  19. data/test/printers_test.rb +1 -1
  20. metadata +5 -58
  21. data/doc/LICENSE.html +0 -114
  22. data/doc/README_rdoc.html +0 -592
  23. data/doc/Rack.html +0 -95
  24. data/doc/Rack/RubyProf.html +0 -264
  25. data/doc/RubyProf.html +0 -961
  26. data/doc/RubyProf/AbstractPrinter.html +0 -546
  27. data/doc/RubyProf/AggregateCallInfo.html +0 -537
  28. data/doc/RubyProf/CallInfo.html +0 -716
  29. data/doc/RubyProf/CallInfoPrinter.html +0 -120
  30. data/doc/RubyProf/CallInfoVisitor.html +0 -198
  31. data/doc/RubyProf/CallStackPrinter.html +0 -1121
  32. data/doc/RubyProf/CallTreePrinter.html +0 -359
  33. data/doc/RubyProf/Cmd.html +0 -631
  34. data/doc/RubyProf/DotPrinter.html +0 -257
  35. data/doc/RubyProf/FlatPrinter.html +0 -163
  36. data/doc/RubyProf/FlatPrinterWithLineNumbers.html +0 -208
  37. data/doc/RubyProf/GraphHtmlPrinter.html +0 -579
  38. data/doc/RubyProf/GraphPrinter.html +0 -139
  39. data/doc/RubyProf/MethodInfo.html +0 -885
  40. data/doc/RubyProf/MultiPrinter.html +0 -358
  41. data/doc/RubyProf/Profile.html +0 -713
  42. data/doc/RubyProf/ProfileTask.html +0 -490
  43. data/doc/RubyProf/Thread.html +0 -303
  44. data/doc/examples/flat_txt.html +0 -149
  45. data/doc/examples/graph_html.html +0 -850
  46. data/doc/examples/graph_txt.html +0 -274
  47. data/doc/images/add.png +0 -0
  48. data/doc/images/arrow_up.png +0 -0
  49. data/doc/images/brick.png +0 -0
  50. data/doc/images/brick_link.png +0 -0
  51. data/doc/images/bug.png +0 -0
  52. data/doc/images/bullet_black.png +0 -0
  53. data/doc/images/bullet_toggle_minus.png +0 -0
  54. data/doc/images/bullet_toggle_plus.png +0 -0
  55. data/doc/images/date.png +0 -0
  56. data/doc/images/delete.png +0 -0
  57. data/doc/images/find.png +0 -0
  58. data/doc/images/macFFBgHack.png +0 -0
  59. data/doc/images/package.png +0 -0
  60. data/doc/images/page_green.png +0 -0
  61. data/doc/images/page_white_text.png +0 -0
  62. data/doc/images/page_white_width.png +0 -0
  63. data/doc/images/plugin.png +0 -0
  64. data/doc/images/ruby.png +0 -0
  65. data/doc/images/tag_blue.png +0 -0
  66. data/doc/images/tag_green.png +0 -0
  67. data/doc/images/transparent.png +0 -0
  68. data/doc/images/wrench.png +0 -0
  69. data/doc/images/wrench_orange.png +0 -0
  70. data/doc/images/zoom.png +0 -0
  71. data/doc/index.html +0 -618
  72. data/doc/table_of_contents.html +0 -934
  73. data/examples/empty.png +0 -0
  74. data/examples/graph.png +0 -0
  75. data/examples/minus.png +0 -0
  76. data/examples/plus.png +0 -0
@@ -1,194 +1,114 @@
1
1
  events: wall_time
2
2
 
3
- fl=/Users/skaes/src/ruby-prof/test/prime.rb
4
- fn=Object#make_random_array
5
- 7 7
6
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
7
- cfn=Array#each_index
8
- calls=1 9
9
- 9 7463
10
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
11
- cfn=Class#new
12
- calls=1 8
13
- 8 54
14
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
15
- cfn=Array#each_index
16
- calls=1 9
17
- 9 7256
18
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
19
- cfn=Class#new
20
- calls=1 8
21
- 8 52
22
-
23
- fl=/Users/skaes/src/ruby-prof/ruby_runtime
24
- fn=Fixnum#%
25
- 0 199945
26
-
27
- fl=/Users/skaes/src/ruby-prof/ruby_runtime
28
- fn=Class#new
29
- 0 6
30
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
31
- cfn=<Class::Array>#allocate
32
- calls=1 8
33
- 8 1
34
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
35
- cfn=Array#initialize
36
- calls=1 8
37
- 8 48
38
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
39
- cfn=<Class::Array>#allocate
40
- calls=1 8
41
- 8 1
42
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
43
- cfn=Array#initialize
44
- calls=1 8
45
- 8 50
46
-
47
- fl=/Users/skaes/src/ruby-prof/ruby_runtime
48
- fn=Kernel#rand
49
- 0 3238
50
-
51
- fl=/Users/skaes/src/ruby-prof/ruby_runtime
52
- fn=Fixnum#-
53
- 0 2361
54
-
55
- fl=/Users/skaes/src/ruby-prof/test/printers_test.rb
56
- fn=PrintersTest#setup
57
- 16 5
58
- cfl=/Users/skaes/src/ruby-prof/test/prime.rb
59
- cfn=Object#run_primes
60
- calls=1 16
61
- 16 702856
62
- cfl=/Users/skaes/src/ruby-prof/test/printers_test.rb
63
- cfn=PrintersTest#go
64
- calls=1 17
65
- 17 709509
66
-
67
- fl=/Users/skaes/src/ruby-prof/ruby_runtime
68
- fn=Array#initialize
69
- 0 98
3
+ fl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
4
+ fn=Array#first
5
+ 0 1
6
+
7
+ fl=/Users/stefan.kaes/src/ruby-prof/test/prime.rb
8
+ fn=Object#find_largest
9
+ 31 3
10
+ cfl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
11
+ cfn=Array#first
12
+ calls=1 32
13
+ 32 1
14
+ cfl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
15
+ cfn=Integer#upto
16
+ calls=1 36
17
+ 36 11
70
18
 
71
- fl=/Users/skaes/src/ruby-prof/ruby_runtime
72
- fn=Array#each_index
73
- 0 8789
74
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
75
- cfn=Array#[]=
76
- calls=10000 10
77
- 10 1364
78
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
79
- cfn=Kernel#rand
80
- calls=10000 10
81
- 10 1602
82
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
83
- cfn=Array#[]=
84
- calls=10000 10
85
- 10 1328
86
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
87
- cfn=Kernel#rand
88
- calls=10000 10
89
- 10 1636
19
+ fl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
20
+ fn=Integer#upto
21
+ 0 2582
90
22
 
91
- fl=/Users/skaes/src/ruby-prof/test/prime.rb
23
+ fl=/Users/stefan.kaes/src/ruby-prof/test/prime.rb
92
24
  fn=Object#is_prime
93
- 16 13805
94
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
95
- cfn=Integer#upto
96
- calls=10000 18
97
- 18 683251
98
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
99
- cfn=Fixnum#-
100
- calls=10000 18
101
- 18 1157
102
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
25
+ 16 92
26
+ cfl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
103
27
  cfn=Integer#upto
104
- calls=10000 18
105
- 18 689970
106
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
107
- cfn=Fixnum#-
108
- calls=10000 18
109
- 18 1204
28
+ calls=200 18
29
+ 18 2571
110
30
 
111
- fl=/Users/skaes/src/ruby-prof/test/printers_test.rb
112
- fn=PrintersTest#go
113
- 9 5
114
- cfl=/Users/skaes/src/ruby-prof/test/prime.rb
115
- cfn=Object#run_primes
116
- calls=1 10
117
- 10 709504
31
+ fl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
32
+ fn=Array#select
33
+ 0 84
34
+ cfl=/Users/stefan.kaes/src/ruby-prof/test/prime.rb
35
+ cfn=Object#is_prime
36
+ calls=200 26
37
+ 26 2663
118
38
 
119
- fl=/Users/skaes/src/ruby-prof/test/prime.rb
39
+ fl=/Users/stefan.kaes/src/ruby-prof/test/prime.rb
120
40
  fn=Object#find_primes
121
- 24 3
122
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
123
- cfn=Array#select
124
- calls=1 25
125
- 25 695331
126
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
41
+ 24 2
42
+ cfl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
127
43
  cfn=Array#select
128
44
  calls=1 25
129
- 25 702187
45
+ 25 2747
130
46
 
131
- fl=/Users/skaes/src/ruby-prof/ruby_runtime
132
- fn=Array#select
133
- 0 8131
134
- cfl=/Users/skaes/src/ruby-prof/test/prime.rb
135
- cfn=Object#is_prime
136
- calls=10000 26
137
- 26 691245
138
- cfl=/Users/skaes/src/ruby-prof/test/prime.rb
139
- cfn=Object#is_prime
140
- calls=10000 26
141
- 26 698142
47
+ fl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
48
+ fn=Kernel#respond_to_missing?
49
+ 0 30
142
50
 
143
- fl=/Users/skaes/src/ruby-prof/ruby_runtime
144
- fn=Integer#upto
145
- 0 1004845
146
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
147
- cfn=Fixnum#==
148
- calls=766408 19
149
- 19 83149
150
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
151
- cfn=Fixnum#%
152
- calls=766408 19
153
- 19 99302
154
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
155
- cfn=Fixnum#==
156
- calls=778318 19
157
- 19 85282
158
- cfl=/Users/skaes/src/ruby-prof/ruby_runtime
159
- cfn=Fixnum#%
160
- calls=778318 19
161
- 19 100643
51
+ fl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
52
+ fn=Kernel#rand
53
+ 0 87
54
+ cfl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
55
+ cfn=Kernel#respond_to_missing?
56
+ calls=200 10
57
+ 10 30
58
+
59
+ fl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
60
+ fn=Array#each_index
61
+ 0 70
62
+ cfl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
63
+ cfn=Kernel#rand
64
+ calls=200 10
65
+ 10 118
162
66
 
163
- fl=/Users/skaes/src/ruby-prof/ruby_runtime
164
- fn=<Class::Array>#allocate
67
+ fl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
68
+ fn=Array#initialize
165
69
  0 2
166
70
 
167
- fl=/Users/skaes/src/ruby-prof/ruby_runtime
168
- fn=Fixnum#==
169
- 0 168431
71
+ fl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
72
+ fn=Class#new
73
+ 0 4
74
+ cfl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
75
+ cfn=Array#initialize
76
+ calls=1 8
77
+ 8 2
170
78
 
171
- fl=/Users/skaes/src/ruby-prof/test/prime.rb
79
+ fl=/Users/stefan.kaes/src/ruby-prof/test/prime.rb
80
+ fn=Object#make_random_array
81
+ 7 3
82
+ cfl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
83
+ cfn=Class#new
84
+ calls=1 8
85
+ 8 6
86
+ cfl=/Users/stefan.kaes/src/ruby-prof/ruby_runtime
87
+ cfn=Array#each_index
88
+ calls=1 9
89
+ 9 188
90
+
91
+ fl=/Users/stefan.kaes/src/ruby-prof/test/prime.rb
172
92
  fn=Object#run_primes
173
- 46 7
174
- cfl=/Users/skaes/src/ruby-prof/test/prime.rb
175
- cfn=Object#find_primes
176
- calls=1 51
177
- 51 695333
178
- cfl=/Users/skaes/src/ruby-prof/test/prime.rb
93
+ 45 2
94
+ cfl=/Users/stefan.kaes/src/ruby-prof/test/prime.rb
179
95
  cfn=Object#make_random_array
180
- calls=1 48
181
- 48 7519
182
- cfl=/Users/skaes/src/ruby-prof/test/prime.rb
96
+ calls=1 47
97
+ 47 197
98
+ cfl=/Users/stefan.kaes/src/ruby-prof/test/prime.rb
183
99
  cfn=Object#find_primes
184
- calls=1 51
185
- 51 702188
186
- cfl=/Users/skaes/src/ruby-prof/test/prime.rb
187
- cfn=Object#make_random_array
188
- calls=1 48
189
- 48 7313
190
-
191
- fl=/Users/skaes/src/ruby-prof/ruby_runtime
192
- fn=Array#[]=
193
- 0 2692
100
+ calls=1 50
101
+ 50 2749
102
+ cfl=/Users/stefan.kaes/src/ruby-prof/test/prime.rb
103
+ cfn=Object#find_largest
104
+ calls=1 53
105
+ 53 15
106
+
107
+ fl=/Users/stefan.kaes/src/ruby-prof/test/printers_test.rb
108
+ fn=PrintersTest#setup
109
+ 14 5
110
+ cfl=/Users/stefan.kaes/src/ruby-prof/test/prime.rb
111
+ cfn=Object#run_primes
112
+ calls=1 14
113
+ 14 2963
194
114
 
@@ -3,30 +3,30 @@
3
3
  <title>ruby-prof call tree</title>
4
4
  <style type="text/css">
5
5
  <!--
6
- body {
6
+ body {
7
7
  font-size:70%;
8
- padding:0px;
8
+ padding:0;
9
9
  margin:5px;
10
10
  margin-right:0px;
11
11
  margin-left:0px;
12
12
  background: #ffffff;
13
- }
14
- ul {
13
+ }
14
+ ul {
15
15
  margin-left:0px;
16
16
  margin-top:0px;
17
17
  margin-bottom:0px;
18
18
  padding-left:0px;
19
19
  list-style-type:none;
20
- }
21
- li {
20
+ }
21
+ li {
22
22
  margin-left:11px;
23
23
  padding:0px;
24
24
  white-space:nowrap;
25
25
  border-top:1px solid #cccccc;
26
26
  border-left:1px solid #cccccc;
27
27
  border-bottom:none;
28
- }
29
- .thread {
28
+ }
29
+ .thread {
30
30
  margin-left:11px;
31
31
  background:#708090;
32
32
  padding-top:3px;
@@ -35,28 +35,28 @@ li {
35
35
  border-left:1px solid #CCCCCC;
36
36
  border-top:1px solid #CCCCCC;
37
37
  font-weight:bold;
38
- }
39
- .hidden {
38
+ }
39
+ .hidden {
40
40
  display:none;
41
41
  width:0px;
42
42
  height:0px;
43
43
  margin:0px;
44
44
  padding:0px;
45
45
  border-style:none;
46
- }
47
- .color01 { background:#adbdeb }
48
- .color05 { background:#9daddb }
49
- .color0 { background:#8d9dcb }
50
- .color1 { background:#89bccb }
51
- .color2 { background:#56e3e7 }
52
- .color3 { background:#32cd70 }
53
- .color4 { background:#a3d53c }
54
- .color5 { background:#c4cb34 }
55
- .color6 { background:#dcb66d }
56
- .color7 { background:#cda59e }
57
- .color8 { background:#be9d9c }
58
- .color9 { background:#cf947a }
59
- #commands {
46
+ }
47
+ .color01 { background:#adbdeb }
48
+ .color05 { background:#9daddb }
49
+ .color0 { background:#8d9dcb }
50
+ .color1 { background:#89bccb }
51
+ .color2 { background:#56e3e7 }
52
+ .color3 { background:#32cd70 }
53
+ .color4 { background:#a3d53c }
54
+ .color5 { background:#c4cb34 }
55
+ .color6 { background:#dcb66d }
56
+ .color7 { background:#cda59e }
57
+ .color8 { background:#be9d9c }
58
+ .color9 { background:#cf947a }
59
+ #commands {
60
60
  font-size:10pt;
61
61
  padding:10px;
62
62
  margin-left:11px;
@@ -66,8 +66,8 @@ li {
66
66
  border-top:1px solid #cccccc;
67
67
  border-left:1px solid #cccccc;
68
68
  border-bottom:none;
69
- }
70
- #titlebar {
69
+ }
70
+ #titlebar {
71
71
  font-size:10pt;
72
72
  padding:10px;
73
73
  margin-left:11px;
@@ -77,8 +77,8 @@ li {
77
77
  border-top:1px solid #cccccc;
78
78
  border-left:1px solid #cccccc;
79
79
  border-bottom:none;
80
- }
81
- #help {
80
+ }
81
+ #help {
82
82
  font-size:10pt;
83
83
  padding:10px;
84
84
  margin-left:11px;
@@ -89,433 +89,424 @@ li {
89
89
  border-top:1px solid #cccccc;
90
90
  border-left:1px solid #cccccc;
91
91
  border-bottom:none;
92
- }
93
- #sentinel {
92
+ }
93
+ #sentinel {
94
94
  height: 400px;
95
95
  margin-left:11px;
96
96
  background:#8090a0;
97
97
  border-top:1px solid #cccccc;
98
98
  border-left:1px solid #cccccc;
99
99
  border-bottom:none;
100
- }
101
- input { margin-left:10px; }
100
+ }
101
+ input { margin-left:10px; }
102
+
103
+ .toggle {
104
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAJCAMAAAD0FKf3AAAAA3NCSVQICAjb4U/gAAAAb1BMVEX///98jcR8jMV4jMB7jcR7jcR8jcT////7/f/3/P/0+vzx+v7s9vzq9Pzm8Prk7vzi7fnj5/Pc5vTb5vbg5PHW4fHV3/XS3fLM1+3K1e/G0e3EzuzCzey8x+m8xuystuSqtt98jsR8jcR7jcQAAADWswcWAAAAJXRSTlMAVVVV3e7u////////////////////////////////////////Vv4VOQAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAACVSURBVAiZPc/hDoIwDATgobCWgZsWgSGidOz9n9F1CPfrki+5tIqPXHSQVMVZFH8/sx/Is16X9zR2vtQPAMC6LxVnco5Dpvtt40QRGrspnueBqDUcdmrEMILtknkiQkQOU5RAsn9RPGRKNkLOxiibIEauNSYZy2CNyerGRngtsilkiLXP9Cx1bzuAZU13Himq/a3rWX4VVRPEuDWiLQAAAABJRU5ErkJggg==) no-repeat left center;
105
+ float:left;
106
+ width:9px;
107
+ height:9px;
108
+ margin:2px 1px 1px 1px;
109
+ }
110
+
111
+ .toggle.minus {
112
+ background-position: -9px 0;
113
+ }
114
+
115
+ .toggle.plus {
116
+ background-position: -18px 0;
117
+ }
118
+
102
119
  -->
103
120
  </style>
104
121
  <script type="text/javascript">
105
- /*
122
+ /*
106
123
  Copyright (C) 2005,2009 Stefan Kaes
107
124
  skaes@railsexpress.de
108
- */
125
+ */
109
126
 
110
- function rootNode() {
111
- return currentThread;
112
- }
127
+ function rootNode() {
128
+ return currentThread;
129
+ }
113
130
 
114
- function hideUL(node) {
115
- var lis = node.childNodes
116
- var l = lis.length;
117
- for (var i=0; i < l ; i++ ) {
118
- hideLI(lis[i]);
131
+ function showUL(node, show) {
132
+ var lis = node.childNodes;
133
+ var l = lis.length;
134
+ for (var i=0; i < l ; i++ ) {
135
+ toggle(lis[i], show);
136
+ }
119
137
  }
120
- }
121
138
 
122
- function showUL(node) {
123
- var lis = node.childNodes;
124
- var l = lis.length;
125
- for (var i=0; i < l ; i++ ) {
126
- showLI(lis[i]);
139
+ function findUlChild(li){
140
+ var ul = li.childNodes[2];
141
+ while (ul && ul.nodeName != "UL") {
142
+ ul = ul.nextSibling;
143
+ }
144
+ return ul;
127
145
  }
128
- }
129
146
 
130
- function findUlChild(li){
131
- var ul = li.childNodes[2];
132
- while (ul && ul.nodeName != "UL") {
133
- ul = ul.nextSibling;
147
+ function isLeafNode(li) {
148
+ var img = li.firstChild;
149
+ return (img.className.indexOf('empty') > -1);
134
150
  }
135
- return ul;
136
- }
137
151
 
138
- function isLeafNode(li) {
139
- var img = li.firstChild;
140
- return (img.src.indexOf('empty.png') > -1);
141
- }
152
+ function toggle(li, show) {
153
+ if (isLeafNode(li))
154
+ return;
142
155
 
143
- function hideLI(li) {
144
- if (isLeafNode(li))
145
- return;
156
+ var img = li.firstChild;
157
+ img.className = 'toggle ';
158
+ img.className += show ? 'minus' : 'plus';
146
159
 
147
- var img = li.firstChild;
148
- img.src = 'plus.png';
160
+ var ul = findUlChild(li);
161
+ if (ul) {
162
+ ul.style.display = show ? 'block' : 'none';
163
+ showUL(ul, true);
164
+ }
165
+ }
166
+
167
+ function toggleLI(li) {
168
+ var img = li.firstChild;
169
+ if (img.className.indexOf("minus")>-1)
170
+ toggle(li, false);
171
+ else {
172
+ if (img.className.indexOf("plus")>-1)
173
+ toggle(li, true);
174
+ }
175
+ }
149
176
 
150
- var ul = findUlChild(li);
151
- if (ul) {
152
- ul.style.display = 'none';
153
- hideUL(ul);
177
+ function aboveThreshold(text, threshold) {
178
+ var match = text.match(/\d+[.,]\d+/);
179
+ return (match && parseFloat(match[0].replace(/,/, '.'))>=threshold);
154
180
  }
155
- }
156
181
 
157
- function showLI(li) {
158
- if (isLeafNode(li))
159
- return;
182
+ function setThresholdLI(li, threshold) {
183
+ var img = li.firstChild;
184
+ var text = img.nextSibling;
185
+ var ul = findUlChild(li);
160
186
 
161
- var img = li.firstChild;
162
- img.src = 'minus.png';
187
+ var visible = aboveThreshold(text.nodeValue, threshold) ? 1 : 0;
163
188
 
164
- var ul = findUlChild(li);
165
- if (ul) {
166
- ul.style.display = 'block';
167
- showUL(ul);
189
+ var count = 0;
190
+ if (ul) {
191
+ count = setThresholdUL(ul, threshold);
192
+ }
193
+ if (count>0) {
194
+ img.className = 'toggle minus';
195
+ }
196
+ else {
197
+ img.className = 'toggle empty';
198
+ }
199
+ if (visible) {
200
+ li.style.display = 'block'
201
+ }
202
+ else {
203
+ li.style.display = 'none'
204
+ }
205
+ return visible;
168
206
  }
169
- }
170
207
 
171
- function toggleLI(li) {
172
- var img = li.firstChild;
173
- if (img.src.indexOf("minus.png")>-1)
174
- hideLI(li);
175
- else {
176
- if (img.src.indexOf("plus.png")>-1)
177
- showLI(li);
208
+ function setThresholdUL(node, threshold) {
209
+ var lis = node.childNodes;
210
+ var l = lis.length;
211
+
212
+ var count = 0;
213
+ for ( var i = 0; i < l ; i++ ) {
214
+ count = count + setThresholdLI(lis[i], threshold);
215
+ }
216
+
217
+ var visible = (count > 0) ? 1 : 0;
218
+ if (visible) {
219
+ node.style.display = 'block';
220
+ }
221
+ else {
222
+ node.style.display = 'none';
223
+ }
224
+ return visible;
178
225
  }
179
- }
180
226
 
181
- function aboveThreshold(text, threshold) {
182
- var match = text.match(/\d+[.,]\d+/);
183
- return (match && parseFloat(match[0].replace(/,/, '.'))>=threshold);
184
- }
227
+ function toggleChildren(img, event) {
228
+ event.cancelBubble=true;
229
+ if (img.className.indexOf('empty') > -1)
230
+ return;
185
231
 
186
- function setThresholdLI(li, threshold) {
187
- var img = li.firstChild;
188
- var text = img.nextSibling;
189
- var ul = findUlChild(li);
232
+ var minus = (img.className.indexOf('minus') > -1);
190
233
 
191
- var visible = aboveThreshold(text.nodeValue, threshold) ? 1 : 0;
234
+ if (minus) {
235
+ img.className = 'toggle plus';
236
+ }
237
+ else
238
+ img.className = 'toggle minus';
192
239
 
193
- var count = 0;
194
- if (ul) {
195
- count = setThresholdUL(ul, threshold);
240
+ var li = img.parentNode;
241
+ var ul = findUlChild(li);
242
+ if (ul) {
243
+ if (minus)
244
+ ul.style.display = 'none';
245
+ else
246
+ ul.style.display = 'block';
247
+ }
248
+ if (minus)
249
+ moveSelectionIfNecessary(li);
250
+ }
251
+
252
+ function showChildren(li) {
253
+ var img = li.firstChild;
254
+ if (img.className.indexOf('empty') > -1)
255
+ return;
256
+ img.className = 'toggle minus';
257
+
258
+ var ul = findUlChild(li);
259
+ if (ul) {
260
+ ul.style.display = 'block';
261
+ }
262
+ }
263
+
264
+ function setThreshold() {
265
+ var tv = document.getElementById("threshold").value;
266
+ if (tv.match(/[0-9]+([.,][0-9]+)?/)) {
267
+ var f = parseFloat(tv.replace(/,/, '.'));
268
+ var threads = document.getElementsByName("thread");
269
+ var l = threads.length;
270
+ for ( var i = 0; i < l ; i++ ) {
271
+ setThresholdUL(threads[i], f);
272
+ }
273
+ var p = selectedNode;
274
+ while (p && p.style.display=='none')
275
+ p=p.parentNode.parentNode;
276
+ if (p && p.nodeName=="LI")
277
+ selectNode(p);
278
+ }
279
+ else {
280
+ alert("Please specify a decimal number as threshold value!");
281
+ }
196
282
  }
197
- if (count>0) {
198
- img.src = 'minus.png';
283
+
284
+ function expandAll(event) {
285
+ toggleAll(event, true);
199
286
  }
200
- else {
201
- img.src = 'empty.png';
287
+
288
+ function collapseAll(event) {
289
+ toggleAll(event, false);
290
+ selectNode(rootNode(), null);
202
291
  }
203
- if (visible) {
204
- li.style.display = 'block'
292
+
293
+ function toggleAll(event, show) {
294
+ event.cancelBubble=true;
295
+ var threads = document.getElementsByName("thread");
296
+ var l = threads.length;
297
+ for ( var i = 0; i < l ; i++ ) {
298
+ showUL(threads[i], show);
299
+ }
205
300
  }
206
- else {
207
- li.style.display = 'none'
301
+
302
+ function toggleHelp(node) {
303
+ var help = document.getElementById("help");
304
+ if (node.value == "Show Help") {
305
+ node.value = "Hide Help";
306
+ help.style.display = 'block';
307
+ }
308
+ else {
309
+ node.value = "Show Help";
310
+ help.style.display = 'none';
311
+ }
208
312
  }
209
- return visible;
210
- }
211
313
 
212
- function setThresholdUL(node, threshold) {
213
- var lis = node.childNodes;
214
- var l = lis.length;
314
+ var selectedNode = null;
315
+ var selectedColor = null;
316
+ var selectedThread = null;
215
317
 
216
- var count = 0;
217
- for ( var i = 0; i < l ; i++ ) {
218
- count = count + setThresholdLI(lis[i], threshold);
318
+ function descendentOf(a,b){
319
+ while (a!=b && b!=null)
320
+ b=b.parentNode;
321
+ return (a==b);
219
322
  }
220
323
 
221
- var visible = (count > 0) ? 1 : 0;
222
- if (visible) {
223
- node.style.display = 'block';
324
+ function moveSelectionIfNecessary(node){
325
+ if (descendentOf(node, selectedNode))
326
+ selectNode(node, null);
224
327
  }
225
- else {
226
- node.style.display = 'none';
328
+
329
+ function selectNode(node, event) {
330
+ if (event) {
331
+ event.cancelBubble = true;
332
+ thread = findThread(node);
333
+ selectThread(thread);
334
+ }
335
+ if (selectedNode) {
336
+ selectedNode.style.background = selectedColor;
337
+ }
338
+ selectedNode = node;
339
+ selectedColor = node.style.background;
340
+ selectedNode.style.background = "red";
341
+ selectedNode.scrollIntoView();
342
+ window.scrollBy(0,-400);
227
343
  }
228
- return visible;
229
- }
230
344
 
231
- function toggleChildren(img, event) {
232
- event.cancelBubble=true;
345
+ function moveUp(){
346
+ move(selectedNode.previousSibling);
347
+ }
233
348
 
234
- if (img.src.indexOf('empty.png') > -1)
235
- return;
349
+ function moveDown(){
350
+ move(selectedNode.nextSibling);
351
+ }
236
352
 
237
- var minus = (img.src.indexOf('minus.png') > -1);
353
+ function move(p) {
354
+ while (p && p.style.display == 'none')
355
+ p = p.nextSibling;
356
+ if (p && p.nodeName == "LI") {
357
+ selectNode(p, null);
358
+ }
359
+ }
238
360
 
239
- if (minus) {
240
- img.src = 'plus.png';
361
+ function moveLeft(){
362
+ var p = selectedNode.parentNode.parentNode;
363
+ if (p && p.nodeName=="LI") {
364
+ selectNode(p, null);
365
+ }
241
366
  }
242
- else
243
- img.src = 'minus.png';
244
367
 
245
- var li = img.parentNode;
246
- var ul = findUlChild(li);
247
- if (ul) {
248
- if (minus)
249
- ul.style.display = 'none';
250
- else
251
- ul.style.display = 'block';
368
+ function moveRight(){
369
+ if (!isLeafNode(selectedNode)) {
370
+ showChildren(selectedNode);
371
+ var ul = findUlChild(selectedNode);
372
+ if (ul) {
373
+ selectNode(ul.firstChild, null);
374
+ }
375
+ }
252
376
  }
253
- if (minus)
254
- moveSelectionIfNecessary(li);
255
- }
256
-
257
- function showChildren(li) {
258
- var img = li.firstChild;
259
- if (img.src.indexOf('empty.png') > -1)
260
- return;
261
- img.src = 'minus.png';
262
-
263
- var ul = findUlChild(li);
264
- if (ul) {
265
- ul.style.display = 'block';
266
- }
267
- }
268
-
269
- function setThreshold() {
270
- var tv = document.getElementById("threshold").value;
271
- if (tv.match(/[0-9]+([.,][0-9]+)?/)) {
272
- var f = parseFloat(tv.replace(/,/, '.'));
273
- var threads = document.getElementsByName("thread");
274
- var l = threads.length;
275
- for ( var i = 0; i < l ; i++ ) {
276
- setThresholdUL(threads[i], f);
277
- }
278
- var p = selectedNode;
279
- while (p && p.style.display=='none')
280
- p=p.parentNode.parentNode;
281
- if (p && p.nodeName=="LI")
282
- selectNode(p);
283
- }
284
- else {
285
- alert("Please specify a decimal number as threshold value!");
286
- }
287
- }
288
-
289
- function collapseAll(event) {
290
- event.cancelBubble=true;
291
- var threads = document.getElementsByName("thread");
292
- var l = threads.length;
293
- for ( var i = 0; i < l ; i++ ) {
294
- hideUL(threads[i]);
295
- }
296
- selectNode(rootNode(), null);
297
- }
298
-
299
- function expandAll(event) {
300
- event.cancelBubble=true;
301
- var threads = document.getElementsByName("thread");
302
- var l = threads.length;
303
- for ( var i = 0; i < l ; i++ ) {
304
- showUL(threads[i]);
305
- }
306
- }
307
-
308
- function toggleHelp(node) {
309
- var help = document.getElementById("help");
310
- if (node.value == "Show Help") {
311
- node.value = "Hide Help";
312
- help.style.display = 'block';
313
- }
314
- else {
315
- node.value = "Show Help";
316
- help.style.display = 'none';
317
- }
318
- }
319
-
320
- var selectedNode = null;
321
- var selectedColor = null;
322
- var selectedThread = null;
323
-
324
- function descendentOf(a,b){
325
- while (a!=b && b!=null)
326
- b=b.parentNode;
327
- return (a==b);
328
- }
329
-
330
- function moveSelectionIfNecessary(node){
331
- if (descendentOf(node, selectedNode))
332
- selectNode(node, null);
333
- }
334
-
335
- function selectNode(node, event) {
336
- if (event) {
337
- event.cancelBubble = true;
338
- thread = findThread(node);
339
- selectThread(thread);
340
- }
341
- if (selectedNode) {
342
- selectedNode.style.background = selectedColor;
343
- }
344
- selectedNode = node;
345
- selectedColor = node.style.background;
346
- selectedNode.style.background = "red";
347
- selectedNode.scrollIntoView();
348
- window.scrollBy(0,-400);
349
- }
350
-
351
- function moveUp(){
352
- var p = selectedNode.previousSibling;
353
- while (p && p.style.display == 'none')
354
- p = p.previousSibling;
355
- if (p && p.nodeName == "LI") {
356
- selectNode(p, null);
357
- }
358
- }
359
-
360
- function moveDown(){
361
- var p = selectedNode.nextSibling;
362
- while (p && p.style.display == 'none')
363
- p = p.nextSibling;
364
- if (p && p.nodeName == "LI") {
365
- selectNode(p, null);
366
- }
367
- }
368
-
369
- function moveLeft(){
370
- var p = selectedNode.parentNode.parentNode;
371
- if (p && p.nodeName=="LI") {
372
- selectNode(p, null);
373
- }
374
- }
375
-
376
- function moveRight(){
377
- if (!isLeafNode(selectedNode)) {
378
- showChildren(selectedNode);
379
- var ul = findUlChild(selectedNode);
380
- if (ul) {
381
- selectNode(ul.firstChild, null);
377
+
378
+ function moveForward(){
379
+ if (isLeafNode(selectedNode)) {
380
+ var p = selectedNode;
381
+ while ((p.nextSibling == null || p.nextSibling.style.display=='none') && p.nodeName=="LI") {
382
+ p = p.parentNode.parentNode;
383
+ }
384
+ if (p.nodeName=="LI")
385
+ selectNode(p.nextSibling, null);
382
386
  }
387
+ else {
388
+ moveRight();
389
+ }
390
+ }
391
+
392
+ function isExpandedNode(li){
393
+ var img = li.firstChild;
394
+ return(img.className.indexOf('minus')>-1);
383
395
  }
384
- }
385
396
 
386
- function moveForward(){
387
- if (isLeafNode(selectedNode)) {
397
+ function moveBackward(){
388
398
  var p = selectedNode;
389
- while ((p.nextSibling == null || p.nextSibling.style.display=='none') && p.nodeName=="LI") {
399
+ var q = p.previousSibling;
400
+ while (q != null && q.style.display=='none')
401
+ q = q.previousSibling;
402
+ if (q == null) {
390
403
  p = p.parentNode.parentNode;
404
+ } else {
405
+ while (!isLeafNode(q) && isExpandedNode(q)) {
406
+ q = findUlChild(q).lastChild;
407
+ while (q.style.display=='none')
408
+ q = q.previousSibling;
409
+ }
410
+ p = q;
391
411
  }
392
412
  if (p.nodeName=="LI")
393
- selectNode(p.nextSibling, null);
394
- }
395
- else {
396
- moveRight();
397
- }
398
- }
399
-
400
- function isExpandedNode(li){
401
- var img = li.firstChild;
402
- return(img.src.indexOf('minus.png')>-1);
403
- }
404
-
405
- function moveBackward(){
406
- var p = selectedNode;
407
- var q = p.previousSibling;
408
- while (q != null && q.style.display=='none')
409
- q = q.previousSibling;
410
- if (q == null) {
411
- p = p.parentNode.parentNode;
412
- } else {
413
- while (!isLeafNode(q) && isExpandedNode(q)) {
414
- q = findUlChild(q).lastChild;
415
- while (q.style.display=='none')
416
- q = q.previousSibling;
417
- }
418
- p = q;
419
- }
420
- if (p.nodeName=="LI")
421
- selectNode(p, null);
422
- }
423
-
424
- function moveHome() {
425
- selectNode(currentThread);
426
- }
427
-
428
- var currentThreadIndex = null;
429
-
430
- function findThread(node){
431
- while (node && node.parentNode.nodeName!="BODY") {
432
- node = node.parentNode;
433
- }
434
- return node.firstChild;
435
- }
436
-
437
- function selectThread(node){
438
- var threads = document.getElementsByName("thread");
439
- currentThread = node;
440
- for (var i=0; i<threads.length; i++) {
441
- if (threads[i]==currentThread.parentNode)
442
- currentThreadIndex = i;
443
- }
444
- }
445
-
446
- function nextThread(){
447
- var threads = document.getElementsByName("thread");
448
- if (currentThreadIndex==threads.length-1)
413
+ selectNode(p, null);
414
+ }
415
+
416
+ function moveHome() {
417
+ selectNode(currentThread);
418
+ }
419
+
420
+ var currentThreadIndex = null;
421
+
422
+ function findThread(node){
423
+ while (node && !node.parentNode.nodeName.match(/BODY|DIV/g)) {
424
+ node = node.parentNode;
425
+ }
426
+ return node.firstChild;
427
+ }
428
+
429
+ function selectThread(node){
430
+ var threads = document.getElementsByName("thread");
431
+ currentThread = node;
432
+ for (var i=0; i<threads.length; i++) {
433
+ if (threads[i]==currentThread.parentNode)
434
+ currentThreadIndex = i;
435
+ }
436
+ }
437
+
438
+ function nextThread(){
439
+ var threads = document.getElementsByName("thread");
440
+ if (currentThreadIndex==threads.length-1)
441
+ currentThreadIndex = 0;
442
+ else
443
+ currentThreadIndex += 1
444
+ currentThread = threads[currentThreadIndex].firstChild;
445
+ selectNode(currentThread, null);
446
+ }
447
+
448
+ function previousThread(){
449
+ var threads = document.getElementsByName("thread");
450
+ if (currentThreadIndex==0)
451
+ currentThreadIndex = threads.length-1;
452
+ else
453
+ currentThreadIndex -= 1
454
+ currentThread = threads[currentThreadIndex].firstChild;
455
+ selectNode(currentThread, null);
456
+ }
457
+
458
+ function switchThread(node, event){
459
+ event.cancelBubble = true;
460
+ selectThread(node.nextSibling.firstChild);
461
+ selectNode(currentThread, null);
462
+ }
463
+
464
+ function handleKeyEvent(event){
465
+ var code = event.charCode ? event.charCode : event.keyCode;
466
+ var str = String.fromCharCode(code);
467
+ switch (str) {
468
+ case "a": moveLeft(); break;
469
+ case "s": moveDown(); break;
470
+ case "d": moveRight(); break;
471
+ case "w": moveUp(); break;
472
+ case "f": moveForward(); break;
473
+ case "b": moveBackward(); break;
474
+ case "x": toggleChildren(selectedNode.firstChild, event); break;
475
+ case "*": toggleLI(selectedNode); break;
476
+ case "n": nextThread(); break;
477
+ case "h": moveHome(); break;
478
+ case "p": previousThread(); break;
479
+ }
480
+ }
481
+ document.onkeypress=function(event){ handleKeyEvent(event) };
482
+
483
+ window.onload=function(){
484
+ var images = document.querySelectorAll(".toggle");
485
+ for (var i=0; i<images.length; i++) {
486
+ var img = images[i];
487
+ img.onclick = function(event){ toggleChildren(this, event); return false; };
488
+ }
489
+ var divs = document.getElementsByTagName("div");
490
+ for (i=0; i<divs.length; i++) {
491
+ var div = divs[i];
492
+ if (div.className == "thread")
493
+ div.onclick = function(event){ switchThread(this, event) };
494
+ }
495
+ var lis = document.getElementsByTagName("li");
496
+ for (var i=0; i<lis.length; i++) {
497
+ lis[i].onclick = function(event){ selectNode(this, event); };
498
+ }
499
+ var threads = document.getElementsByName("thread");;
449
500
  currentThreadIndex = 0;
450
- else
451
- currentThreadIndex += 1
452
- currentThread = threads[currentThreadIndex].firstChild;
453
- selectNode(currentThread, null);
454
- }
455
-
456
- function previousThread(){
457
- var threads = document.getElementsByName("thread");
458
- if (currentThreadIndex==0)
459
- currentThreadIndex = threads.length-1;
460
- else
461
- currentThreadIndex -= 1
462
- currentThread = threads[currentThreadIndex].firstChild;
463
- selectNode(currentThread, null);
464
- }
465
-
466
- function switchThread(node, event){
467
- event.cancelBubble = true;
468
- selectThread(node.nextSibling.firstChild);
469
- selectNode(currentThread, null);
470
- }
471
-
472
- function handleKeyEvent(event){
473
- var code = event.charCode ? event.charCode : event.keyCode;
474
- var str = String.fromCharCode(code);
475
- switch (str) {
476
- case "a": moveLeft(); break;
477
- case "s": moveDown(); break;
478
- case "d": moveRight(); break;
479
- case "w": moveUp(); break;
480
- case "f": moveForward(); break;
481
- case "b": moveBackward(); break;
482
- case "x": toggleChildren(selectedNode.firstChild, event); break;
483
- case "*": toggleLI(selectedNode); break;
484
- case "n": nextThread(); break;
485
- case "h": moveHome(); break;
486
- case "p": previousThread(); break;
487
- }
488
- }
489
- document.onkeypress=function(event){ handleKeyEvent(event) };
490
-
491
- window.onload=function(){
492
- var images = document.getElementsByTagName("img");
493
- for (var i=0; i<images.length; i++) {
494
- var img = images[i];
495
- if (img.className == "toggle") {
496
- img.onclick = function(event){ toggleChildren(this, event); };
497
- }
498
- }
499
- var divs = document.getElementsByTagName("div");
500
- for (i=0; i<divs.length; i++) {
501
- var div = divs[i];
502
- if (div.className == "thread")
503
- div.onclick = function(event){ switchThread(this, event) };
504
- }
505
- var lis = document.getElementsByTagName("li");
506
- for (var i=0; i<lis.length; i++) {
507
- lis[i].onclick = function(event){ selectNode(this, event); };
508
- }
509
- var threads = document.getElementsByName("thread");
510
- currentThreadIndex = 0;
511
- currentThread = threads[0].firstChild;
512
- selectNode(currentThread, null);
513
- }
501
+ currentThread = threads[0].firstChild;
502
+ selectNode(currentThread, null);
503
+ };
504
+
514
505
  </script>
515
- </head><body>
506
+ </head><body><div style="display: inline-block;">
516
507
  <div id="titlebar">
517
508
  Call tree for application <b>primes </b><br/>
518
- Generated on Sat Jul 24 08:05:17 +0200 2010 with options {:application=&gt;&quot;primes&quot;}<br/>
509
+ Generated on 2015-04-24 11:52:24 +0200 with options {:application=&gt;&quot;primes&quot;}<br/>
519
510
  </div>
520
511
  <div id="commands">
521
512
  <span style="font-size: 11pt; font-weight: bold;">Threshold:</span>
@@ -526,48 +517,31 @@ Generated on Sat Jul 24 08:05:17 +0200 2010 with options {:application=&gt;&quot
526
517
  <input value="Show Help" onclick="toggleHelp(this);" type="submit">
527
518
  </div>
528
519
  <div style="display: none;" id="help">
529
- <img src="empty.png"> Enter a decimal value <i>d</i> into the threshold field and click "Apply"
530
- to hide all nodes marked with time values lower than <i>d</i>.<br>
531
- <img src="empty.png"> Click on "Expand All" for full tree expansion.<br>
532
- <img src="empty.png"> Click on "Collapse All" to show only top level nodes.<br>
533
- <img src="empty.png"> Use a, s, d, w as in Quake or Urban Terror to navigate the tree.<br>
534
- <img src="empty.png"> Use f and b to navigate the tree in preorder forward and backwards.<br>
535
- <img src="empty.png"> Use x to toggle visibility of a subtree.<br>
536
- <img src="empty.png"> Use * to expand/collapse a whole subtree.<br>
537
- <img src="empty.png"> Use h to navigate to thread root.<br>
538
- <img src="empty.png"> Use n and p to navigate between threads.<br>
539
- <img src="empty.png"> Click on background to move focus to a subtree.<br>
520
+ &#8226; Enter a decimal value <i>d</i> into the threshold field and click "Apply"
521
+ to hide all nodes marked with time values lower than <i>d</i>.<br>
522
+ &#8226; Click on "Expand All" for full tree expansion.<br>
523
+ &#8226; Click on "Collapse All" to show only top level nodes.<br>
524
+ &#8226; Use a, s, d, w as in Quake or Urban Terror to navigate the tree.<br>
525
+ &#8226; Use f and b to navigate the tree in preorder forward and backwards.<br>
526
+ &#8226; Use x to toggle visibility of a subtree.<br>
527
+ &#8226; Use * to expand/collapse a whole subtree.<br>
528
+ &#8226; Use h to navigate to thread root.<br>
529
+ &#8226; Use n and p to navigate between threads.<br>
530
+ &#8226; Click on background to move focus to a subtree.<br>
540
531
  </div>
541
- <div class="thread">Thread: 2148387240 (100.00% ~ 1.41237)</div><ul name="thread"><li class="color9" style="display:block"><img class="toggle" src="minus.png"> 100.00% (100.00%) <a href="txmt://open?url=file:///Users/skaes/src/ruby-prof/test/printers_test.rb&line=16">PrintersTest#setup</a> [1 calls, <a href='multi.graph.html#PrintersTest_setup_2148387240'>1</a> total]
542
- <ul><li class="color5" style="display:block"><img class="toggle" src="minus.png"> 50.24% (50.24%) <a href="txmt://open?url=file:///Users/skaes/src/ruby-prof/test/printers_test.rb&line=9">PrintersTest#go</a> [1 calls, <a href='multi.graph.html#PrintersTest_go_2148387240'>1</a> total]
543
- <ul><li class="color5" style="display:block"><img class="toggle" src="minus.png"> 50.23% (100.00%) <a href="txmt://open?url=file:///Users/skaes/src/ruby-prof/test/prime.rb&line=46">Object#run_primes</a> [1 calls, <a href='multi.graph.html#Object_run_primes_2148387240'>2</a> total]
544
- <ul><li class="color4" style="display:block"><img class="toggle" src="minus.png"> 49.72% (98.97%) <a href="txmt://open?url=file:///Users/skaes/src/ruby-prof/test/prime.rb&line=24">Object#find_primes</a> [1 calls, <a href='multi.graph.html#Object_find_primes_2148387240'>2</a> total]
545
- <ul><li class="color4" style="display:block"><img class="toggle" src="minus.png"> 49.72% (100.00%) Array#select [1 calls, <a href='multi.graph.html#Array_select_2148387240'>2</a> total]
546
- <ul><li class="color4" style="display:block"><img class="toggle" src="minus.png"> 49.43% (99.42%) <a href="txmt://open?url=file:///Users/skaes/src/ruby-prof/test/prime.rb&line=16">Object#is_prime</a> [10000 calls, <a href='multi.graph.html#Object_is_prime_2148387240'>20000</a> total]
547
- <ul><li class="color4" style="display:block"><img class="toggle" src="minus.png"> 48.85% (98.83%) Integer#upto [10000 calls, <a href='multi.graph.html#Integer_upto_2148387240'>20000</a> total]
548
- <ul><li class="color05" style="display:block"><img src="empty.png"> 7.13% (14.59%) Fixnum#% [778318 calls, <a href='multi.graph.html#Fixnum_%_2148387240'>1544726</a> total]
549
- </li><li class="color05" style="display:block"><img src="empty.png"> 6.04% (12.36%) Fixnum#== [778318 calls, <a href='multi.graph.html#Fixnum____2148387240'>1544726</a> total]
550
- </li></ul></li><li class="color01" style="display:none"><img src="empty.png"> 0.09% (0.17%) Fixnum#- [10000 calls, <a href='multi.graph.html#Fixnum_-_2148387240'>20000</a> total]
551
- </li></ul></li></ul></li></ul></li><li class="color01" style="display:none"><img class="toggle" src="empty.png"> 0.52% (1.03%) <a href="txmt://open?url=file:///Users/skaes/src/ruby-prof/test/prime.rb&line=7">Object#make_random_array</a> [1 calls, <a href='multi.graph.html#Object_make_random_array_2148387240'>2</a> total]
552
- <ul style="display:none"><li class="color01" style="display:none"><img class="toggle" src="empty.png"> 0.51% (99.22%) Array#each_index [1 calls, <a href='multi.graph.html#Array_each_index_2148387240'>2</a> total]
553
- <ul style="display:none"><li class="color01" style="display:none"><img src="empty.png"> 0.12% (22.55%) Kernel#rand [10000 calls, <a href='multi.graph.html#Kernel_rand_2148387240'>20000</a> total]
554
- </li><li class="color01" style="display:none"><img src="empty.png"> 0.09% (18.30%) Array#[]= [10000 calls, <a href='multi.graph.html#Array_[]__2148387240'>20000</a> total]
555
- </li></ul></li><li class="color01" style="display:none"><img class="toggle" src="empty.png"> 0.00% (0.71%) Class#new [1 calls, <a href='multi.graph.html#Class_new_2148387240'>2</a> total]
556
- <ul style="display:none"><li class="color01" style="display:none"><img src="empty.png"> 0.00% (96.15%) Array#initialize [1 calls, <a href='multi.graph.html#Array_initialize_2148387240'>2</a> total]
557
- </li><li class="color01" style="display:none"><img src="empty.png"> 0.00% (1.92%) &lt;Class::Array&gt;#allocate [1 calls, <a href='multi.graph.html#_Class__Array__allocate_2148387240'>2</a> total]
558
- </li></ul></li></ul></li></ul></li></ul></li><li class="color4" style="display:block"><img class="toggle" src="minus.png"> 49.76% (49.76%) <a href="txmt://open?url=file:///Users/skaes/src/ruby-prof/test/prime.rb&line=46">Object#run_primes</a> [1 calls, <a href='multi.graph.html#Object_run_primes_2148387240'>2</a> total]
559
- <ul><li class="color4" style="display:block"><img class="toggle" src="minus.png"> 49.23% (98.93%) <a href="txmt://open?url=file:///Users/skaes/src/ruby-prof/test/prime.rb&line=24">Object#find_primes</a> [1 calls, <a href='multi.graph.html#Object_find_primes_2148387240'>2</a> total]
560
- <ul><li class="color4" style="display:block"><img class="toggle" src="minus.png"> 49.23% (100.00%) Array#select [1 calls, <a href='multi.graph.html#Array_select_2148387240'>2</a> total]
561
- <ul><li class="color4" style="display:block"><img class="toggle" src="minus.png"> 48.94% (99.41%) <a href="txmt://open?url=file:///Users/skaes/src/ruby-prof/test/prime.rb&line=16">Object#is_prime</a> [10000 calls, <a href='multi.graph.html#Object_is_prime_2148387240'>20000</a> total]
562
- <ul><li class="color4" style="display:block"><img class="toggle" src="minus.png"> 48.38% (98.84%) Integer#upto [10000 calls, <a href='multi.graph.html#Integer_upto_2148387240'>20000</a> total]
563
- <ul><li class="color05" style="display:block"><img src="empty.png"> 7.03% (14.53%) Fixnum#% [766408 calls, <a href='multi.graph.html#Fixnum_%_2148387240'>1544726</a> total]
564
- </li><li class="color01" style="display:block"><img src="empty.png"> 5.89% (12.17%) Fixnum#== [766408 calls, <a href='multi.graph.html#Fixnum____2148387240'>1544726</a> total]
565
- </li></ul></li><li class="color01" style="display:none"><img src="empty.png"> 0.08% (0.17%) Fixnum#- [10000 calls, <a href='multi.graph.html#Fixnum_-_2148387240'>20000</a> total]
566
- </li></ul></li></ul></li></ul></li><li class="color01" style="display:none"><img class="toggle" src="empty.png"> 0.53% (1.07%) <a href="txmt://open?url=file:///Users/skaes/src/ruby-prof/test/prime.rb&line=7">Object#make_random_array</a> [1 calls, <a href='multi.graph.html#Object_make_random_array_2148387240'>2</a> total]
567
- <ul style="display:none"><li class="color01" style="display:none"><img class="toggle" src="empty.png"> 0.53% (99.26%) Array#each_index [1 calls, <a href='multi.graph.html#Array_each_index_2148387240'>2</a> total]
568
- <ul style="display:none"><li class="color01" style="display:none"><img src="empty.png"> 0.11% (21.47%) Kernel#rand [10000 calls, <a href='multi.graph.html#Kernel_rand_2148387240'>20000</a> total]
569
- </li><li class="color01" style="display:none"><img src="empty.png"> 0.10% (18.28%) Array#[]= [10000 calls, <a href='multi.graph.html#Array_[]__2148387240'>20000</a> total]
570
- </li></ul></li><li class="color01" style="display:none"><img class="toggle" src="empty.png"> 0.00% (0.72%) Class#new [1 calls, <a href='multi.graph.html#Class_new_2148387240'>2</a> total]
571
- <ul style="display:none"><li class="color01" style="display:none"><img src="empty.png"> 0.00% (88.89%) Array#initialize [1 calls, <a href='multi.graph.html#Array_initialize_2148387240'>2</a> total]
572
- </li><li class="color01" style="display:none"><img src="empty.png"> 0.00% (1.85%) &lt;Class::Array&gt;#allocate [1 calls, <a href='multi.graph.html#_Class__Array__allocate_2148387240'>2</a> total]
573
- </li></ul></li></ul></li></ul></li></ul></li></ul><div id="sentinel"></div></body></html>
532
+ <div class="thread">Thread: 70140045951280, Fiber: 70140054192180 (100.00% ~ 0.0029680728912353516)</div><ul name="thread"><li class="color9" style="display:block"><a href="#" class="toggle minus" ></a><span> 100.00% (100.00%) <a href="txmt://open?url=file:///Users/stefan.kaes/src/ruby-prof/test/printers_test.rb&line=14">PrintersTest#setup</a> [1 calls, <a href='multi.graph.html#PrintersTest_setup_70140054192180'>1</a> total]</span>
533
+ <ul><li class="color9" style="display:block"><a href="#" class="toggle minus" ></a><span> 99.82% (99.82%) <a href="txmt://open?url=file:///Users/stefan.kaes/src/ruby-prof/test/prime.rb&line=45">Object#run_primes</a> [1 calls, <a href='multi.graph.html#Object_run_primes_70140054192180'>1</a> total]</span>
534
+ <ul><li class="color9" style="display:block"><a href="#" class="toggle minus" ></a><span> 92.62% (92.78%) <a href="txmt://open?url=file:///Users/stefan.kaes/src/ruby-prof/test/prime.rb&line=24">Object#find_primes</a> [1 calls, <a href='multi.graph.html#Object_find_primes_70140054192180'>1</a> total]</span>
535
+ <ul><li class="color9" style="display:block"><a href="#" class="toggle minus" ></a><span> 92.55% (99.93%) Array#select [1 calls, <a href='multi.graph.html#Array_select_70140054192180'>1</a> total]</span>
536
+ <ul><li class="color8" style="display:block"><a href="#" class="toggle minus" ></a><span> 89.73% (96.95%) <a href="txmt://open?url=file:///Users/stefan.kaes/src/ruby-prof/test/prime.rb&line=16">Object#is_prime</a> [200 calls, <a href='multi.graph.html#Object_is_prime_70140054192180'>200</a> total]</span>
537
+ <ul><li class="color8" style="display:block"><a href="#" class="toggle empty" ></a><span> 86.63% (96.54%) Integer#upto [200 calls, <a href='multi.graph.html#Integer_upto_70140054192180'>201</a> total]</span>
538
+ </li></ul></li></ul></li></ul></li><li class="color05" style="display:block"><a href="#" class="toggle plus" ></a><span> 6.64% (6.65%) <a href="txmt://open?url=file:///Users/stefan.kaes/src/ruby-prof/test/prime.rb&line=7">Object#make_random_array</a> [1 calls, <a href='multi.graph.html#Object_make_random_array_70140054192180'>1</a> total]</span>
539
+ <ul style="display:none"><li class="color05" style="display:block"><a href="#" class="toggle plus" ></a><span> 6.33% (95.40%) Array#each_index [1 calls, <a href='multi.graph.html#Array_each_index_70140054192180'>1</a> total]</span>
540
+ <ul style="display:none"><li class="color01" style="display:block"><a href="#" class="toggle plus" ></a><span> 3.96% (62.56%) Kernel#rand [200 calls, <a href='multi.graph.html#Kernel_rand_70140054192180'>200</a> total]</span>
541
+ <ul style="display:none"><li class="color01" style="display:block"><a href="#" class="toggle empty" ></a><span> 1.02% (25.76%) Kernel#respond_to_missing? [200 calls, <a href='multi.graph.html#Kernel_respond_to_missing__70140054192180'>200</a> total]</span>
542
+ </li></ul></li></ul></li><li class="color01" style="display:none"><a href="#" class="toggle empty" ></a><span> 0.20% (3.03%) Class#new [1 calls, <a href='multi.graph.html#Class_new_70140054192180'>1</a> total]</span>
543
+ <ul style="display:none"><li class="color01" style="display:none"><a href="#" class="toggle empty" ></a><span> 0.06% (32.00%) Array#initialize [1 calls, <a href='multi.graph.html#Array_initialize_70140054192180'>1</a> total]</span>
544
+ </li></ul></li></ul></li><li class="color01" style="display:none"><a href="#" class="toggle empty" ></a><span> 0.51% (0.51%) <a href="txmt://open?url=file:///Users/stefan.kaes/src/ruby-prof/test/prime.rb&line=31">Object#find_largest</a> [1 calls, <a href='multi.graph.html#Object_find_largest_70140054192180'>1</a> total]</span>
545
+ <ul style="display:none"><li class="color01" style="display:none"><a href="#" class="toggle empty" ></a><span> 0.37% (73.02%) Integer#upto [1 calls, <a href='multi.graph.html#Integer_upto_70140054192180'>201</a> total]</span>
546
+ </li><li class="color01" style="display:none"><a href="#" class="toggle empty" ></a><span> 0.03% (6.35%) Array#first [1 calls, <a href='multi.graph.html#Array_first_70140054192180'>1</a> total]</span>
547
+ </li></ul></li></ul></li></ul></li></ul><div id="sentinel"></div></div></body></html>