detecting anomalous energy consumption in android applications
DESCRIPTION
Presentation @ UFPE September 2014TRANSCRIPT
![Page 1: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/1.jpg)
Detecting Anomalous Energy Consumption inAndroid Applications
GENTES-CIN, UFPE
September 10, 2014
João Saraiva
http://di.uminho.pt/~jas
(based on Marco Couto's Msc thesis)
![Page 2: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/2.jpg)
Green Software Lab @ PT
X
http://greenlab.di.uminho.pt/
![Page 3: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/3.jpg)
Going Green
+ =
X
![Page 4: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/4.jpg)
• Caught the attention of many companies allowing them to save:
Green Computing
X
“close to 50% of the energy costs of an organization can be attributed to the IT departments”
- [Harmon and Auseklis, 2009]
![Page 5: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/5.jpg)
Green Computing – Greenness by IT
X
“up to 90% of energy used by ICT hardware can be attributed to
software”- [Standard, 2013]
![Page 6: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/6.jpg)
Green Computing– Greenness of IT
X
![Page 7: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/7.jpg)
Energy: a Sw Engineering Concern
X
Mining questions about software energy consumption
- [Pinto et al., 2014]
![Page 8: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/8.jpg)
Energy: A Sw Engineering Concern
X
Unfortunately, there are no techniques nor tools to support sw engineers analysing/improving their green software as
they have to improve sw performance (runtime)-
C: Debugger Java: Faul Localization Haskell: Heap Profiler
![Page 9: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/9.jpg)
This Talk:
X
1.The Android Power Tutor Consumption Model 2.Energy Consumption in Android Apps Source Code3.Green-aware Classication of Source Code Methods4.GreenDroid: An Android Framework for Energy Proling5.PVE Research Questions
![Page 10: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/10.jpg)
The Android Power Tutor Comsumption Model
X
![Page 11: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/11.jpg)
Model: Dynamic Callibration and API
X
Calibration
Model as an API
![Page 12: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/12.jpg)
Apps Source Code Instrumentation
X
Android Testing Framework used to execute the instrumented Green-aware Source Code
![Page 13: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/13.jpg)
Green-aware Classification of Source Code
X
Green Methods: These are the methods that have no interference in the anomalous energy consumptions. They are never invoked when a test of the application consumes more energy than the average.
Red Methods: Every time they are invoked, the application has anomalous energy consumption. They can be invoked when the application has bellow the average energy consumption as well, but no more than 30% of the times. They are supposed to be the methods with bigger influence in the anomalous energy consumption.
Yellow Methods: The methods that are invoked in other situations: mostly invoked when the application power consumption is bellow the average.
![Page 14: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/14.jpg)
GreenDroid: Source Code Energy Profiler
X
![Page 15: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/15.jpg)
GreenDroid in Practice
X
Comsumption per second:
Execution Time:
Is faster greener?!
![Page 16: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/16.jpg)
GreenDroid: Energy Smells
X
(We reused Gzoltar Fault Localization Framework)
![Page 17: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/17.jpg)
Spetrum-based Energy Fault Localization
X
Tests
Com
pon
en
t s
1
t1 t2 t3 t4 t5
1
11
11
1
1
100
1 1
1 1 1
1 1 1
1 11 0 1
1 0 1
1 1 1
0.30.7
0.3
0.3
0.3
0.7
1 0 1 0 1
But, what is pass/fail for energy comsumption?!
![Page 18: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/18.jpg)
PVE Research Questions:
X
1.When is faster/slower greener? (compiler optimizations, garbage colletion, etc)
2.How to (better) adapt SFL for Green Computing? 3.Green-aware Software Product Lines?
![Page 19: Detecting Anomalous Energy Consumption in Android Applications](https://reader033.vdocuments.net/reader033/viewer/2022042700/559995dc1a28abf0278b46a4/html5/thumbnails/19.jpg)
Detecting Anomalous Energy Consumption inAndroid Applications
GENTES-CIN,
UFPE
September 10,
2014
João Saraiva
http://di.uminho.pt/~jas