SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
Performance-based Guidelines
for Energy-efficient Mobile
Applications
Luis Cruz, Rui Abreu
luiscruz@fe.up.pt
rui@computer.org
Motivation
• Mobile and wearable devices
are very popular nowadays
• Users expect all-day battery
life on their devices
• Impact of energy
improvements in mobile
applications is hard to
measure and time consuming
2
Hypothesis
Performance based optimizations
can be used to ship energy efficient
Android applications.
3
Research Questions
RQ1: Can programming practices be blindly applied
in order to improve energy efficiency in an
Android application?
RQ2: Do best practices for performance improvement
also improve energy efficiency?
RQ3: Do these best practices actually have an impact
on real mature Android applications?
4
Research Questions
RQ1: Can programming practices be blindly applied
in order to improve energy efficiency in an
Android application?
RQ2: Do best practices for performance improvement
also improve energy efficiency?
RQ3: Do these best practices actually have an impact
on real mature Android applications?
5
Research Questions
RQ1: Can programming practices be blindly applied
in order to improve energy efficiency in an
Android application?
RQ2: Do best practices for performance improvement
also improve energy efficiency?
RQ3: Do these best practices actually have an impact
on real mature Android applications?
6
Methodology
A. Android application selection
B. Static analysis and refactoring
C. Generation of automatic UI tests
D. Energy measurement tools setup
E. Experiments execution
F. Data analysis
7
A. Android application
selection
• 6 open-source Apps available at Google Play and/or F-Droid
8
Writeily ProLoop - Habit Tracker Talalarmo
GnuCash Simple Gallery Acrylic Paint
B. Static analysis and
refactoring
• Android Lint to detect code smells
• 8 performance-based code smells were studied
• Each code smell was fixed and a new version of
the app was generatedTABLE II: Anti-patterns found in open source applications.
Anti-Pattern Loop - Habit Tracker Writeily Pro Talalarmo GnuCash Acrylic Paint Simple Gallery
DrawAllocation - - • - • -
WakeLock - - • - - -
Recycle - - - • - -
ObsoleteLayoutParam - - - • - -
ViewHolder - • - - - -
Overdraw • • - - • •
UnusedResources • • - - - -
UselessParent - • - - - -
9
C. Generation of automatic
UI tests
• Scripts to mimic user interaction
• Manually created using Android View Client
• Allows replication of experiments
10
• Run apps in bare-board
computer ODROID
• Power sensors for main
CPU, secondary CPU,
memory, and GPU
• 4 samples per second
D. Energy measurement
tools setup
ODROID-XU
©2013 Hardkernel co.
11
D. Energy measurement
tools setup
• Power is an
instantaneous
measurement (watts)
• Energy is a
measurement of
power over a period
of time (joules)
E. Experiments execution
• For every fixed code
smell the experiment
was equally executed
30 times for statistical
validation
Controller
Computer
ODROID
Uninstall App &
remove user data
Install APK
Upload Energy
Logger script
Start Energy Logger
Return Energy
Logger PID
UI interaction
Open App
Return Energy Logs
Open App
Stop Energy Logger
(PID)
ADB through USB
13
F. Data analysis
• Power readings were down-sampled to 1 second
• Energy consumptions that differ 2 standard
deviations from the mean were eliminated
14
Significance Tests
15
Welch’s t-test results
UnusedResource,
and UselessParent
did not provide
significant results.
Fig. 9: Energy consumption for Simple Gallery.
TABLE IV: Significance Welch’s t-test results
Application Pattern Test p-value
Loop - Habit Tracker
Overdraw -0.56 .5784
UnusedResources -0.83 .4121
All -0.08 .9362
Writeily Pro
Overdraw -0.10 .9180
UnusedResources -0.03 .9790
ViewHolder 3.02 .0038
UselessParent 0.20 .8434
All 2.93 .0049
Talalarmo
DrawAllocation 4.18 .0001
WakeLock 4.43 < .0001
All 2.16 .0353
GnuCash
ObsoleteLayoutParam 2.57 .0127
Recycle 2.55 .0140
All 2.47 .0164
AcrylicPaint
DrawAllocation 0.64 .5221
Overdraw 45.88 < .0001
All -5.84 < .0001
Simple Gallery Overdraw -4.04 .0010
DrawAllocation also
Although it occurred in
Talalarmo, we observed
tion was also tested wi
statistically significant im
picker redraw routine. U
debug view updates, we
a single time when a ne
fix in the overall execu
been the reason for not
consumption.
Fixing incorrect Wake
ment of 1%. In the ori
lock was not being pro
to energy drain in part
application is no longer
was not properly releas
power state. This woul
given the nature of ou
effectively tested. Thus,
in a real case scenario.
ObsoleteLayoutParam
Effect SizeTABLE V: Effect size of significant patterns
Application Pattern MD Cohen’s d IMP (%) Savings (min)
Writeily Pro
ViewHolder # -5.39 -0.78 4.50 65
All # -5.42 -0.76 4.53 65
Talalarmo
DrawAllocation # -0.86 -1.11 1.47 21
WakeLock # -0.85 -1.17 1.46 21
All # -0.48 -0.57 0.82 12
GnuCash
ObsoleteLayoutParam # -1.41 -0.67 0.72 10
Recycle # -1.28 -0.66 0.65 9
All # -1.53 -0.64 0.78 11
Acrylic Paint
Overdraw " 1.42 1.64 -2.26 -33
All " 1.37 1.51 -2.18 -31
Simple Gallery Overdraw " 3.08 1.04 -2.11 -30
WakeLock usage also provided an improve-
original version of Talalarmo, the wake
properly released which could have lead
itself several times. In this case, having an
important, and fixing Overdraw is expected
ing results. On the other hand, if a view is be16
View Holder has the biggest impact 😀 while
Overdraw increased energy consumption 😕
Research Questions
RQ1: Can programming practices be blindly applied in order to improve
energy efficiency in an Android application?
Yes, apps had energy efficiency improved without changing the
feature set and without requiring previous knowledge of the app.
RQ2: Do best practices for performance improvement also improve energy
efficiency?
Not necessarily. While five optimizations improved energy
efficiency, two did not affect, and one had a negative impact.
RQ3: Do these best practices actually have an impact on real mature Android
applications?
Yes, three out of six real apps improved energy efficiency.
17
Conclusions & Future Work
• Anti-patterns ViewHolder, DrawAllocation,
WakeLock, ObsoleteLayoutParam, and Recycle have
to be considered when developing energy-efficient
apps
• Extend the study to other optimizations
• Automatic refactoring (Autorefactor, FB pfff, Walkmod,
Kadabra?)
• Label mobile applications with respect to energy
efficiency
18
Hypothesis
Performance based optimizations
can be used to ship energy efficient
Android applications.
3
Effect SizeTABLE V: Effect size of significant patterns
Application Pattern MD Cohen’s d IMP (%) Savings (min)
Writeily Pro
ViewHolder # -5.39 -0.78 4.50 65
All # -5.42 -0.76 4.53 65
Talalarmo
DrawAllocation # -0.86 -1.11 1.47 21
WakeLock # -0.85 -1.17 1.46 21
All # -0.48 -0.57 0.82 12
GnuCash
ObsoleteLayoutParam # -1.41 -0.67 0.72 10
Recycle # -1.28 -0.66 0.65 9
All # -1.53 -0.64 0.78 11
Acrylic Paint
Overdraw " 1.42 1.64 -2.26 -33
All " 1.37 1.51 -2.18 -31
Simple Gallery Overdraw " 3.08 1.04 -2.11 -30
WakeLock usage also provided an improve-
he original version of Talalarmo, the wake
g properly released which could have lead
itself several times. In this case, having an efficient redraw is
important, and fixing Overdraw is expected to create interest-
ing results. On the other hand, if a view is being created several16
View Holder has the biggest impact ! while
Overdraw increased energy consumption "
Research Questions
RQ1: Can programming practices be blindly applied in order to improve
energy efficiency in an Android application?
Yes, apps had energy efficiency improved without changing the
feature set and without requiring previous knowledge of the app.
RQ2: Do best practices for performance improvement also improve energy
efficiency?
Not necessarily. While five optimizations improved energy
efficiency, two did not affect, and one had a negative impact.
RQ3: Do these best practices actually have an impact on real mature Android
applications?
Yes, three out of six real apps improved energy efficiency.
17
19
Full Paper
Performance-based Guidelines for Energy-
efficient Mobile Applications
Luis Cruz, Rui Abreu
All source code and
collected data
20

