Launch Time of an app

前端 未结 5 945
暗喜
暗喜 2021-01-03 13:05

What is the best way to launch an app and calculate its launch time in android(if it can be done with some code,then its better)

5条回答
  •  无人及你
    2021-01-03 14:05

    In scope of answers above I would like to note, what the Traceview unable to provide the real time, due to JIT is turned off while profiling. The Traceview is the useless tool to monitor the time of executing of source's code. (Traceview is a good tools to check stacktrace only, as mentioned above by using Debug class with startMethodTracing() and stopMethodTracing()).

    I suggest to use systrace (via Eclipse plugin, for an example) this is best tool to calculate the real time of executing (and many other features).

    For more information take a look at: http://developer.android.com/tools/debugging/systrace.html

    Also, I want to note that sometimes systrace will not work (depends from FS mapping).

    You need to check 'system\core\rootdir\init.rc' with correct of 'debugfs' mounted. Should be as: 'mount debugfs /sys/kernel/debug /sys/kernel/debug'

提交回复
热议问题