9994
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
"{ Package: 'stx:libtool' }"
|
|
13 |
|
|
14 |
"{ NameSpace: Tools }"
|
|
15 |
|
|
16 |
NavigatorModel subclass:#VisualProfilerCanvas
|
|
17 |
instanceVariableNames:'profilerStatistics selectedMethods packageFilter
|
|
18 |
perspectiveSpecHolder callTreeHolder selectedCallTreeItemHolder
|
|
19 |
methodList'
|
|
20 |
classVariableNames:''
|
|
21 |
poolDictionaries:''
|
|
22 |
category:'Interface-Browsers-New-Profiler'
|
|
23 |
!
|
|
24 |
|
|
25 |
HierarchicalItem subclass:#CallTreeItem
|
|
26 |
instanceVariableNames:'subjects'
|
|
27 |
classVariableNames:''
|
|
28 |
poolDictionaries:''
|
|
29 |
privateIn:VisualProfilerCanvas
|
|
30 |
!
|
|
31 |
|
|
32 |
!VisualProfilerCanvas class methodsFor:'documentation'!
|
|
33 |
|
|
34 |
copyright
|
|
35 |
"
|
|
36 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
37 |
All Rights Reserved
|
|
38 |
|
|
39 |
This software is furnished under a license and may be used
|
|
40 |
only in accordance with the terms of that license and with the
|
|
41 |
inclusion of the above copyright notice. This software may not
|
|
42 |
be provided or otherwise made available to, or used by, any
|
|
43 |
other person. No title to or ownership of the software is
|
|
44 |
hereby transferred.
|
|
45 |
"
|
|
46 |
! !
|
|
47 |
|
|
48 |
!VisualProfilerCanvas class methodsFor:'interface specs'!
|
|
49 |
|
|
50 |
callTreeSpec
|
|
51 |
"This resource specification was automatically generated
|
|
52 |
by the UIPainter of ST/X."
|
|
53 |
|
|
54 |
"Do not manually edit this!! If it is corrupted,
|
|
55 |
the UIPainter may not be able to read the specification."
|
|
56 |
|
|
57 |
"
|
|
58 |
UIPainter new openOnClass:Tools::VisualProfilerCanvas andSelector:#callTreeSpec
|
|
59 |
Tools::VisualProfilerCanvas new openInterface:#callTreeSpec
|
|
60 |
"
|
|
61 |
|
|
62 |
<resource: #canvas>
|
|
63 |
|
|
64 |
^
|
|
65 |
#(FullSpec
|
|
66 |
name: callTreeSpec
|
|
67 |
window:
|
|
68 |
(WindowSpec
|
|
69 |
label: 'Visual Profiler - Call Tree'
|
|
70 |
name: 'Visual Profiler - Call Tree'
|
|
71 |
min: (Point 10 10)
|
|
72 |
bounds: (Rectangle 0 0 300 300)
|
|
73 |
)
|
|
74 |
component:
|
|
75 |
(SpecCollection
|
|
76 |
collection: (
|
|
77 |
(HierarchicalListViewSpec
|
|
78 |
name: 'CallTree'
|
|
79 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
80 |
model: selectedCallTreeItemHolder
|
|
81 |
hasHorizontalScrollBar: true
|
|
82 |
hasVerticalScrollBar: true
|
|
83 |
listModel: callTreeHolder
|
|
84 |
useIndex: false
|
|
85 |
highlightMode: line
|
|
86 |
useDefaultIcons: false
|
|
87 |
)
|
|
88 |
)
|
|
89 |
|
|
90 |
)
|
|
91 |
)
|
|
92 |
|
|
93 |
"Modified: / 10-10-2007 / 08:51:10 / janfrog"
|
|
94 |
!
|
|
95 |
|
|
96 |
methodListSpec
|
|
97 |
"This resource specification was automatically generated
|
|
98 |
by the UIPainter of ST/X."
|
|
99 |
|
|
100 |
"Do not manually edit this!! If it is corrupted,
|
|
101 |
the UIPainter may not be able to read the specification."
|
|
102 |
|
|
103 |
"
|
|
104 |
UIPainter new openOnClass:Tools::VisualProfilerCanvas andSelector:#methodListSpec
|
|
105 |
Tools::VisualProfilerCanvas new openInterface:#methodListSpec
|
|
106 |
"
|
|
107 |
|
|
108 |
<resource: #canvas>
|
|
109 |
|
|
110 |
^
|
|
111 |
#(FullSpec
|
|
112 |
name: methodListSpec
|
|
113 |
window:
|
|
114 |
(WindowSpec
|
|
115 |
label: 'Method list'
|
|
116 |
name: 'Method list'
|
|
117 |
min: (Point 10 10)
|
|
118 |
bounds: (Rectangle 0 0 300 300)
|
|
119 |
)
|
|
120 |
component:
|
|
121 |
(SpecCollection
|
|
122 |
collection: (
|
|
123 |
(DataSetSpec
|
|
124 |
name: 'MethodList'
|
|
125 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
126 |
model: selectedCallTreeItemHolder
|
|
127 |
hasHorizontalScrollBar: true
|
|
128 |
hasVerticalScrollBar: true
|
|
129 |
dataList: methodListAspect
|
|
130 |
useIndex: false
|
|
131 |
columnHolder: methodListColumns
|
|
132 |
)
|
|
133 |
)
|
|
134 |
|
|
135 |
)
|
|
136 |
)
|
|
137 |
|
|
138 |
"Modified: / 01-12-2007 / 23:57:41 / janfrog"
|
|
139 |
!
|
|
140 |
|
|
141 |
sidebarInfoSpec
|
|
142 |
"This resource specification was automatically generated
|
|
143 |
by the UIPainter of ST/X."
|
|
144 |
|
|
145 |
"Do not manually edit this!! If it is corrupted,
|
|
146 |
the UIPainter may not be able to read the specification."
|
|
147 |
|
|
148 |
"
|
|
149 |
UIPainter new openOnClass:Tools::VisualProfilerCanvas andSelector:#sidebarInfoSpec
|
|
150 |
Tools::VisualProfilerCanvas new openInterface:#sidebarInfoSpec
|
|
151 |
"
|
|
152 |
|
|
153 |
<resource: #canvas>
|
|
154 |
|
|
155 |
^
|
|
156 |
#(FullSpec
|
|
157 |
name: sidebarInfoSpec
|
|
158 |
window:
|
|
159 |
(WindowSpec
|
|
160 |
label: 'General Info'
|
|
161 |
name: 'General Info'
|
|
162 |
min: (Point 10 10)
|
|
163 |
bounds: (Rectangle 0 0 300 300)
|
|
164 |
)
|
|
165 |
component:
|
|
166 |
(SpecCollection
|
|
167 |
collection: (
|
|
168 |
(VerticalPanelViewSpec
|
|
169 |
name: 'Panel'
|
|
170 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
171 |
horizontalLayout: fit
|
|
172 |
verticalLayout: topFit
|
|
173 |
horizontalSpace: 3
|
|
174 |
verticalSpace: 3
|
|
175 |
component:
|
|
176 |
(SpecCollection
|
|
177 |
collection: (
|
|
178 |
(TransparentBoxSpec
|
|
179 |
name: 'StartTimeBox'
|
|
180 |
component:
|
|
181 |
(SpecCollection
|
|
182 |
collection: (
|
|
183 |
(LabelSpec
|
|
184 |
label: 'Start time:'
|
|
185 |
name: 'StartTimestampLabel'
|
|
186 |
layout: (LayoutFrame 0 0 0 0 0 1 0 0.5)
|
|
187 |
translateLabel: true
|
|
188 |
adjust: left
|
|
189 |
)
|
|
190 |
(LabelSpec
|
|
191 |
name: 'StartTimestamp'
|
|
192 |
layout: (LayoutFrame 30 0 0 0.5 0 1 0 1)
|
|
193 |
translateLabel: true
|
|
194 |
labelChannel: startTimestampAspect
|
|
195 |
adjust: left
|
|
196 |
)
|
|
197 |
)
|
|
198 |
|
|
199 |
)
|
|
200 |
extent: (Point 300 50)
|
|
201 |
)
|
|
202 |
(TransparentBoxSpec
|
|
203 |
name: 'ExecutionTimeBox'
|
|
204 |
component:
|
|
205 |
(SpecCollection
|
|
206 |
collection: (
|
|
207 |
(LabelSpec
|
|
208 |
label: 'Execution time:'
|
|
209 |
name: 'ExecutionTimeLabel'
|
|
210 |
layout: (LayoutFrame 0 0 0 0 0 1 0 0.5)
|
|
211 |
translateLabel: true
|
|
212 |
adjust: left
|
|
213 |
)
|
|
214 |
(LabelSpec
|
|
215 |
label: 'Label'
|
|
216 |
name: 'ExecutionTime'
|
|
217 |
layout: (LayoutFrame 30 0 0 0.5 0 1 0 1)
|
|
218 |
translateLabel: true
|
|
219 |
labelChannel: executionTimeAspect
|
|
220 |
adjust: left
|
|
221 |
)
|
|
222 |
)
|
|
223 |
|
|
224 |
)
|
|
225 |
extent: (Point 300 50)
|
|
226 |
)
|
|
227 |
(TransparentBoxSpec
|
|
228 |
name: 'NotesBox'
|
|
229 |
component:
|
|
230 |
(SpecCollection
|
|
231 |
collection: (
|
|
232 |
(LabelSpec
|
|
233 |
label: 'Notes:'
|
|
234 |
name: 'NotesLabel'
|
|
235 |
layout: (LayoutFrame 0 0 0 0 0 1 25 0)
|
|
236 |
translateLabel: true
|
|
237 |
adjust: left
|
|
238 |
)
|
|
239 |
(TextEditorSpec
|
|
240 |
name: 'Notes'
|
|
241 |
layout: (LayoutFrame 30 0 25 0 0 1 0 1)
|
|
242 |
model: notesAspect
|
|
243 |
hasHorizontalScrollBar: true
|
|
244 |
hasVerticalScrollBar: true
|
|
245 |
)
|
|
246 |
)
|
|
247 |
|
|
248 |
)
|
|
249 |
extent: (Point 300 194)
|
|
250 |
)
|
|
251 |
)
|
|
252 |
|
|
253 |
)
|
|
254 |
)
|
|
255 |
)
|
|
256 |
|
|
257 |
)
|
|
258 |
)
|
|
259 |
|
|
260 |
"Modified: / 24-11-2007 / 09:27:08 / janfrog"
|
|
261 |
!
|
|
262 |
|
|
263 |
sidebarPackageFilterSpec
|
|
264 |
<resource: #canvas>
|
|
265 |
"This resource specification was automatically generated
|
|
266 |
by the UIPainter of ST/X."
|
|
267 |
"Do not manually edit this!! If it is corrupted,
|
|
268 |
the UIPainter may not be able to read the specification."
|
|
269 |
"
|
|
270 |
UIPainter new openOnClass:Tools::VisualProfilerCanvas andSelector:#packageFilterSpec
|
|
271 |
Tools::VisualProfilerCanvas new openInterface:#packageFilterSpec"
|
|
272 |
|
|
273 |
^ #( #FullSpec
|
|
274 |
#name: #sidebarPackageFilterSpec
|
|
275 |
#window:
|
|
276 |
#(WindowSpec label: 'Package Filter' name: 'Package Filter' min: (Point 10 10) bounds: (Rectangle 0 0 300 300))
|
|
277 |
#component:
|
|
278 |
#(SpecCollection collection: ((SubCanvasSpec name: 'PackageFilterCanvas' layout: (LayoutFrame 0 0 0 0 0 1 0 1) hasHorizontalScrollBar: false hasVerticalScrollBar: false majorKey: #'Tools::HierarchicalPackageFilterList' minorKey: windowSpec subAspectHolders: (Array (SubChannelInfoSpec subAspect: packageFilter aspect: packageFilter)) createNewApplication: true createNewBuilder: true))) )
|
|
279 |
|
|
280 |
"Modified: / 24-11-2007 / 08:34:31 / janfrog"
|
|
281 |
!
|
|
282 |
|
|
283 |
sidebarSpec
|
|
284 |
"This resource specification was automatically generated
|
|
285 |
by the UIPainter of ST/X."
|
|
286 |
|
|
287 |
"Do not manually edit this!! If it is corrupted,
|
|
288 |
the UIPainter may not be able to read the specification."
|
|
289 |
|
|
290 |
"
|
|
291 |
UIPainter new openOnClass:Tools::VisualProfilerCanvas andSelector:#sidebarSpec
|
|
292 |
Tools::VisualProfilerCanvas new openInterface:#sidebarSpec
|
|
293 |
"
|
|
294 |
|
|
295 |
<resource: #canvas>
|
|
296 |
|
|
297 |
^
|
|
298 |
#(FullSpec
|
|
299 |
name: sidebarSpec
|
|
300 |
window:
|
|
301 |
(WindowSpec
|
|
302 |
label: 'Profiler Sidebar'
|
|
303 |
name: 'Profiler Sidebar'
|
|
304 |
min: (Point 10 10)
|
|
305 |
bounds: (Rectangle 0 0 300 300)
|
|
306 |
)
|
|
307 |
component:
|
|
308 |
(SpecCollection
|
|
309 |
collection: (
|
|
310 |
(MenuPanelSpec
|
|
311 |
name: 'ToolBar'
|
|
312 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0)
|
|
313 |
menu: sidebarMenu
|
|
314 |
textDefault: true
|
|
315 |
)
|
|
316 |
(NoteBookViewSpec
|
|
317 |
name: 'SidebarNotebook'
|
|
318 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1)
|
|
319 |
menu: sidebarNotebookTabList
|
|
320 |
direction: left
|
|
321 |
fitLastRow: false
|
|
322 |
)
|
|
323 |
)
|
|
324 |
|
|
325 |
)
|
|
326 |
)
|
|
327 |
|
|
328 |
"Modified: / 24-11-2007 / 09:13:40 / janfrog"
|
|
329 |
!
|
|
330 |
|
|
331 |
windowSpec
|
|
332 |
"This resource specification was automatically generated
|
|
333 |
by the UIPainter of ST/X."
|
|
334 |
|
|
335 |
"Do not manually edit this!! If it is corrupted,
|
|
336 |
the UIPainter may not be able to read the specification."
|
|
337 |
|
|
338 |
"
|
|
339 |
UIPainter new openOnClass:Tools::VisualProfilerCanvas andSelector:#windowSpec
|
|
340 |
Tools::VisualProfilerCanvas new openInterface:#windowSpec
|
|
341 |
Tools::VisualProfilerCanvas open
|
|
342 |
"
|
|
343 |
|
|
344 |
<resource: #canvas>
|
|
345 |
|
|
346 |
^
|
|
347 |
#(FullSpec
|
|
348 |
name: windowSpec
|
|
349 |
window:
|
|
350 |
(WindowSpec
|
|
351 |
label: 'Visual Profiler'
|
|
352 |
name: 'Visual Profiler'
|
|
353 |
min: (Point 10 10)
|
|
354 |
bounds: (Rectangle 0 0 714 332)
|
|
355 |
)
|
|
356 |
component:
|
|
357 |
(SpecCollection
|
|
358 |
collection: (
|
|
359 |
(VariableHorizontalPanelSpec
|
|
360 |
name: 'SidebarAndPerspectivePanel'
|
|
361 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
362 |
showHandle: true
|
|
363 |
snapMode: both
|
|
364 |
component:
|
|
365 |
(SpecCollection
|
|
366 |
collection: (
|
|
367 |
(UISubSpecification
|
|
368 |
name: 'SidebarSpec'
|
|
369 |
minorKey: sidebarSpec
|
|
370 |
)
|
|
371 |
(NoteBookViewSpec
|
|
372 |
name: 'PerspectiveNoteBook'
|
|
373 |
menu: perspectiveNotebookTabList
|
|
374 |
direction: bottom
|
|
375 |
fitLastRow: false
|
|
376 |
)
|
|
377 |
)
|
|
378 |
|
|
379 |
)
|
|
380 |
handles: (Any 0.3 1.0)
|
|
381 |
)
|
|
382 |
)
|
|
383 |
|
|
384 |
)
|
|
385 |
)
|
|
386 |
|
|
387 |
"Modified: / 24-11-2007 / 09:07:56 / janfrog"
|
|
388 |
! !
|
|
389 |
|
|
390 |
!VisualProfilerCanvas class methodsFor:'list specs'!
|
|
391 |
|
|
392 |
perspectiveNotebookTabList
|
|
393 |
"This resource specification was automatically generated
|
|
394 |
by the TabListEditor of ST/X."
|
|
395 |
|
|
396 |
"Do not manually edit this!! If it is corrupted,
|
|
397 |
the TabListEditor may not be able to read the specification."
|
|
398 |
|
|
399 |
"
|
|
400 |
TabListEditor new openOnClass: self andSelector:#perspectiveNotebookTabList
|
|
401 |
"
|
|
402 |
|
|
403 |
<resource: #tabList>
|
|
404 |
|
|
405 |
^ #(
|
|
406 |
(TabItem
|
|
407 |
label: 'Call tree'
|
|
408 |
createNewBuilder: false
|
|
409 |
minorKey: callTreeSpec
|
|
410 |
)
|
|
411 |
(TabItem
|
|
412 |
label: 'Method list'
|
|
413 |
createNewBuilder: false
|
|
414 |
minorKey: methodListSpec
|
|
415 |
)
|
|
416 |
)
|
|
417 |
|
|
418 |
collect:[:aTab| TabItem new fromLiteralArrayEncoding:aTab ]
|
|
419 |
|
|
420 |
"Modified: / 02-12-2007 / 00:03:42 / janfrog"
|
|
421 |
!
|
|
422 |
|
|
423 |
sidebarNotebookTabList
|
|
424 |
"This resource specification was automatically generated
|
|
425 |
by the TabListEditor of ST/X."
|
|
426 |
|
|
427 |
"Do not manually edit this!! If it is corrupted,
|
|
428 |
the TabListEditor may not be able to read the specification."
|
|
429 |
|
|
430 |
"
|
|
431 |
TabListEditor new openOnClass: self andSelector:#sidebarNotebookTabList
|
|
432 |
"
|
|
433 |
|
|
434 |
<resource: #tabList>
|
|
435 |
|
|
436 |
^ #(
|
|
437 |
(TabItem
|
|
438 |
label: 'Statistics'
|
|
439 |
minorKey: sidebarInfoSpec
|
|
440 |
)
|
|
441 |
(TabItem
|
|
442 |
label: 'Packages'
|
|
443 |
createNewBuilder: false
|
|
444 |
minorKey: sidebarPackageFilterSpec
|
|
445 |
)
|
|
446 |
)
|
|
447 |
|
|
448 |
collect:[:aTab| TabItem new fromLiteralArrayEncoding:aTab ]
|
|
449 |
|
|
450 |
"Modified: / 24-11-2007 / 08:45:36 / janfrog"
|
|
451 |
! !
|
|
452 |
|
|
453 |
!VisualProfilerCanvas class methodsFor:'menu specs'!
|
|
454 |
|
|
455 |
sidebarMenu
|
|
456 |
"This resource specification was automatically generated
|
|
457 |
by the MenuEditor of ST/X."
|
|
458 |
|
|
459 |
"Do not manually edit this!! If it is corrupted,
|
|
460 |
the MenuEditor may not be able to read the specification."
|
|
461 |
|
|
462 |
"
|
|
463 |
MenuEditor new openOnClass:Tools::VisualProfilerCanvas andSelector:#sidebarMenu
|
|
464 |
(Menu new fromLiteralArrayEncoding:(Tools::VisualProfilerCanvas sidebarMenu)) startUp
|
|
465 |
"
|
|
466 |
|
|
467 |
<resource: #menu>
|
|
468 |
|
|
469 |
^
|
|
470 |
#(Menu
|
|
471 |
(
|
|
472 |
(MenuItem
|
|
473 |
label: 'Save'
|
|
474 |
itemValue: saveProfilerAction
|
|
475 |
translateLabel: true
|
|
476 |
labelImage: (ResourceRetriever XPToolbarIconLibrary saveToFileIcon)
|
|
477 |
)
|
|
478 |
)
|
|
479 |
nil
|
|
480 |
nil
|
|
481 |
)
|
|
482 |
|
|
483 |
"Modified: / 24-11-2007 / 09:10:50 / janfrog"
|
|
484 |
! !
|
|
485 |
|
|
486 |
!VisualProfilerCanvas class methodsFor:'plugIn spec'!
|
|
487 |
|
|
488 |
aspectSelectors
|
|
489 |
"This resource specification was automatically generated
|
|
490 |
by the UIPainter of ST/X."
|
|
491 |
|
|
492 |
"Do not manually edit this. If it is corrupted,
|
|
493 |
the UIPainter may not be able to read the specification."
|
|
494 |
|
|
495 |
"Return a description of exported aspects;
|
|
496 |
these can be connected to aspects of an embedding application
|
|
497 |
(if this app is embedded in a subCanvas)."
|
|
498 |
|
|
499 |
^ #(
|
|
500 |
#packageFilter
|
|
501 |
#profilerStatistics
|
|
502 |
#selectedMethods
|
|
503 |
).
|
|
504 |
|
|
505 |
"Modified: / 01-12-2007 / 23:57:41 / janfrog"
|
|
506 |
! !
|
|
507 |
|
|
508 |
!VisualProfilerCanvas class methodsFor:'tableColumns specs'!
|
|
509 |
|
|
510 |
methodListColumns
|
|
511 |
"This resource specification was automatically generated
|
|
512 |
by the DataSetBuilder of ST/X."
|
|
513 |
|
|
514 |
"Do not manually edit this!! If it is corrupted,
|
|
515 |
the DataSetBuilder may not be able to read the specification."
|
|
516 |
|
|
517 |
"
|
|
518 |
DataSetBuilder new openOnClass:Tools::VisualProfilerCanvas andSelector:#methodListColumns
|
|
519 |
"
|
|
520 |
|
|
521 |
<resource: #tableColumns>
|
|
522 |
|
|
523 |
^#(
|
|
524 |
(DataSetColumnSpec
|
|
525 |
labelButtonType: Button
|
|
526 |
rendererType: rowSelector
|
|
527 |
showRowSeparator: false
|
|
528 |
showSelectionHighLighted: false
|
|
529 |
showColSeparator: false
|
|
530 |
)
|
|
531 |
(DataSetColumnSpec
|
|
532 |
label: 'Tally'
|
|
533 |
labelButtonType: Button
|
|
534 |
type: number
|
|
535 |
model: tally
|
|
536 |
canSelect: false
|
|
537 |
showRowSeparator: false
|
|
538 |
showSelectionHighLighted: false
|
|
539 |
showColSeparator: false
|
|
540 |
)
|
|
541 |
(DataSetColumnSpec
|
|
542 |
label: 'Method'
|
|
543 |
labelButtonType: Button
|
|
544 |
model: methodLabel
|
|
545 |
canSelect: false
|
|
546 |
showRowSeparator: false
|
|
547 |
showSelectionHighLighted: false
|
|
548 |
showColSeparator: false
|
|
549 |
)
|
|
550 |
(DataSetColumnSpec
|
|
551 |
label: 'Package'
|
|
552 |
labelButtonType: Button
|
|
553 |
model: packageLabel
|
|
554 |
canSelect: false
|
|
555 |
showRowSeparator: false
|
|
556 |
showSelectionHighLighted: false
|
|
557 |
showColSeparator: false
|
|
558 |
)
|
|
559 |
)
|
|
560 |
|
|
561 |
"Modified: / 01-12-2007 / 23:56:15 / janfrog"
|
|
562 |
! !
|
|
563 |
|
|
564 |
!VisualProfilerCanvas methodsFor:'aspects'!
|
|
565 |
|
|
566 |
callTreeHolder
|
|
567 |
"automatically generated by UIPainter ..."
|
|
568 |
|
|
569 |
"*** the code below creates a default model when invoked."
|
|
570 |
"*** (which may not be the one you wanted)"
|
|
571 |
"*** Please change as required and accept it in the browser."
|
|
572 |
"*** (and replace this comment by something more useful ;-)"
|
|
573 |
|
|
574 |
callTreeHolder isNil ifTrue:[
|
|
575 |
callTreeHolder := HierarchicalList new.
|
|
576 |
callTreeHolder application: self.
|
|
577 |
"/ if your app needs to be notified of changes, uncomment one of the lines below:
|
|
578 |
"/ callTreeHolder addDependent:self.
|
|
579 |
"/ callTreeHolder onChangeSend:#callTreeHolderChanged to:self.
|
|
580 |
].
|
|
581 |
^ callTreeHolder.
|
|
582 |
|
|
583 |
"Created: / 10-10-2007 / 08:34:26 / janfrog"
|
|
584 |
"Modified: / 10-10-2007 / 12:48:20 / janfrog"
|
|
585 |
!
|
|
586 |
|
|
587 |
executionTimeAspect
|
|
588 |
|
|
589 |
^(PluggableAdaptor on: profilerStatistics)
|
|
590 |
getBlock:[:model|
|
|
591 |
model value
|
|
592 |
ifNil:['N/A']
|
|
593 |
ifNotNil:[model value computationTime printString
|
|
594 |
, 'ms'
|
|
595 |
,' (', (TimeDuration new setMilliseconds:model value computationTime) printString , ')']]
|
|
596 |
putBlock:[:ign1 :ign2|self shouldNeverBeReached]
|
|
597 |
updateBlock:[:ign1 :ign2 :ign3|true]
|
|
598 |
|
|
599 |
"Created: / 24-11-2007 / 08:44:49 / janfrog"
|
|
600 |
!
|
|
601 |
|
|
602 |
methodListAspect
|
|
603 |
|
|
604 |
methodList ifNil:[methodList := List new].
|
|
605 |
^methodList
|
|
606 |
|
|
607 |
"Created: / 01-12-2007 / 23:38:16 / janfrog"
|
|
608 |
!
|
|
609 |
|
|
610 |
notesAspect
|
|
611 |
|
|
612 |
^(AspectAdaptor forAspect:#notes)
|
|
613 |
subjectChannel: self profilerStatistics
|
|
614 |
|
|
615 |
"Created: / 24-11-2007 / 09:27:47 / janfrog"
|
|
616 |
!
|
|
617 |
|
|
618 |
packageFilter
|
|
619 |
"return/create the 'packageFilter' value holder (automatically generated)"
|
|
620 |
|
|
621 |
packageFilter isNil ifTrue:[
|
|
622 |
packageFilter := ValueHolder new.
|
|
623 |
].
|
|
624 |
^ packageFilter
|
|
625 |
|
|
626 |
"Created: / 09-10-2007 / 21:27:32 / janfrog"
|
|
627 |
!
|
|
628 |
|
|
629 |
packageFilter:something
|
|
630 |
"set the 'packageFilter' value holder (automatically generated)"
|
|
631 |
|
|
632 |
packageFilter ifNotNil:[packageFilter removeDependent: self].
|
|
633 |
packageFilter := something.
|
|
634 |
packageFilter ifNotNil:[packageFilter addDependent: self].
|
|
635 |
|
|
636 |
"Created: / 09-10-2007 / 21:27:32 / janfrog"
|
|
637 |
"Modified: / 10-10-2007 / 12:47:08 / janfrog"
|
|
638 |
!
|
|
639 |
|
|
640 |
perspectiveNotebookTabList
|
|
641 |
"Generated by the TabListEditor"
|
|
642 |
|
|
643 |
|list|
|
|
644 |
|
|
645 |
(list := builder bindingAt:#perspectiveNotebookTabList) isNil ifTrue:[
|
|
646 |
builder aspectAt:#perspectiveNotebookTabList put:(list := self class perspectiveNotebookTabList).
|
|
647 |
].
|
|
648 |
^ list
|
|
649 |
|
|
650 |
"Created: / 10-10-2007 / 10:10:07 / janfrog"
|
|
651 |
!
|
|
652 |
|
|
653 |
perspectiveSpecHolder
|
|
654 |
"automatically generated by UIPainter ..."
|
|
655 |
|
|
656 |
"*** the code below creates a default model when invoked."
|
|
657 |
"*** (which may not be the one you wanted)"
|
|
658 |
"*** Please change as required and accept it in the browser."
|
|
659 |
"*** (and replace this comment by something more useful ;-)"
|
|
660 |
|
|
661 |
perspectiveSpecHolder isNil ifTrue:[
|
|
662 |
perspectiveSpecHolder := #callTreeSpec asValue.
|
|
663 |
"/ if your app needs to be notified of changes, uncomment one of the lines below:
|
|
664 |
"/ perspectiveSpecHolder addDependent:self.
|
|
665 |
"/ perspectiveSpecHolder onChangeSend:#perspectiveSpecHolderChanged to:self.
|
|
666 |
].
|
|
667 |
^ perspectiveSpecHolder.
|
|
668 |
|
|
669 |
"Created: / 10-10-2007 / 08:31:35 / janfrog"
|
|
670 |
!
|
|
671 |
|
|
672 |
profilerStatistics
|
|
673 |
"return/create the 'profilerStatistics' value holder (automatically generated)"
|
|
674 |
|
|
675 |
profilerStatistics isNil ifTrue:[
|
|
676 |
profilerStatistics := ValueHolder new.
|
|
677 |
].
|
|
678 |
^ profilerStatistics
|
|
679 |
|
|
680 |
"Created: / 09-10-2007 / 21:53:38 / janfrog"
|
|
681 |
!
|
|
682 |
|
|
683 |
profilerStatistics:something
|
|
684 |
"set the 'profilerStatistics' value holder (automatically generated)"
|
|
685 |
|
|
686 |
profilerStatistics ifNotNil:[profilerStatistics removeDependent: self].
|
|
687 |
profilerStatistics := something.
|
|
688 |
profilerStatistics ifNotNil:[profilerStatistics addDependent: self].
|
|
689 |
|
|
690 |
"Created: / 09-10-2007 / 21:53:38 / janfrog"
|
|
691 |
"Modified: / 10-10-2007 / 08:46:46 / janfrog"
|
|
692 |
!
|
|
693 |
|
|
694 |
selectedCallTreeItemHolder
|
|
695 |
"automatically generated by UIPainter ..."
|
|
696 |
|
|
697 |
"*** the code below creates a default model when invoked."
|
|
698 |
"*** (which may not be the one you wanted)"
|
|
699 |
"*** Please change as required and accept it in the browser."
|
|
700 |
"*** (and replace this comment by something more useful ;-)"
|
|
701 |
|
|
702 |
selectedCallTreeItemHolder isNil ifTrue:[
|
|
703 |
selectedCallTreeItemHolder := ValueHolder new.
|
|
704 |
selectedCallTreeItemHolder onChangeSend:#selectedCallTreeItemChanged to:self.
|
|
705 |
].
|
|
706 |
^ selectedCallTreeItemHolder.
|
|
707 |
|
|
708 |
"Created: / 10-10-2007 / 08:51:34 / janfrog"
|
|
709 |
!
|
|
710 |
|
|
711 |
selectedMethods
|
|
712 |
"return/create the 'selectedMethods' value holder (automatically generated)"
|
|
713 |
|
|
714 |
selectedMethods isNil ifTrue:[
|
|
715 |
selectedMethods := ValueHolder new.
|
|
716 |
].
|
|
717 |
^ selectedMethods
|
|
718 |
|
|
719 |
"Created: / 09-10-2007 / 21:18:18 / janfrog"
|
|
720 |
!
|
|
721 |
|
|
722 |
selectedMethods:something
|
|
723 |
"set the 'selectedMethods' value holder (automatically generated)"
|
|
724 |
|
|
725 |
selectedMethods := something.
|
|
726 |
|
|
727 |
"Created: / 09-10-2007 / 21:18:18 / janfrog"
|
|
728 |
!
|
|
729 |
|
|
730 |
sidebarNotebookTabList
|
|
731 |
"Generated by the TabListEditor"
|
|
732 |
|
|
733 |
|list|
|
|
734 |
|
|
735 |
(list := builder bindingAt:#sidebarNotebookTabList) isNil ifTrue:[
|
|
736 |
builder aspectAt:#sidebarNotebookTabList put:(list := self class sidebarNotebookTabList).
|
|
737 |
].
|
|
738 |
^ list
|
|
739 |
|
|
740 |
"Created: / 10-10-2007 / 10:10:35 / janfrog"
|
|
741 |
!
|
|
742 |
|
|
743 |
startTimestampAspect
|
|
744 |
|
|
745 |
^(PluggableAdaptor on: profilerStatistics)
|
|
746 |
getBlock:[:model|
|
|
747 |
model value
|
|
748 |
ifNil:['N/A']
|
|
749 |
ifNotNil:[model value startTimestamp printString]]
|
|
750 |
putBlock:[:ign1 :ign2|self shouldNeverBeReached]
|
|
751 |
updateBlock:[:ign1 :ign2 :ign3|true]
|
|
752 |
|
|
753 |
"Created: / 24-11-2007 / 08:57:58 / janfrog"
|
|
754 |
! !
|
|
755 |
|
|
756 |
!VisualProfilerCanvas methodsFor:'change & update'!
|
|
757 |
|
|
758 |
methodsSelectionChanged
|
|
759 |
|
|
760 |
self topApplication == self
|
|
761 |
ifFalse:[self topApplication methodsSelectionChanged]
|
|
762 |
|
|
763 |
"Created: / 09-10-2007 / 21:33:50 / janfrog"
|
|
764 |
!
|
|
765 |
|
|
766 |
selectedCallTreeItemChanged
|
|
767 |
|
|
768 |
self selectedCallTreeItemHolder value ifNil:[^self].
|
|
769 |
self switchToMethod: self selectedCallTreeItemHolder value method
|
|
770 |
|
|
771 |
"Created: / 10-10-2007 / 08:52:33 / janfrog"
|
|
772 |
!
|
|
773 |
|
|
774 |
update: aspect with: value from: sender
|
|
775 |
|
|
776 |
sender == self profilerStatistics
|
|
777 |
ifTrue:[^self updateCallTreeRoot; updateMethodList].
|
|
778 |
|
|
779 |
sender == self packageFilter
|
|
780 |
ifTrue:[self updateCallTree; updateMethodList]
|
|
781 |
|
|
782 |
"Created: / 10-10-2007 / 08:46:59 / janfrog"
|
|
783 |
"Modified: / 01-12-2007 / 23:52:07 / janfrog"
|
|
784 |
!
|
|
785 |
|
|
786 |
updateCallTree
|
|
787 |
|
|
788 |
self callTreeHolder root updateChildren
|
|
789 |
|
|
790 |
"Created: / 10-10-2007 / 12:57:36 / janfrog"
|
|
791 |
!
|
|
792 |
|
|
793 |
updateCallTreeRoot
|
|
794 |
|
|
795 |
| callTree callTreeRootItem |
|
|
796 |
callTree := self callTreeHolder.
|
|
797 |
profilerStatistics value ifNil:[^callTree root: nil].
|
|
798 |
callTreeRootItem := CallTreeItem
|
|
799 |
subject: profilerStatistics value tree
|
|
800 |
parent: callTree.
|
|
801 |
callTree root: callTreeRootItem.
|
|
802 |
callTree showRoot: true.
|
|
803 |
|
|
804 |
"Created: / 10-10-2007 / 12:59:07 / janfrog"
|
|
805 |
!
|
|
806 |
|
|
807 |
updateMethodList
|
|
808 |
|
|
809 |
| items |
|
|
810 |
self methodListAspect removeAll.
|
|
811 |
self profilerStatistics value ifNil:[^self].
|
|
812 |
items := ProfilerInfoBuilder::MethodList new
|
|
813 |
packages: self packageFilter value;
|
|
814 |
build: self profilerStatistics value tree;
|
|
815 |
items.
|
|
816 |
|
|
817 |
self methodListAspect addAll: items
|
|
818 |
|
|
819 |
"Created: / 01-12-2007 / 23:39:15 / janfrog"
|
|
820 |
! !
|
|
821 |
|
|
822 |
!VisualProfilerCanvas methodsFor:'hooks'!
|
|
823 |
|
|
824 |
commonPostBuild
|
|
825 |
|
|
826 |
super commonPostBuild.
|
|
827 |
self updateCallTreeRoot.
|
|
828 |
self updateMethodList.
|
|
829 |
|
|
830 |
"Created: / 09-10-2007 / 20:05:18 / janfrog"
|
|
831 |
"Modified: / 01-12-2007 / 23:39:34 / janfrog"
|
|
832 |
!
|
|
833 |
|
|
834 |
postBuildEditModeInfoLabel: view
|
|
835 |
|
|
836 |
"Created: / 09-10-2007 / 21:06:35 / janfrog"
|
|
837 |
!
|
|
838 |
|
|
839 |
postBuildEditorNoteBook: view
|
|
840 |
|
|
841 |
"Created: / 09-10-2007 / 21:05:39 / janfrog"
|
|
842 |
! !
|
|
843 |
|
|
844 |
!VisualProfilerCanvas methodsFor:'user actions'!
|
|
845 |
|
|
846 |
switchToMethod: aMethod
|
|
847 |
|
|
848 |
self selectedMethods value:(Array with: aMethod).
|
|
849 |
self methodsSelectionChanged
|
|
850 |
|
|
851 |
"Created: / 09-10-2007 / 21:36:35 / janfrog"
|
|
852 |
! !
|
|
853 |
|
|
854 |
!VisualProfilerCanvas methodsFor:'user actions-profiler'!
|
|
855 |
|
|
856 |
profilerTestAction
|
|
857 |
|
|
858 |
self switchToMethod:(Object >> #yourself).
|
|
859 |
|
|
860 |
"Created: / 09-10-2007 / 21:07:53 / janfrog"
|
|
861 |
!
|
|
862 |
|
|
863 |
saveProfilerAction
|
|
864 |
|
|
865 |
| file profiler |
|
|
866 |
file := Dialog requestFileName:'Select file' pattern:'*.profiler.boss'.
|
|
867 |
file isNilOrEmptyCollection ifTrue:[^self].
|
|
868 |
profiler := self profilerStatistics value.
|
|
869 |
profiler storeStatisticsOn: file asFilename writeStream
|
|
870 |
|
|
871 |
"Created: / 24-11-2007 / 09:16:38 / janfrog"
|
|
872 |
! !
|
|
873 |
|
|
874 |
!VisualProfilerCanvas::CallTreeItem class methodsFor:'documentation'!
|
|
875 |
|
|
876 |
version
|
|
877 |
^'$Id: Tools__VisualProfilerCanvas.st,v 1.1 2011-07-01 13:28:12 cg Exp $'
|
|
878 |
! !
|
|
879 |
|
|
880 |
!VisualProfilerCanvas::CallTreeItem class methodsFor:'instance creation'!
|
|
881 |
|
|
882 |
subject: subject parent: parent
|
|
883 |
|
|
884 |
^self new
|
|
885 |
subject: subject;
|
|
886 |
parent: parent;
|
|
887 |
yourself
|
|
888 |
|
|
889 |
"Created: / 10-10-2007 / 08:35:55 / janfrog"
|
|
890 |
! !
|
|
891 |
|
|
892 |
!VisualProfilerCanvas::CallTreeItem methodsFor:'accessing'!
|
|
893 |
|
|
894 |
children
|
|
895 |
|
|
896 |
children ifNil:[children := self createChildren].
|
|
897 |
^children
|
|
898 |
|
|
899 |
"Created: / 10-10-2007 / 08:38:28 / janfrog"
|
|
900 |
"Modified: / 10-10-2007 / 13:24:06 / janfrog"
|
|
901 |
!
|
|
902 |
|
|
903 |
createChildren
|
|
904 |
|childrenTmp childrenStream|
|
|
905 |
|
|
906 |
self subject ifNil:[ ^ children := #() ].
|
|
907 |
childrenStream := (OrderedCollection new:self subject called size)
|
|
908 |
writeStream.
|
|
909 |
self createChildrenOn:childrenStream.
|
|
910 |
childrenTmp := childrenStream contents.
|
|
911 |
childrenTmp := self mergeChildren: childrenTmp.
|
|
912 |
childrenTmp do:[:child | child parent:self].
|
|
913 |
^ childrenTmp
|
|
914 |
|
|
915 |
"Created: / 10-10-2007 / 13:17:04 / janfrog"
|
|
916 |
"Modified: / 24-11-2007 / 09:43:30 / janfrog"
|
|
917 |
!
|
|
918 |
|
|
919 |
createChildrenOn:aStream
|
|
920 |
self directChildren do:[:child |
|
|
921 |
child isFiltered ifTrue:[
|
|
922 |
child createChildrenOn:aStream
|
|
923 |
] ifFalse:[
|
|
924 |
aStream nextPut:child
|
|
925 |
]
|
|
926 |
]
|
|
927 |
|
|
928 |
"Created: / 10-10-2007 / 13:05:52 / janfrog"
|
|
929 |
!
|
|
930 |
|
|
931 |
directChildren
|
|
932 |
self subject called ifNil:[ ^ #() ].
|
|
933 |
^ self subject called
|
|
934 |
collect:[:childSubject | self class subject:childSubject parent:self ]
|
|
935 |
|
|
936 |
"Created: / 10-10-2007 / 13:07:24 / janfrog"
|
|
937 |
"Modified: / 24-11-2007 / 09:18:56 / janfrog"
|
|
938 |
!
|
|
939 |
|
|
940 |
label
|
|
941 |
^ self totalTally printString , '% in '
|
|
942 |
, (self subject isBlock ifTrue:[ '[] in ' ] ifFalse:[ '' ])
|
|
943 |
, (self subject selector ? '<no selector>') , ' '
|
|
944 |
, ('[' , (self subject methodClass
|
|
945 |
ifNil:[ 'nil class' ]
|
|
946 |
ifNotNil:[ self subject methodClass name ])
|
|
947 |
, ']') allBold
|
|
948 |
, ' [' , self methodPackage asString allItalic
|
|
949 |
, ']'
|
|
950 |
|
|
951 |
"Created: / 10-10-2007 / 08:40:44 / janfrog"
|
|
952 |
"Modified: / 24-11-2007 / 09:42:16 / janfrog"
|
|
953 |
"Modified: / 07-11-2008 / 08:40:35 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
954 |
!
|
|
955 |
|
|
956 |
method
|
|
957 |
self subject methodClass ifNil:[ ^ nil ].
|
|
958 |
^ self subject methodClass >> self subject selector asSymbol
|
|
959 |
|
|
960 |
"Created: / 10-10-2007 / 08:49:58 / janfrog"
|
|
961 |
"Modified: / 24-11-2007 / 09:18:56 / janfrog"
|
|
962 |
!
|
|
963 |
|
|
964 |
methodPackage
|
|
965 |
|
|
966 |
| mth |
|
|
967 |
mth := self method.
|
|
968 |
mth ifNil:[^#__NoProject__].
|
|
969 |
^self method package
|
|
970 |
|
|
971 |
"Created: / 10-10-2007 / 13:03:21 / janfrog"
|
|
972 |
!
|
|
973 |
|
|
974 |
subject
|
|
975 |
^ subjects anyOne
|
|
976 |
|
|
977 |
"Created: / 10-10-2007 / 08:35:21 / janfrog"
|
|
978 |
"Modified: / 24-11-2007 / 09:41:22 / janfrog"
|
|
979 |
!
|
|
980 |
|
|
981 |
subject:anObject
|
|
982 |
subjects := Array with: anObject
|
|
983 |
|
|
984 |
"Created: / 10-10-2007 / 08:35:21 / janfrog"
|
|
985 |
"Modified: / 24-11-2007 / 09:41:33 / janfrog"
|
|
986 |
!
|
|
987 |
|
|
988 |
subjects
|
|
989 |
^ subjects
|
|
990 |
|
|
991 |
"Created: / 24-11-2007 / 09:41:14 / janfrog"
|
|
992 |
!
|
|
993 |
|
|
994 |
subjects:something
|
|
995 |
subjects := something.
|
|
996 |
|
|
997 |
"Created: / 24-11-2007 / 09:41:14 / janfrog"
|
|
998 |
!
|
|
999 |
|
|
1000 |
totalTally
|
|
1001 |
|
|
1002 |
^subjects inject:0 into:[:tally :subject| tally + subject totalTally]
|
|
1003 |
|
|
1004 |
"Created: / 24-11-2007 / 09:43:01 / janfrog"
|
|
1005 |
! !
|
|
1006 |
|
|
1007 |
!VisualProfilerCanvas::CallTreeItem methodsFor:'change & update'!
|
|
1008 |
|
|
1009 |
updateChildren
|
|
1010 |
|
|
1011 |
self removeAll.
|
|
1012 |
self addAll:self createChildren
|
|
1013 |
|
|
1014 |
"Created: / 10-10-2007 / 13:02:13 / janfrog"
|
|
1015 |
! !
|
|
1016 |
|
|
1017 |
!VisualProfilerCanvas::CallTreeItem methodsFor:'comparing'!
|
|
1018 |
|
|
1019 |
shouldBeMergedWith:anotherCallTreeItem
|
|
1020 |
^ self subject methodClass = anotherCallTreeItem subject methodClass
|
|
1021 |
and:[
|
|
1022 |
self subject selector = anotherCallTreeItem subject selector
|
|
1023 |
and:[ self subject isBlock not ]
|
|
1024 |
]
|
|
1025 |
|
|
1026 |
"Created: / 24-11-2007 / 09:50:34 / janfrog"
|
|
1027 |
! !
|
|
1028 |
|
|
1029 |
!VisualProfilerCanvas::CallTreeItem methodsFor:'private'!
|
|
1030 |
|
|
1031 |
mergeChildren: rawChildren
|
|
1032 |
|
|
1033 |
|mergedChildren|
|
|
1034 |
|
|
1035 |
mergedChildren := OrderedCollection new.
|
|
1036 |
[rawChildren isEmpty] whileFalse:
|
|
1037 |
[|childToMerge childrenToMerge|
|
|
1038 |
childToMerge := mergedChildren add:(rawChildren removeFirst).
|
|
1039 |
childrenToMerge := rawChildren select:[:e|e shouldBeMergedWith:childToMerge].
|
|
1040 |
rawChildren removeAll: childrenToMerge.
|
|
1041 |
childrenToMerge do:[:e|childToMerge subjects addAll:e subjects].
|
|
1042 |
].
|
|
1043 |
^mergedChildren
|
|
1044 |
|
|
1045 |
"Created: / 24-11-2007 / 09:20:07 / janfrog"
|
|
1046 |
! !
|
|
1047 |
|
|
1048 |
!VisualProfilerCanvas::CallTreeItem methodsFor:'testing'!
|
|
1049 |
|
|
1050 |
isFiltered
|
|
1051 |
|
|
1052 |
| isFiltered |
|
|
1053 |
isFiltered := false.
|
|
1054 |
self application packageFilter value
|
|
1055 |
ifNotNil:[isFiltered := (self application packageFilter value includes: self methodPackage) not].
|
|
1056 |
^isFiltered
|
|
1057 |
|
|
1058 |
"Created: / 10-10-2007 / 13:09:46 / janfrog"
|
|
1059 |
! !
|
|
1060 |
|
|
1061 |
!VisualProfilerCanvas class methodsFor:'documentation'!
|
|
1062 |
|
|
1063 |
version_CVS
|
|
1064 |
^ '$Header: /cvs/stx/stx/libtool/Tools__VisualProfilerCanvas.st,v 1.1 2011-07-01 13:28:12 cg Exp $'
|
|
1065 |
!
|
|
1066 |
|
|
1067 |
version_SVN
|
|
1068 |
^ '§Id: Tools__VisualProfilerCanvas.st 7486 2009-10-26 22:06:24Z vranyj1 §'
|
|
1069 |
! !
|