StopWatch¶
-
MacroModule
¶ genre Extras
author MeVis Medical Solutions AG
package MeVisLab/Standard
definition helpers.def see also MemoryCache
,LapTimer
keywords Start
,time
,measure
Purpose¶
The module StopWatch
measures the time needed for an operation. There are three different ways of operation:
- Start-Stop: Measures the time between triggering the start and the stop button. Also allows for pause/resume.
- External duration: Measures the time elapsing when a external field is triggered.
- Image computation: Measures the time needed to compute the complete input image.
Better use the Profiler view in MeVisLab.
Usage¶
In order to automatically start an operation in your network when the Start button is pressed, connect the External field to an appropriate trigger field in your network. The time needed for this operation can be measured either in External duration mode or in Start-Stop mode. In the latter case, the Pause or Stop field must be triggered when the operation to be measured is completed.
In the Image Computation mode, connect an image to the module’s input and press Start. The module measures the time needed to cache the complete input image.
Details¶
In order to measure performance times under defined conditions, it is often desirable to clear the MeVisLab image cache before measuring the time needed for an operation.
This can be conveniently done by selecting the Clear Cache option of the StopWatch
module. When this option is enabled, the Clear cache before starting timer
method of the network containing the StopWatch
module is executed.
Parameter Fields¶
Field Index¶
Clear cache before starting timer : Bool |
Running : Bool |
Connect External Trigger from Here : Trigger |
Start : Trigger |
Duration : Float |
Status : String |
Log to console : Bool |
Stop : Trigger |
Mode : Enum |
Update : Trigger |
paused : Bool |
|
Reset : Trigger |
|
Resume : Trigger |
Visible Fields¶
Connect External Trigger from Here¶
-
name:
external
, type:
Trigger
¶ Use this field to connect to an external field from it to trigger a computation.
This field is touched from within when the timer starts.
Mode¶
-
name:
mode
, type:
Enum
, default:
Stop
¶ Defines the mode for the module to measure time.
Values:
Title | Name |
---|---|
Stop | Stop |
External | External |
Image | Image |
Clear cache before starting timer¶
-
name:
clearCache
, type:
Bool
, default:
FALSE
¶ If checked, the image cache of MeVisLab is cleared before starting to take time.
This is important for measuring image computation time because this guarantees that every page is computed and not fetched from the cache.