Perf.start
Perf.start($taskId, $detail='') -> null
Description
Start a Perf task, with an optional detail String.
Results are displayed in the Perf Panel.
fun createThumb(imageFileName) { Perf.start('createThumbnail', 'file: ' ~ imageFileName) // ... modify pixels ... Perf.stop() }
Nested Tasks
Nested tasks are possible, like this:
Perf.start('outerTask') outerTask() if $doSubTask { Perf.start('innerTask') innerTask() Perf.stop() } Perf.stop()