Android Performance - yszheda/wiki GitHub Wiki

Profile

Time Measurement

SystemClock.currentThreadTimeMillis()
System.nanoTime()

android-ndk-profiler

ndk-perf / fplutil

simpleperf

Event type 'cpu-cycles' is not supported by the kernel

Systrace

shinyprofiler

perf

TraceView

// Starts recording a trace log with the name you provide. For example, the
// following code tells the system to start recording a .trace file to the
// device with the name "sample.trace".
Debug.startMethodTracing("sample");
...
// The system begins buffering the generated trace data, until your
// application calls stopMethodTracing(), at which time it writes
// the buffered data to the output file.
Debug.stopMethodTracing();

Memory