presentationmeasuring and visualizing energy consumption within software code
DESCRIPTION
VL/HCC'14 Graduate ConsorciumTRANSCRIPT
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
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?
Why Energy?
1
Why software?
2
IsolationResponsibilityIdentification and improvement
Quantification
What type of information do developers have?
3
Spectrum-based Fault Localization
4
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?
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
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
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
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
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
#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
Metrics collected
7
SFL AdaptedC
om
pon
en
ts
Testst1 t2 t3 t4 t5
8
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
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
How to represent the information?
9
What we envision
10
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?
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