LooperProfiler

open class LooperProfiler(threshold: Long, timeUnit: TimeUnit, callback: (Int, Long, String) -> Unit) : Printer

A Printer for looper profiling

Constructors

LooperProfiler
Link copied to clipboard
fun LooperProfiler(threshold: Long = 200L, timeUnit: TimeUnit = MILLISECONDS, callback: (Int, Long, String) -> Unit = { what, duration, message -> val log: (String, String) -> Int = if (duration >= NANOSECONDS.convert(threshold, timeUnit)) Log::w else Log::i log(TAG, "[${"%8d".format(timeUnit.convert(duration, NANOSECONDS))}${TIME_UNIT_SYMBOLS[timeUnit.ordinal]}] ${"%4d".format(what)} : ${findCallback(message) ?: findHandler(message) ?: message}") })

Functions

println
Link copied to clipboard
override fun println(message: String)