Londroid Akshay Performance

1,189 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Londroid Akshay Performance

  1. 1. Android: Performance Testing<br />-Akshay Dashrath<br />
  2. 2. Need Speed?<br />
  3. 3. What about?<br />
  4. 4. Tools<br />Analysing logs (Trace View)<br />Heap Dump Analysis<br />Debug class<br />
  5. 5. Trace View<br />Graphical Tool to analyse execution logs<br />
  6. 6. // start tracing to &quot;/sdcard/test.trace&quot;    Debug.startMethodTracing(“test&quot;);   // ...    // stop tracing    Debug.stopMethodTracing();<br />adb pull /sdcard/test.trace C:/<br />traceview C:/trace.test<br />
  7. 7.
  8. 8. Issues<br />If a thread exits during profiling, the thread name is not emitted;<br />The VM reuses thread IDs. If a thread stops and another starts, they may get the same ID.<br />.trace files larger than 8MB cannot be read by the Viewer<br />
  9. 9. Instruction Count<br />
  10. 10. Heap Dumps<br />C:/adb shell<br />C:/ chmod 777 /data/misc – In order to make the /data/misc directory writeable<br />C:/exit<br />C:/ adb shell ps<br />C:/ adb shell kill -10 1234 -------Example<br />C:/ adb pull /data/misc/heap-dump-tm-pid.hprofaddress.hprof<br />C:/ hprof-conv heap-dump-tm-pid.hprof4mat.hprof<br />
  11. 11.
  12. 12.
  13. 13. Questions?<br />

×