Contenu connexe

Similaire à Performance-based Guidelines for Energy-efficient Mobile Applications

Green droid automated diagnosis of energy inefficiency for smartphone applica...
Green droid automated diagnosis of energy inefficiency for smartphone applica...Green droid automated diagnosis of energy inefficiency for smartphone applica...
Green droid automated diagnosis of energy inefficiency for smartphone applica...JPINFOTECH JAYAPRAKASH
 
Altitude SF 2017: Granular, Precached, & Under Budget
Altitude SF 2017: Granular, Precached, & Under BudgetAltitude SF 2017: Granular, Precached, & Under Budget
Altitude SF 2017: Granular, Precached, & Under BudgetFastly
 
Portfolio - Muhammad Ismail Sheikh
Portfolio - Muhammad Ismail SheikhPortfolio - Muhammad Ismail Sheikh
Portfolio - Muhammad Ismail SheikhM. Ismail Sheikh
 
Static Energy Prediction in Software: A Worst-Case Scenario Approach
Static Energy Prediction in Software: A Worst-Case Scenario ApproachStatic Energy Prediction in Software: A Worst-Case Scenario Approach
Static Energy Prediction in Software: A Worst-Case Scenario ApproachGreenLabAtDI
 
HeadSpin Code Profiling
HeadSpin Code ProfilingHeadSpin Code Profiling
HeadSpin Code ProfilingHeadspin INC
 
Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...
Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...
Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...rickschwar
 
