performance testing on android

13
Android: Performance Testing -Akshay Dashrath

Upload: akshay-dashrath

Post on 27-May-2015

7.260 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Performance Testing on Android

Android: Performance Testing-Akshay Dashrath

Page 2: Performance Testing on Android

Need Speed?

Page 3: Performance Testing on Android

What about?

Page 4: Performance Testing on Android

Tools

• Analysing logs (Trace View)• Heap Dump Analysis• Debug class

Page 5: Performance Testing on Android

Trace View

• Graphical Tool to analyse execution logs

Page 6: Performance Testing on Android

• // start tracing to "/sdcard/test.trace"

Debug.startMethodTracing(“test"); // ... // stop tracing

Debug.stopMethodTracing();• adb pull /sdcard/test.trace C:/• traceview C:/trace.test

Page 7: Performance Testing on Android
Page 8: Performance Testing on Android

Issues

• If a thread exits during profiling, the thread name is not emitted;

• The VM reuses thread IDs. If a thread stops and another starts, they may get the same ID.

• .trace files larger than 8MB cannot be read by the Viewer

Page 9: Performance Testing on Android

Instruction Count

Instructions Executed Method Invocations0

200000

400000

600000

800000

1000000

1200000

1400000

1600000

1800000

349 55

1584331

280490

1570294

160061

Page 10: Performance Testing on Android

Heap Dumps

• C:/adb shell• C:/ chmod 777 /data/misc – In order to make the /data/misc

directory writeable• C:/exit• C:/ adb shell ps• C:/ adb shell kill -10 1234 -------Example• C:/ adb pull /data/misc/heap-dump-tm-pid.hprof

address.hprof• C:/ hprof-conv heap-dump-tm-pid.hprof 4mat.hprof

Page 11: Performance Testing on Android
Page 12: Performance Testing on Android
Page 13: Performance Testing on Android

Questions?