detecting anomalous energy consumption in android applications

19
Detecting Anomalous Energy Consumption in Android Applications GENTES-CIN, UFPE September 10, 2014 João Saraiva [email protected] http://di.uminho.pt/~jas (based on Marco Couto's Msc thesis)

Upload: greenlabatdi

Post on 06-Jul-2015

207 views

Category:

Presentations & Public Speaking


0 download

DESCRIPTION

Presentation @ UFPE September 2014

TRANSCRIPT

Page 1: Detecting Anomalous Energy Consumption in Android Applications

Detecting Anomalous Energy Consumption inAndroid Applications

GENTES-CIN, UFPE

September 10, 2014

João Saraiva

[email protected]

http://di.uminho.pt/~jas

(based on Marco Couto's Msc thesis)

Page 2: Detecting Anomalous Energy Consumption in Android Applications

Green Software Lab @ PT

X

http://greenlab.di.uminho.pt/

Page 3: Detecting Anomalous Energy Consumption in Android Applications

Going Green

+ =

X

Page 4: Detecting Anomalous Energy Consumption in Android Applications

• 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

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

Green Computing– Greenness of IT

X

Page 7: Detecting Anomalous Energy Consumption in Android Applications

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

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

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

The Android Power Tutor Comsumption Model

X

Page 11: Detecting Anomalous Energy Consumption in Android Applications

Model: Dynamic Callibration and API

X

Calibration

Model as an API

Page 12: Detecting Anomalous Energy Consumption in Android Applications

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

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

GreenDroid: Source Code Energy Profiler

X

Page 15: Detecting Anomalous Energy Consumption in Android Applications

GreenDroid in Practice

X

Comsumption per second:

Execution Time:

Is faster greener?!

Page 16: Detecting Anomalous Energy Consumption in Android Applications

GreenDroid: Energy Smells

X

(We reused Gzoltar Fault Localization Framework)

Page 17: Detecting Anomalous Energy Consumption in Android Applications

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

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

Detecting Anomalous Energy Consumption inAndroid Applications

GENTES-CIN,

UFPE

September 10,

2014

João Saraiva

[email protected]

http://di.uminho.pt/~jas