How to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting PerformanceHow to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting Performancerickschwar
 
Design Patterns Facilitated by Geode's WAN Distribution
Design Patterns Facilitated by Geode's WAN DistributionDesign Patterns Facilitated by Geode's WAN Distribution
Design Patterns Facilitated by Geode's WAN DistributionVMware Tanzu
 
Final Exam Questions Fall03
Final Exam Questions Fall03Final Exam Questions Fall03
Final Exam Questions Fall03Radu_Negulescu
 
Solar Based Multiple Charger( System Engineering)
Solar Based Multiple Charger( System Engineering)Solar Based Multiple Charger( System Engineering)
Solar Based Multiple Charger( System Engineering)Omkar Rane
 
GREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONE
GREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONEGREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONE
GREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONEpihu281
 
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...DataWorks Summit
 
EE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robotEE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robotPraneel Chand
 
Accelerometer Controller Robot
Accelerometer Controller RobotAccelerometer Controller Robot
Accelerometer Controller RobotNathan Raj
 

Similaire à Performance-based Guidelines for Energy-efficient Mobile Applications (20)

Green droid automated diagnosis of energy inefficiency for smartphone applica...
Green droid automated diagnosis of energy inefficiency for smartphone applica...Green droid automated diagnosis of energy inefficiency for smartphone applica...
Green droid automated diagnosis of energy inefficiency for smartphone applica...
 
Altitude SF 2017: Granular, Precached, & Under Budget
Altitude SF 2017: Granular, Precached, & Under BudgetAltitude SF 2017: Granular, Precached, & Under Budget
Altitude SF 2017: Granular, Precached, & Under Budget
 
Portfolio - Muhammad Ismail Sheikh
Portfolio - Muhammad Ismail SheikhPortfolio - Muhammad Ismail Sheikh
Portfolio - Muhammad Ismail Sheikh
 
Static Energy Prediction in Software: A Worst-Case Scenario Approach
Static Energy Prediction in Software: A Worst-Case Scenario ApproachStatic Energy Prediction in Software: A Worst-Case Scenario Approach
Static Energy Prediction in Software: A Worst-Case Scenario Approach
 
greendroid ppts
greendroid pptsgreendroid ppts
greendroid ppts
 
HeadSpin Code Profiling
HeadSpin Code ProfilingHeadSpin Code Profiling
HeadSpin Code Profiling
 
The road to green code
The road to green codeThe road to green code
The road to green code
 
Mobilesoft 2017 Keynote
Mobilesoft 2017 KeynoteMobilesoft 2017 Keynote
Mobilesoft 2017 Keynote
 
Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...
Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...
Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...
 
How to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting PerformanceHow to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting Performance
 
