Confirmed users
975
edits
m (→Usage for start up: Change warning to italics instead of bold) |
(→Usage for start up: Switch code sample from diff to kotlin) |
||
| Line 18: | Line 18: | ||
First, you need to start tracing. Add the following to <code>FenixApplication.kt</code> to measure start up as early as possible: | First, you need to start tracing. Add the following to <code>FenixApplication.kt</code> to measure start up as early as possible: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="kotlin"> | ||
override fun attachBaseContext(base: Context) { | |||
if (base.isMainProcess()) { | |||
Debug.startMethodTracingSampling( | |||
"startup", | |||
0, | |||
TimeUnit.MILLISECONDS.toMicros(1).toInt() | |||
) | |||
} | |||
super.attachBaseContext(base) | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||