presentationmeasuring and visualizing energy consumption within software code

21
Measuring and Visualizing Energy Consumption within Software Code Tiago Carção University of Minho, Braga, Portugal Supervisors: João Saraiva Jácome Cunha Graduate Consortium - VL/HCC 2014

Upload: greenlabatdi

Post on 07-Dec-2014

68 views

Category:

Presentations & Public Speaking


0 download

DESCRIPTION

VL/HCC'14 Graduate Consorcium

TRANSCRIPT

Page 1: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Measuring and Visualizing Energy Consumption within

Software Code

Tiago Carção

University of Minho, Braga, Portugal

Supervisors:João SaraivaJácome Cunha

Graduate Consortium - VL/HCC 2014

Page 2: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Do the developers concern themselves with energy consumption during the development process?

How can we display that information to the developers?

What type of information should be presented to the developers?

Page 3: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Why Energy?

1

Page 4: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Why software?

2

Page 5: PresentationMeasuring and Visualizing Energy Consumption within Software Code

IsolationResponsibilityIdentification and improvement

Quantification

What type of information do developers have?

3

Page 6: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Spectrum-based Fault Localization

4

Page 7: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Com

pon

en

ts

Testst1 t2 t3 t4 t5

1

1

1

1

1

1

1

1

1

1

0

0

1

1 1 1

1 1 1

1 1 1

1 0 1

1 0 1

1 1 1

0 1 0 1

Spectrum-based Fault Localization

4

Does the test output matches the expected output?

Page 8: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Testst1 t2 t3 t4 t5

1

1

1

1

1

1

1

1

0

0

1 1

1 1 1

1 1 1

1 1 1

1 0 1

1 0 1

1 1 1

0.3

1 0 1 0 1

Spectrum-based Fault LocalizationC

om

pon

en

ts

4

Page 9: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Testst1 t2 t3 t4 t5

1

1

1

1

1

1

1

1

0

0

1 1

1 1 1

1 1 1

1 1 1

1 0 1

1 0 1

1 1 1

0.7

0.3

0.3

0.3

1 0 1 0 1

Spectrum-based Fault LocalizationC

om

pon

en

ts

4

Page 10: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Testst1 t2 t3 t4 t5

1

1

1

1

1

1

1

1

0

0

1 1

1 1 1

1 1 1

1 1 1

1 0 1

1 0 1

1 1 1

0.3

0.7

0.3

0.3

0.3

0.7

1 0 1 0 1

Enquire possible faults!

Spectrum-based Fault LocalizationC

om

pon

en

ts

4

Page 11: PresentationMeasuring and Visualizing Energy Consumption within Software Code

How to adapt the SFL model for Energy Leak detection?

What data to collect from the code execution?

Decide what is a energy leak?

5

Page 12: PresentationMeasuring and Visualizing Energy Consumption within Software Code

int first = 0, second = 1, next, c; for ( c = 0 ; c < number; c++ ) { if ( c <= 1 ) next = number; else { next = first + second; first = second; second = next; } }

int fibonacciCalc(int number) {

return next; }

Source code instrumentation

6

Page 13: PresentationMeasuring and Visualizing Energy Consumption within Software Code

#GET TIME & START MEASURING

int first = 0, second = 1, next, c; for ( c = 0 ; c < number; c++ ) { if ( c <= 1 ) next = number; else { next = first + second; first = second; second = next; } }

int fibonacciCalc(int number) {

return next; }

#GET TIME & END MEASURING

Source code instrumentation

6

Page 14: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Metrics collected

7

Page 15: PresentationMeasuring and Visualizing Energy Consumption within Software Code

SFL AdaptedC

om

pon

en

ts

Testst1 t2 t3 t4 t5

8

Page 16: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Testst1 t2 t3 t4 t5

1

1

1

1

1

1

1

1

0

0

1 1

1 1 1

1 1 1

1 1 1

1 0 1

1 0 1

1 1 1

0.8 0.3 0.9 0.3 0.7

SFL AdaptedC

om

pon

en

ts

8

Page 17: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Testst1 t2 t3 t4 t5

1

1

1

1

1

1

1

1

0

0

1 1

1 1 1

1 1 1

1 1 1

1 0 1

1 0 1

1 1 1

0.1

0.2

0.11

0.23

0.8

0.46

0.8 0.3 0.9 0.3 0.7

SFL AdaptedC

om

pon

en

ts

8

Page 18: PresentationMeasuring and Visualizing Energy Consumption within Software Code

How to represent the information?

9

Page 19: PresentationMeasuring and Visualizing Energy Consumption within Software Code

What we envision

10

Page 20: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Do the developers concern themselves with energy consumption during the development process?

How can we display that information to the developers?

What type of information should be presented to the developers?

Page 21: PresentationMeasuring and Visualizing Energy Consumption within Software Code

Measuring and Visualizing Energy Consumption within

Software Code

Tiago Carção

University of Minho, Braga, Portugal

Supervisors:João SaraivaJácome Cunha

Graduate Consortium - VL/HCC 2014