Design Patterns Facilitated by Geode's WAN Distribution
Design Patterns Facilitated by Geode's WAN DistributionDesign Patterns Facilitated by Geode's WAN Distribution
Design Patterns Facilitated by Geode's WAN Distribution
 
Final Exam Questions Fall03
Final Exam Questions Fall03Final Exam Questions Fall03
Final Exam Questions Fall03
 
Solar Based Multiple Charger( System Engineering)
Solar Based Multiple Charger( System Engineering)Solar Based Multiple Charger( System Engineering)
Solar Based Multiple Charger( System Engineering)
 
GREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONE
GREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONEGREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONE
GREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONE
 
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
 
Unit 3 part2
Unit 3 part2Unit 3 part2
Unit 3 part2
 
Energy saving policies final
Energy saving policies finalEnergy saving policies final
Energy saving policies final
 
REPORT.pdf
REPORT.pdfREPORT.pdf
REPORT.pdf
 
EE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robotEE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robot
 
Accelerometer Controller Robot
Accelerometer Controller RobotAccelerometer Controller Robot
Accelerometer Controller Robot
 

Plus de MobileSoft

Predicting Android Application Security and Privacy Risk With Static Code Met...
Predicting Android Application Security and Privacy Risk With Static Code Met...Predicting Android Application Security and Privacy Risk With Static Code Met...
Predicting Android Application Security and Privacy Risk With Static Code Met...MobileSoft
 
A Framework for Regression Testing of Outdoor Mobile Applications
A Framework for Regression Testing of Outdoor Mobile ApplicationsA Framework for Regression Testing of Outdoor Mobile Applications
A Framework for Regression Testing of Outdoor Mobile ApplicationsMobileSoft
 
Who Changed You? Obfuscator Identification for Android
Who Changed You? Obfuscator Identification for AndroidWho Changed You? Obfuscator Identification for Android
Who Changed You? Obfuscator Identification for AndroidMobileSoft
 
Mobile App Development and Management: Results from a Qualitative Investigation
Mobile App Development and Management: Results from a Qualitative InvestigationMobile App Development and Management: Results from a Qualitative Investigation
Mobile App Development and Management: Results from a Qualitative InvestigationMobileSoft
 
Towards Mobile Twin Peaks for App Development
Towards Mobile Twin Peaks for App DevelopmentTowards Mobile Twin Peaks for App Development
Towards Mobile Twin Peaks for App DevelopmentMobileSoft
 
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic RefactoringLeafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic RefactoringMobileSoft
 
Same App, Different App Stores: A comparative Study
Same App, Different App Stores: A comparative StudySame App, Different App Stores: A comparative Study
Same App, Different App Stores: A comparative StudyMobileSoft
 
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...MobileSoft
 
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...MobileSoft
 
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile AppsIFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile AppsMobileSoft
 
Performance-based Guidelines for Energy Efficient Mobile Applications
Performance-based Guidelines for Energy Efficient Mobile ApplicationsPerformance-based Guidelines for Energy Efficient Mobile Applications
Performance-based Guidelines for Energy Efficient Mobile ApplicationsMobileSoft
 
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...MobileSoft
 
Authoring Tool for Location-based Learning Experiences
Authoring Tool for Location-based Learning ExperiencesAuthoring Tool for Location-based Learning Experiences
Authoring Tool for Location-based Learning ExperiencesMobileSoft
 
ACCUSE: Helping Users to minimize Android App Privacy Concerns
ACCUSE: Helping Users to minimize Android App Privacy ConcernsACCUSE: Helping Users to minimize Android App Privacy Concerns
ACCUSE: Helping Users to minimize Android App Privacy ConcernsMobileSoft
 
Automatically Locating Malicious Packages in Piggybacked Android Apps
Automatically Locating Malicious Packages in Piggybacked Android AppsAutomatically Locating Malicious Packages in Piggybacked Android Apps
Automatically Locating Malicious Packages in Piggybacked Android AppsMobileSoft
 
From reactive toproactive mobile security
From reactive toproactive mobile securityFrom reactive toproactive mobile security
From reactive toproactive mobile securityMobileSoft
 
Processing in Mobile Applications: A Case Study
Processing in Mobile Applications: A Case StudyProcessing in Mobile Applications: A Case Study
Processing in Mobile Applications: A Case StudyMobileSoft
 
