|
Class: Profiler (in Tools)
Object
|
+--MessageTally
|
+--Tools::Profiler
- Package:
- stx:libtool
- Category:
- Interface-Browsers-New-Profiler
- Version:
- rev:
1.6
date: 2021/01/20 15:30:21
- user: cg
- file: Tools__Profiler.st directory: libtool
- module: stx stc-classLibrary: libtool
a visual profiler;
provides the same interface as a MessageTally, but does not show the
sample data on a stream, instead a browser is opened, allowing easy
navigation through the sampled code.
copyrightCOPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
All Rights Reserved
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the 'Software'), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
instance creation
-
readStatisticsFrom: stream
-
messageTally compatible interface
-
spyDetailedOn: aBlock
-
execute a Block; then open a visual profiler.
Return the value from aBlock
-
spyOn: aBlock
-
execute a Block; then open a visual profiler.
Return the value from aBlock
-
spyOn: aBlock interval: interval
-
execute a Block; then open a visual profiler.
Return the value from aBlock
profiling
-
profile: aBlock
-
run aBlock, return profile information
-
profileAndOpenBrowser: aBlock
-
run aBlock, open a browser on the profile information; sample tick is 10ms
Usage example(s):
Tools::Profiler profileAndOpenBrowser:[ 10000 timesRepeat:[100 factorial] ]
|
-
profileDetailedOn: aBlock
-
run aBlock, return profile information; sample tick is 1ms
-
profileOn: aBlock
-
run aBlock, return profile information; sample tick is 10ms
-
profileOn: aBlock interval: interval
-
run aBlock, return profile information; sample tick is interval (ms)
I/O
-
storeStatisticsOn: stream
-
accessing
-
computationTime
-
-
notes
-
-
notes: something
-
-
retVal
-
-
startTimestamp
-
profiling
-
profileOn: aBlock interval: interval
-
| profiler |
profiler := Tools::Profiler profileOn:[1 to: 1000 do:[:i|i factorial]] interval: 10.
Tools::NewSystemBrowser browseProfilerStatistics: profiler
|
Tools::Profiler spyOn:[1 to: 1000 do:[:i|i factorial]] interval: 10.
|
|