eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Tools::Profiler':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: Profiler (in Tools)


Inheritance:

   Object
   |
   +--MessageTally
      |
      +--Tools::Profiler

Package:
stx:libtool
Category:
Interface-Browsers-New-Profiler
Version:
rev: 1.5 date: 2012/11/04 21:42:25
user: cg
file: Tools__Profiler.st directory: libtool
module: stx stc-classLibrary: libtool

Description:


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.


Class protocol:

instance creation
o  readStatisticsFrom: stream

messageTally compatible interface
o  spyDetailedOn: aBlock
execute a Block; then open a visual profiler.
Return the value from aBlock

o  spyOn: aBlock
execute a Block; then open a visual profiler.
Return the value from aBlock

o  spyOn: aBlock interval: interval
execute a Block; then open a visual profiler.
Return the value from aBlock

profiling
o  profile: aBlock
run aBlock, return profile information

o  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] ] 

o  profileDetailedOn: aBlock
run aBlock, return profile information; sample tick is 1ms

o  profileOn: aBlock
run aBlock, return profile information; sample tick is 10ms

o  profileOn: aBlock interval: interval
run aBlock, return profile information; sample tick is interval (ms)


Instance protocol:

I/O
o  storeStatisticsOn: stream

accessing
o  computationTime

o  notes

o  notes: something

o  retVal

o  startTimestamp

profiling
o  profileOn: aBlock interval: interval


Examples:


    | 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.


ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Wed, 20 Mar 2019 00:57:49 GMT