SlideShare a Scribd company logo
Profiling
Hubert Hesse
Software Profiling Seminar 2013
1
What is Android?
• First Developed by Android, Inc., since 2005
part of Google
• JAVA because of support of Tool Support and
Open Source Activity [Bornstein2008]
• First Android phone was sold in October 2008
HTC Dream (aka G1) iPhone
06/2007
2
Latest Addition: Tablets
• With release of Nexus 7 2012 upsurge in
tablet market
• Android 4 – Design Guidelines
iPad
04/2010
3
Dalvik Executable
• Convert java .class files into .dex format
• dx: Java Bytecode -> an alternative instruction
set compatible with Dalvik VM.
Write an Android Applications in any language
that compile to .class
4
DalvikVMInternalsDanBornstein(Google)GoogleI/O2008
https://sites.google.com/site/io/dalvik-vm-internals/
5
Why Profiling?
• When apps don’t perform as expected or
advertised, 99% of respondents said they
would take action: [Apigee2012]
Delete
immediately
33%
Delete if it
freeze > 30s
28%
Tell my peers
how bad it is
24%
Complain on
social media
15%
6
Example: Google I/O App 2012
• (https://code.google.com/p/iosched/)
Default state todayAfter network/API? limit 7
Google I/O App 2012
• Do you notice the difference?
≈ 5% CPU ≈ 80% CPU
8
Overview Profiling
From System profiling to UI Profiling:
On the device
Dalvik Debug Monitor
Static analysis
9
Eclipse
Android Monitor
Standalone
On the device (Developer options)
Monitoring>Show CPU usage Drawing>Show Layout bounds
10
Developer options II
Drawing>Show GPU view updates Drawing>Show GPU overdrawn
11
Overview Profiling
• Dalvik Debug Monitor Server (DDMS)
• Running multiple Debugger Monitor sessions
through an USB cable?
DDMS
On the device
Static analysis
12
Remote Java Profiling
Client Device
adb adbd
TCP/IP over
USB Cable
DDMS JDWP
Android
Runtime
Application Framework
App1 App2Debugger Eclipse
Screengrab ...
vendor-
defined
packets
14
Debugger
Port: 8600
15
16
System View: Idle CPU usage ≈ 20%
17
System View: Idle CPU usage ≈ 99%
18
OpenGL Profiling
19
Thread View: utime: user time
stime: system time
20
21
Method Profiling
22
Demo
23
Annotate with
Start/stopmethodprofiling
Debug.startMethodTracing(“file");
// start tracing to “/mnt/sdcard/file.trace"
// ...
// stop tracing
Debug.stopMethodTracing();
24
25
REMOVE Menu BAR
26
Fix?
27
Snapshot (forces GC)
Tracking over Time (start, stop, force GC)
Convert to heap to Eclipse MAT compatible format (with hprof-conv)
28
Network l/O
Emulator Control
Telephony Status - network status (home, roaming, searching),
and speed and latency (GPRS, EDGE, UTMS, HSDPA).
Telephony Actions - Mock calls and SMS
Location Controls – Mock location
29
System Profiling with systrace.py
30
Bug in DDMS/Eclipse version.
$ python systrace.py --set-tags=gfx,view,wm
$ adb shell stop
$ adb shell start
$ python systrace.py --cpu-freq --cpu-load --time=10 -o mytracefile.html
Demo
Hierachy viewer
standalone tool
31
Relative Measure,
Layout, Draw
Performance
Screen
appearance
Absolute Measure,
Layout, Draw
Performance
32
Overview Profiling
From System profiling to UI Profiling:
Static analysis
On the device
DDMS
33
LINT
Static Code Analysis
34
Thank you.
Questions?
35
REFERENCES
• [Apigee2012],
http://apigee.com/about/pressrelease/apigee
-survey-users-reveal-top-frustrations-lead-
bad-mobile-app-reviews
36

More Related Content

Similar to Profiling Android Applications

Begining Android Development
Begining Android DevelopmentBegining Android Development
Begining Android DevelopmentHayi Nukman
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspectiveGunjan Kumar
 
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...Pietro F. Maggi
 
Android workshop material
Android workshop materialAndroid workshop material
Android workshop materialReza Yogaswara
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Androidnatdefreitas
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalNAVER D2
 
Google Glass, the GDK, and HTML5
Google Glass, the GDK, and HTML5Google Glass, the GDK, and HTML5
Google Glass, the GDK, and HTML5Oswald Campesato
 
ANDROID presentation prabal
ANDROID presentation prabalANDROID presentation prabal
ANDROID presentation prabalPrabal Tyagi
 
Synapseindia android apps intro to android development
Synapseindia android apps  intro to android developmentSynapseindia android apps  intro to android development
Synapseindia android apps intro to android developmentSynapseindiappsdevelopment
 
Mobile application and Game development
Mobile application and Game developmentMobile application and Game development
Mobile application and Game developmentWomen In Digital
 
Android application developement
Android application developementAndroid application developement
Android application developementSANJAY0830
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App DevelopmentAndri Yadi
 
Android task manager project presentation
Android task manager project presentationAndroid task manager project presentation
Android task manager project presentationAkhilesh Jaiswal
 
GDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android NGDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android NImam Raza
 

Similar to Profiling Android Applications (20)

Begining Android Development
Begining Android DevelopmentBegining Android Development
Begining Android Development
 
Ganar el desafio android
Ganar el desafio androidGanar el desafio android
Ganar el desafio android
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspective
 
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...
EMEA AppForum 2015 Android KitKat & Lollipop - new features for enterprise de...
 
Android workshop material
Android workshop materialAndroid workshop material
Android workshop material
 
Android Programming
Android ProgrammingAndroid Programming
Android Programming
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
 
Google Glass, the GDK, and HTML5
Google Glass, the GDK, and HTML5Google Glass, the GDK, and HTML5
Google Glass, the GDK, and HTML5
 
ANDROID presentation prabal
ANDROID presentation prabalANDROID presentation prabal
ANDROID presentation prabal
 
Synapseindia android apps intro to android development
Synapseindia android apps  intro to android developmentSynapseindia android apps  intro to android development
Synapseindia android apps intro to android development
 
Mobile application and Game development
Mobile application and Game developmentMobile application and Game development
Mobile application and Game development
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android development beginners faq
Android development  beginners faqAndroid development  beginners faq
Android development beginners faq
 
Android application developement
Android application developementAndroid application developement
Android application developement
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App Development
 
Android task manager project presentation
Android task manager project presentationAndroid task manager project presentation
Android task manager project presentation
 
Android Attacks
Android AttacksAndroid Attacks
Android Attacks
 
Android
Android Android
Android
 
GDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android NGDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android N
 

Recently uploaded

"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform EngineeringJemma Hussein Allen
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
КАТЕРИНА АБЗЯТОВА «Ефективне планування тестування ключові аспекти та практ...
КАТЕРИНА АБЗЯТОВА  «Ефективне планування тестування  ключові аспекти та практ...КАТЕРИНА АБЗЯТОВА  «Ефективне планування тестування  ключові аспекти та практ...
КАТЕРИНА АБЗЯТОВА «Ефективне планування тестування ключові аспекти та практ...QADay
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesThousandEyes
 

Recently uploaded (20)

"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
КАТЕРИНА АБЗЯТОВА «Ефективне планування тестування ключові аспекти та практ...
КАТЕРИНА АБЗЯТОВА  «Ефективне планування тестування  ключові аспекти та практ...КАТЕРИНА АБЗЯТОВА  «Ефективне планування тестування  ключові аспекти та практ...
КАТЕРИНА АБЗЯТОВА «Ефективне планування тестування ключові аспекти та практ...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 

Profiling Android Applications