Rethinking the Mobile Code Offloading Paradigm: From Concept to Practice
Rethinking the Mobile Code Offloading Paradigm: From Concept to PracticeRethinking the Mobile Code Offloading Paradigm: From Concept to Practice
Rethinking the Mobile Code Offloading Paradigm: From Concept to PracticeMobileSoft
 
Generating Predicate Callback Summaries for the Android Framework
Generating Predicate Callback Summaries for the Android FrameworkGenerating Predicate Callback Summaries for the Android Framework
Generating Predicate Callback Summaries for the Android FrameworkMobileSoft
 
MobileSoft2017 Opening
MobileSoft2017 OpeningMobileSoft2017 Opening
MobileSoft2017 OpeningMobileSoft
 

Plus de MobileSoft (20)

Predicting Android Application Security and Privacy Risk With Static Code Met...
Predicting Android Application Security and Privacy Risk With Static Code Met...Predicting Android Application Security and Privacy Risk With Static Code Met...
Predicting Android Application Security and Privacy Risk With Static Code Met...
 
A Framework for Regression Testing of Outdoor Mobile Applications
A Framework for Regression Testing of Outdoor Mobile ApplicationsA Framework for Regression Testing of Outdoor Mobile Applications
A Framework for Regression Testing of Outdoor Mobile Applications
 
Who Changed You? Obfuscator Identification for Android
Who Changed You? Obfuscator Identification for AndroidWho Changed You? Obfuscator Identification for Android
Who Changed You? Obfuscator Identification for Android
 
Mobile App Development and Management: Results from a Qualitative Investigation
Mobile App Development and Management: Results from a Qualitative InvestigationMobile App Development and Management: Results from a Qualitative Investigation
Mobile App Development and Management: Results from a Qualitative Investigation
 
Towards Mobile Twin Peaks for App Development
Towards Mobile Twin Peaks for App DevelopmentTowards Mobile Twin Peaks for App Development
Towards Mobile Twin Peaks for App Development
 
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic RefactoringLeafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
 
Same App, Different App Stores: A comparative Study
Same App, Different App Stores: A comparative StudySame App, Different App Stores: A comparative Study
Same App, Different App Stores: A comparative Study
 
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
 
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
 
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile AppsIFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
 
Performance-based Guidelines for Energy Efficient Mobile Applications
Performance-based Guidelines for Energy Efficient Mobile ApplicationsPerformance-based Guidelines for Energy Efficient Mobile Applications
Performance-based Guidelines for Energy Efficient Mobile Applications
 
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
 
Authoring Tool for Location-based Learning Experiences
Authoring Tool for Location-based Learning ExperiencesAuthoring Tool for Location-based Learning Experiences
Authoring Tool for Location-based Learning Experiences
 
ACCUSE: Helping Users to minimize Android App Privacy Concerns
ACCUSE: Helping Users to minimize Android App Privacy ConcernsACCUSE: Helping Users to minimize Android App Privacy Concerns
ACCUSE: Helping Users to minimize Android App Privacy Concerns
 
Automatically Locating Malicious Packages in Piggybacked Android Apps
Automatically Locating Malicious Packages in Piggybacked Android AppsAutomatically Locating Malicious Packages in Piggybacked Android Apps
Automatically Locating Malicious Packages in Piggybacked Android Apps
 
From reactive toproactive mobile security
From reactive toproactive mobile securityFrom reactive toproactive mobile security
From reactive toproactive mobile security
 
Processing in Mobile Applications: A Case Study
Processing in Mobile Applications: A Case StudyProcessing in Mobile Applications: A Case Study
Processing in Mobile Applications: A Case Study
 
Rethinking the Mobile Code Offloading Paradigm: From Concept to Practice
Rethinking the Mobile Code Offloading Paradigm: From Concept to PracticeRethinking the Mobile Code Offloading Paradigm: From Concept to Practice
Rethinking the Mobile Code Offloading Paradigm: From Concept to Practice
 
Generating Predicate Callback Summaries for the Android Framework
Generating Predicate Callback Summaries for the Android FrameworkGenerating Predicate Callback Summaries for the Android Framework
Generating Predicate Callback Summaries for the Android Framework
 
