DebugStopWatchModel
Model for controling stop watches, allows simplistic micro-benchmarking at rendering level
implements: hash
bundle: online channel standard (oc)
since 2017.1.0
Model for controling stop watches, allows simplistic micro-benchmarking at rendering level
Allows simplistic micro-benchmarking at the rendering level
This model is made accessible by the OCFreemarkerExtensionService with the global access path 'cs.debug.stopWatch'.
Methods
cs.debug.stopWatch.split(String:key, String:message) ↦ debug text containing key, message and time
since 2017.1
Takes a snapshot of the stopwatch identified by 'key'. Logs and returns elapsed time and optional message.
- Example:
cs.debug.stopWatch.split('myStopWatch')
cs.debug.stopWatch.start(String:key, String:message) ↦ debug text containing key, message and time
since 2017.1
Starts a stopwatch identified by 'key'. Logs and returns optional message.
- Example:
cs.debug.stopWatch.start('myStopWatch')
cs.debug.stopWatch.stop(String:key, String:message) ↦ debug text containing key, message and time
since 2017.1
Stops (and clears) the stopwatch identified by 'key'. Logs and returns elapsed time and optional message.
- Example:
cs.debug.stopWatch.stop('myStopWatch')