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

Tendances

Ch 20107 solar energy
Ch 20107 solar energyCh 20107 solar energy
Ch 20107 solar energy
Divya Gautam
 
Solar pwer satellite
Solar pwer satelliteSolar pwer satellite
Solar pwer satellite
Kiran Gham
 
Design of Synchronverter based Microgrid
Design of Synchronverter based MicrogridDesign of Synchronverter based Microgrid
Design of Synchronverter based Microgrid
Somsubhra Ghosh
 

Tendances (20)

Ch 20107 solar energy
Ch 20107 solar energyCh 20107 solar energy
Ch 20107 solar energy
 
Solar cell
Solar cellSolar cell
Solar cell
 
Plant e1
Plant e1Plant e1
Plant e1
 
Space Based Solar Power
Space Based Solar PowerSpace Based Solar Power
Space Based Solar Power
 
Power from Satellite station
Power from Satellite stationPower from Satellite station
Power from Satellite station
 
Design & Building Smart Energy Meter
Design & Building Smart Energy MeterDesign & Building Smart Energy Meter
Design & Building Smart Energy Meter
 
Financial analysis of 1 MW Solar PV plant
Financial analysis of 1 MW Solar PV plantFinancial analysis of 1 MW Solar PV plant
Financial analysis of 1 MW Solar PV plant
 
Solar Equipments
Solar EquipmentsSolar Equipments
Solar Equipments
 
Grid connected pv solar power plant
Grid connected pv solar power plantGrid connected pv solar power plant
Grid connected pv solar power plant
 
Robowar
RobowarRobowar
Robowar
 
ABB Training Colombia Inverters - Focus on residential and commercial solutio...
ABB Training Colombia Inverters - Focus on residential and commercial solutio...ABB Training Colombia Inverters - Focus on residential and commercial solutio...
ABB Training Colombia Inverters - Focus on residential and commercial solutio...
 
Smart Energy Systems of Future
Smart Energy Systems of FutureSmart Energy Systems of Future
Smart Energy Systems of Future
 
New Technologies In PV system
New Technologies In PV systemNew Technologies In PV system
New Technologies In PV system
 
Study of Large Scale Grid interactive Solar PV power plant
Study of Large Scale Grid interactive Solar PV power plantStudy of Large Scale Grid interactive Solar PV power plant
Study of Large Scale Grid interactive Solar PV power plant
 
Solar pwer satellite
Solar pwer satelliteSolar pwer satellite
Solar pwer satellite
 
SPACE BASED SOLAR POWER (2019)
SPACE BASED SOLAR POWER (2019)SPACE BASED SOLAR POWER (2019)
SPACE BASED SOLAR POWER (2019)
 
3. solar cell
3. solar cell3. solar cell
3. solar cell
 
foor step power generation ppt
foor step power generation pptfoor step power generation ppt
foor step power generation ppt
 
Solar water pump
Solar water pumpSolar water pump
Solar water pump
 
Design of Synchronverter based Microgrid
Design of Synchronverter based MicrogridDesign of Synchronverter based Microgrid
Design of Synchronverter based Microgrid
 

Similaire à Performance-based Guidelines for Energy Efficient Mobile Applications

[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...
[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...
[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...
Matteo Ferroni
 
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
 
Portfolio - Muhammad Ismail Sheikh
Portfolio - Muhammad Ismail SheikhPortfolio - Muhammad Ismail Sheikh
Portfolio - Muhammad Ismail Sheikh
M. Ismail Sheikh
 
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 Performance
rickschwar
 
Final Exam Questions Fall03
Final Exam Questions Fall03Final Exam Questions Fall03
Final Exam Questions Fall03
Radu_Negulescu
 
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
 

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

Using Automatic Refactoring to Improve Energy Efficiency of Android Apps
Using Automatic Refactoring to Improve Energy Efficiency of Android AppsUsing Automatic Refactoring to Improve Energy Efficiency of Android Apps
Using Automatic Refactoring to Improve Energy Efficiency of Android Apps
 
Greendroid Part2
Greendroid Part2Greendroid Part2
Greendroid Part2
 
[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...
[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...
[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...
 
LAS16-307: Benchmarking Schedutil in Android
LAS16-307: Benchmarking Schedutil in AndroidLAS16-307: Benchmarking Schedutil in Android
LAS16-307: Benchmarking Schedutil in Android
 
GREEN PAUWARE - For a power-thrifty mobile app marketplace
GREEN PAUWARE - For a power-thrifty mobile app marketplaceGREEN PAUWARE - For a power-thrifty mobile app marketplace
GREEN PAUWARE - For a power-thrifty mobile app marketplace
 
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...
 

Plus de MobileSoft

Plus de MobileSoft (20)

Investigating Decreasing Energy Usage in Mobile Apps via Indistinguishable Co...
Investigating Decreasing Energy Usage in Mobile Apps via Indistinguishable Co...Investigating Decreasing Energy Usage in Mobile Apps via Indistinguishable Co...
Investigating Decreasing Energy Usage in Mobile Apps via Indistinguishable Co...
 
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
 
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
 
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...
 
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
 
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
 
Towards Architectural Styles for Android App Software Product Lines
Towards Architectural Styles for Android App Software Product LinesTowards Architectural Styles for Android App Software Product Lines
Towards Architectural Styles for Android App Software Product Lines
 
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
 

Dernier

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Dernier (20)

WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 

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