MobileSoft2017 Opening
MobileSoft2017 OpeningMobileSoft2017 Opening
MobileSoft2017 Opening
 

Dernier

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 

Dernier (20)

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 

Performance-based Guidelines for Energy-efficient Mobile Applications

  • 1. Performance-based Guidelines for Energy-efficient Mobile Applications Luis Cruz, Rui Abreu luiscruz@fe.up.pt rui@computer.org
  • 2. Motivation • Mobile and wearable devices are very popular nowadays • Users expect all-day battery life on their devices • Impact of energy improvements in mobile applications is hard to measure and time consuming 2
  • 3. Hypothesis Performance based optimizations can be used to ship energy efficient Android applications. 3
  • 4. Research Questions RQ1: Can programming practices be blindly applied in order to improve energy efficiency in an Android application? RQ2: Do best practices for performance improvement also improve energy efficiency? RQ3: Do these best practices actually have an impact on real mature Android applications? 4
  • 5. Research Questions RQ1: Can programming practices be blindly applied in order to improve energy efficiency in an Android application? RQ2: Do best practices for performance improvement also improve energy efficiency? RQ3: Do these best practices actually have an impact on real mature Android applications? 5
  • 6. Research Questions RQ1: Can programming practices be blindly applied in order to improve energy efficiency in an Android application? RQ2: Do best practices for performance improvement also improve energy efficiency? RQ3: Do these best practices actually have an impact on real mature Android applications? 6
  • 7. Methodology A. Android application selection B. Static analysis and refactoring C. Generation of automatic UI tests D. Energy measurement tools setup E. Experiments execution F. Data analysis 7
  • 8. A. Android application selection • 6 open-source Apps available at Google Play and/or F-Droid 8 Writeily ProLoop - Habit Tracker Talalarmo GnuCash Simple Gallery Acrylic Paint
  • 9. B. Static analysis and refactoring • Android Lint to detect code smells • 8 performance-based code smells were studied • Each code smell was fixed and a new version of the app was generatedTABLE II: Anti-patterns found in open source applications. Anti-Pattern Loop - Habit Tracker Writeily Pro Talalarmo GnuCash Acrylic Paint Simple Gallery DrawAllocation - - • - • - WakeLock - - • - - - Recycle - - - • - - ObsoleteLayoutParam - - - • - - ViewHolder - • - - - - Overdraw • • - - • • UnusedResources • • - - - - UselessParent - • - - - - 9
  • 10. C. Generation of automatic UI tests • Scripts to mimic user interaction • Manually created using Android View Client • Allows replication of experiments 10
  • 11. • Run apps in bare-board computer ODROID • Power sensors for main CPU, secondary CPU, memory, and GPU • 4 samples per second D. Energy measurement tools setup ODROID-XU ©2013 Hardkernel co. 11
  • 12. D. Energy measurement tools setup • Power is an instantaneous measurement (watts) • Energy is a measurement of power over a period of time (joules)
  • 13. E. Experiments execution • For every fixed code smell the experiment was equally executed 30 times for statistical validation Controller Computer ODROID Uninstall App & remove user data Install APK Upload Energy Logger script Start Energy Logger Return Energy Logger PID UI interaction Open App Return Energy Logs Open App Stop Energy Logger (PID) ADB through USB 13
  • 14. F. Data analysis • Power readings were down-sampled to 1 second • Energy consumptions that differ 2 standard deviations from the mean were eliminated 14
  • 15. Significance Tests 15 Welch’s t-test results UnusedResource, and UselessParent did not provide significant results. Fig. 9: Energy consumption for Simple Gallery. TABLE IV: Significance Welch’s t-test results Application Pattern Test p-value Loop - Habit Tracker Overdraw -0.56 .5784 UnusedResources -0.83 .4121 All -0.08 .9362 Writeily Pro Overdraw -0.10 .9180 UnusedResources -0.03 .9790 ViewHolder 3.02 .0038 UselessParent 0.20 .8434 All 2.93 .0049 Talalarmo DrawAllocation 4.18 .0001 WakeLock 4.43 < .0001 All 2.16 .0353 GnuCash ObsoleteLayoutParam 2.57 .0127 Recycle 2.55 .0140 All 2.47 .0164 AcrylicPaint DrawAllocation 0.64 .5221 Overdraw 45.88 < .0001 All -5.84 < .0001 Simple Gallery Overdraw -4.04 .0010 DrawAllocation also Although it occurred in Talalarmo, we observed tion was also tested wi statistically significant im picker redraw routine. U debug view updates, we a single time when a ne fix in the overall execu been the reason for not consumption. Fixing incorrect Wake ment of 1%. In the ori lock was not being pro to energy drain in part application is no longer was not properly releas power state. This woul given the nature of ou effectively tested. Thus, in a real case scenario. ObsoleteLayoutParam
  • 16. Effect SizeTABLE V: Effect size of significant patterns Application Pattern MD Cohen’s d IMP (%) Savings (min) Writeily Pro ViewHolder # -5.39 -0.78 4.50 65 All # -5.42 -0.76 4.53 65 Talalarmo DrawAllocation # -0.86 -1.11 1.47 21 WakeLock # -0.85 -1.17 1.46 21 All # -0.48 -0.57 0.82 12 GnuCash ObsoleteLayoutParam # -1.41 -0.67 0.72 10 Recycle # -1.28 -0.66 0.65 9 All # -1.53 -0.64 0.78 11 Acrylic Paint Overdraw " 1.42 1.64 -2.26 -33 All " 1.37 1.51 -2.18 -31 Simple Gallery Overdraw " 3.08 1.04 -2.11 -30 WakeLock usage also provided an improve- original version of Talalarmo, the wake properly released which could have lead itself several times. In this case, having an important, and fixing Overdraw is expected ing results. On the other hand, if a view is be16 View Holder has the biggest impact 😀 while Overdraw increased energy consumption 😕
  • 17. Research Questions RQ1: Can programming practices be blindly applied in order to improve energy efficiency in an Android application? Yes, apps had energy efficiency improved without changing the feature set and without requiring previous knowledge of the app. RQ2: Do best practices for performance improvement also improve energy efficiency? Not necessarily. While five optimizations improved energy efficiency, two did not affect, and one had a negative impact. RQ3: Do these best practices actually have an impact on real mature Android applications? Yes, three out of six real apps improved energy efficiency. 17
  • 18. Conclusions & Future Work • Anti-patterns ViewHolder, DrawAllocation, WakeLock, ObsoleteLayoutParam, and Recycle have to be considered when developing energy-efficient apps • Extend the study to other optimizations • Automatic refactoring (Autorefactor, FB pfff, Walkmod, Kadabra?) • Label mobile applications with respect to energy efficiency 18
  • 19. Hypothesis Performance based optimizations can be used to ship energy efficient Android applications. 3 Effect SizeTABLE V: Effect size of significant patterns Application Pattern MD Cohen’s d IMP (%) Savings (min) Writeily Pro ViewHolder # -5.39 -0.78 4.50 65 All # -5.42 -0.76 4.53 65 Talalarmo DrawAllocation # -0.86 -1.11 1.47 21 WakeLock # -0.85 -1.17 1.46 21 All # -0.48 -0.57 0.82 12 GnuCash ObsoleteLayoutParam # -1.41 -0.67 0.72 10 Recycle # -1.28 -0.66 0.65 9 All # -1.53 -0.64 0.78 11 Acrylic Paint Overdraw " 1.42 1.64 -2.26 -33 All " 1.37 1.51 -2.18 -31 Simple Gallery Overdraw " 3.08 1.04 -2.11 -30 WakeLock usage also provided an improve- he original version of Talalarmo, the wake g properly released which could have lead itself several times. In this case, having an efficient redraw is important, and fixing Overdraw is expected to create interest- ing results. On the other hand, if a view is being created several16 View Holder has the biggest impact ! while Overdraw increased energy consumption " Research Questions RQ1: Can programming practices be blindly applied in order to improve energy efficiency in an Android application? Yes, apps had energy efficiency improved without changing the feature set and without requiring previous knowledge of the app. RQ2: Do best practices for performance improvement also improve energy efficiency? Not necessarily. While five optimizations improved energy efficiency, two did not affect, and one had a negative impact. RQ3: Do these best practices actually have an impact on real mature Android applications? Yes, three out of six real apps improved energy efficiency. 17 19
  • 20. Full Paper Performance-based Guidelines for Energy- efficient Mobile Applications Luis Cruz, Rui Abreu All source code and collected data 20