PlumeTimer

object PlumeTimer: Any

Timer to track time elapsed for Plume operations.

Methods

startTimerOn

fun startTimerOn(vararg key: ExtractorTimeKey): (vararg key: ExtractorTimeKey)

Starts a timer for the given operation as per ExtractorTimeKey.

Parameters

Name Description
vararg key: ExtractorTimeKey

The key(s) on which to start the timer on.

ReturnValue

Name Description
(vararg key: ExtractorTimeKey)

stopTimerOn

fun stopTimerOn(vararg key: ExtractorTimeKey): (vararg key: ExtractorTimeKey)

Stops a timer for the given operation as per ExtractorTimeKey.

Parameters

Name Description
vararg key: ExtractorTimeKey

The key(s) on which to stop the timer on.

ReturnValue

Name Description
(vararg key: ExtractorTimeKey)

measure

fun measure(vararg key: ExtractorTimeKey, f: ()->Unit)

Measures the time the given function takes to complete. This wraps the function with startTimerOn and stopTimerOn with all the given ExtractorTimeKeys.

Parameters

Name Description
vararg key: ExtractorTimeKey

The key(s) on which to measure.

f: ()->Unit

The function to measure.

ReturnValue

Name Description
Unit

stopAll

fun stopAll(): ()

Stops all timers.

ReturnValue

Name Description
()

reset

fun reset(): ()

Resets all timers.

ReturnValue

Name Description
()

getTimes

fun getTimes(): Map<ExtractorTimeKey, Long>

Gets all the recorded times.

ReturnValue

Name Description
Map<ExtractorTimeKey, Long>