SlideShare a Scribd company logo
1 of 98
Download to read offline
How Green are Java Best Practices?
Best Coding Practices and Software Eco-Design
Jérôme Rocheteau
Institut Catholique d’Arts et Métiers, Nantes, France
GreenDays@Rennes – Mardi 1er juillet 2014
How Green are Java Best Practices? GreenDays | 2014-07-01 1 / 33
Overview
1 Eco-Design and Best Practices
2 Formalizing Practices
3 Measuring Codes
4 Analyzing Measures, Codes, Practices
5 Eco-Design Indicators
How Green are Java Best Practices? GreenDays | 2014-07-01 2 / 33
Eco-Design and Best Practices
1 Eco-Design and Best Practices
Context and Issues
Hypothesis and Objectives
2 Formalizing Practices
3 Measuring Codes
4 Analyzing Measures, Codes, Practices
5 Eco-Design Indicators
How Green are Java Best Practices? GreenDays | 2014-07-01 3 / 33
Context and Issues
Context:
ICT accounted 2% of carbon emissions in 2007
Energy efficiency relies on hardware but not software
Works on energy efficiency classes, energy-aware systems
Issues:
Help developers to build energy-efficient software
1 Detect energy-consuming patterns in source code
2 Replace these patterns by energy-saving ones
Qualify the energy impact for such best practices
How Green are Java Best Practices? GreenDays | 2014-07-01 4 / 33
Hypothesis and Objectives
Hypothesis
Best coding practices are eco-design rules
Objectives:
1 Formalizing Java best practices
2 Measuring savings of memory and energy at runtime
3 Evaluating confidence of such results
How Green are Java Best Practices? GreenDays | 2014-07-01 5 / 33
Formalizing Practices
1 Eco-Design and Best Practices
2 Formalizing Practices
Informal and Formal Examples
Time, Space, Energy Semantics
3 Measuring Codes
4 Analyzing Measures, Codes, Practices
5 Eco-Design Indicators
How Green are Java Best Practices? GreenDays | 2014-07-01 6 / 33
Informal and Formal Examples
Best Coding Practice Example / Informal Rule:
String Literal Initialization
Initialization of strings with the keyword ’new’ creates new
objects. This is costly in time and memory space. Initializations
with literal strings avoids this.
How Green are Java Best Practices? GreenDays | 2014-07-01 7 / 33
Informal and Formal Examples
Best Coding Practice Example / Informal Rule:
String Literal Initialization
Initialization of strings with the keyword ’new’ creates new
objects. This is costly in time and memory space. Initializations
with literal strings avoids this.
Three shape of Java best coding practices :
1 Prefer this
2 Avoid that
3 Replace that by this
How Green are Java Best Practices? GreenDays | 2014-07-01 7 / 33
Informal and Formal Examples
Best Coding Practice Example / Informal Rule:
String Literal Initialization
Initialization of strings with the keyword ’new’ creates new
objects. This is costly in time and memory space. Initializations
with literal strings avoids this.
Three shape of Java best coding practices :
1 Prefer this
2 Avoid that
3 Replace that by this
Can be extended to other primitive/wrapper types
How Green are Java Best Practices? GreenDays | 2014-07-01 7 / 33
Informal and Formal Examples
Best Coding Practice Example / Informal Rule:
String Literal Initialization
Initialization of strings with the keyword ’new’ creates new
objects. This is costly in time and memory space. Initializations
with literal strings avoids this.
Three shape of Java best coding practices :
1 Prefer this
2 Avoid that
3 Replace that by this
Can be extended to other primitive/wrapper types
Can be applied to other programming languages
How Green are Java Best Practices? GreenDays | 2014-07-01 7 / 33
Informal and Formal Examples
Best Coding Practice Example / Informal Rule:
String Literal Initialization
Initialization of strings with the keyword ’new’ creates new
objects. This is costly in time and memory space. Initializations
with literal strings avoids this.
Three shape of Java best coding practices :
1 Prefer this
2 Avoid that
3 Replace that by this
Can be extended to other primitive/wrapper types
Can be applied to other programming languages
How Green are Java Best Practices? GreenDays | 2014-07-01 7 / 33
Informal and Formal Examples
Listing 1: Prefer String Literal Initialization
<rule id="prefer-string-literal-initialization">
<title>Prefer string literal initialization</title>
<description>
Primitive type objects should be initialized with primitive values
and without the use of any constructors.
</description>
<check green="StringValue" gray="StringObject" />
</rule>
How Green are Java Best Practices? GreenDays | 2014-07-01 8 / 33
Informal and Formal Examples
Listing 2: String Literal Initialization
p u b l i c c l a s s S t r i n g V a l u e implements Code {
p r i v a t e S t r i n g [ ] a r r a y ;
p u b l i c void setUp () {
a r r a y = new S t r i n g [ 1 0 0 0 ] ;
}
p u b l i c void doRun () throws Exception {
f o r ( i n t i = 0; i < 1000; i ++) {
a r r a y [ i ] = " abcdefg . . . " ;
}
}
p u b l i c void tearDown () {
a r r a y = n u l l ;
}
}
How Green are Java Best Practices? GreenDays | 2014-07-01 9 / 33
Informal and Formal Examples
Listing 3: String Object Initialization
p u b l i c c l a s s S t r i n g O b j e c t implements Code {
p r i v a t e S t r i n g [ ] a r r a y ;
p u b l i c void setUp () {
a r r a y = new S t r i n g [ 1 0 0 0 ] ;
}
p u b l i c void doRun () throws Exception {
f o r ( i n t i = 0; i < 1000; i ++) {
a r r a y [ i ] = new S t r i n g ( " abcdefg . . . " ) ;
}
}
p u b l i c void tearDown () {
a r r a y = n u l l ;
}
}
How Green are Java Best Practices? GreenDays | 2014-07-01 10 / 33
Time, Space, Energy Semantics
Prefer Literal
Initialization
time = ft (td , tc )
space = fs (sd , sc )
energy = fe(ed , ec )
How Green are Java Best Practices? GreenDays | 2014-07-01 11 / 33
Time, Space, Energy Semantics
String Value
Initialization
Prefer Literal
Initialization
String Object
Initialization
time = ft (td , tc )
space = fs (sd , sc )
energy = fe(ed , ec )
How Green are Java Best Practices? GreenDays | 2014-07-01 11 / 33
Time, Space, Energy Semantics
String Value
Initialization
Prefer Literal
Initialization
String Object
Initialization
time tc
space sc
energy ec
time td
space sd
energy ed
time = ft (td , tc )
space = fs (sd , sc )
energy = fe(ed , ec )
How Green are Java Best Practices? GreenDays | 2014-07-01 11 / 33
Time, Space, Energy Semantics
String Value
Initialization
Prefer Literal
Initialization
String Object
Initialization
time tc
space sc
energy ec
time td
space sd
energy ed
time = ft (td , tc )
space = fs (sd , sc )
energy = fe(ed , ec )
How Green are Java Best Practices? GreenDays | 2014-07-01 11 / 33
Time, Space, Energy Semantics
Goal: statistical static analysis method and tools
original code
How Green are Java Best Practices? GreenDays | 2014-07-01 12 / 33
Time, Space, Energy Semantics
Goal: statistical static analysis method and tools
original code
How Green are Java Best Practices? GreenDays | 2014-07-01 12 / 33
Time, Space, Energy Semantics
Goal: statistical static analysis method and tools
original code refactored code
How Green are Java Best Practices? GreenDays | 2014-07-01 12 / 33
Time, Space, Energy Semantics
Goal: statistical static analysis method and tools
original code refactored code
possible savings
X joules / X %
How Green are Java Best Practices? GreenDays | 2014-07-01 12 / 33
Measuring Codes
1 Eco-Design and Best Practices
2 Formalizing Practices
3 Measuring Codes
Needs and Requirements
Measure Task and Process
4 Analyzing Measures, Codes, Practices
5 Eco-Design Indicators
How Green are Java Best Practices? GreenDays | 2014-07-01 13 / 33
Needs and Requirements
Needs:
Requirements:
How Green are Java Best Practices? GreenDays | 2014-07-01 14 / 33
Needs and Requirements
Needs:
power-meter with digital outputs
Requirements:
power-meter with fine-grain precision
How Green are Java Best Practices? GreenDays | 2014-07-01 14 / 33
Needs and Requirements
Needs:
power-meter with digital outputs
memory monitor with digital outputs
Requirements:
power-meter with fine-grain precision
How Green are Java Best Practices? GreenDays | 2014-07-01 14 / 33
Needs and Requirements
Needs:
power-meter with digital outputs
memory monitor with digital outputs
platform for running Java codes
Requirements:
power-meter with fine-grain precision
Java micro-benchmarking to avoid JIT
How Green are Java Best Practices? GreenDays | 2014-07-01 14 / 33
Needs and Requirements
Needs:
power-meter with digital outputs
memory monitor with digital outputs
platform for running Java codes
system for managing codes and measures
Requirements:
power-meter with fine-grain precision
Java micro-benchmarking to avoid JIT
system able to manage physical and logical sensors
How Green are Java Best Practices? GreenDays | 2014-07-01 14 / 33
Measure Task and Process
Measurement Protocol:
1 4 seconds idle
2 10 seconds execution time
3 3 seconds idle
How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
Measure Task and Process
Semantics based on quantitative metrics:
x-axis execution time
y-axis instant power or instant memory space
How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
Measure Task and Process
Preliminary Computations:
How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
Measure Task and Process
Preliminary Computations:
total energy obtained by the trapezoidal rule
How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
Measure Task and Process
Preliminary Computations:
total energy obtained by the trapezoidal rule
idle power = average of the first 4 second instant powers
How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
Measure Task and Process
Preliminary Computations:
total energy obtained by the trapezoidal rule
idle power = average of the first 4 second instant powers
idle energy = idle power × protocol time
How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
Measure Task and Process
Code energy computation and normalization:
code energy = total energy - idle energy
How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
Measure Task and Process
Code energy computation and normalization:
code energy = total energy - idle energy
normalized code energy = code energy / times of execution
How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
Measure Task and Process
Measure Process:
How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
Measure Task and Process
Measure Process:
1 Retrieve an available Java code
How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
Measure Task and Process
Measure Process:
1 Retrieve an available Java code
2 Iterate while this code isn’t mature:
How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
Measure Task and Process
Measure Process:
1 Retrieve an available Java code
2 Iterate while this code isn’t mature:
Clean its measure set
How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
Measure Task and Process
Measure Process:
1 Retrieve an available Java code
2 Iterate while this code isn’t mature:
Clean its measure set
Compute its maturity
How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
Measure Task and Process
Measure Process:
1 Retrieve an available Java code
2 Iterate while this code isn’t mature:
Clean its measure set
Compute its maturity
Plan new measures if required
How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
Measure Task and Process
Measure Process:
1 Retrieve an available Java code
2 Iterate while this code isn’t mature:
Clean its measure set
Compute its maturity
Plan new measures if required
Perform these measures
3 Send the report of this code
How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
Analyzing Measures, Codes, Practices
1 Eco-Design and Best Practices
2 Formalizing Practices
3 Measuring Codes
4 Analyzing Measures, Codes, Practices
Clean and Canonical Measures
Code Maturity
Results
5 Eco-Design Indicators
How Green are Java Best Practices? GreenDays | 2014-07-01 17 / 33
Clean and Canonical Measures
3 kinds of measure disturbances:
How Green are Java Best Practices? GreenDays | 2014-07-01 18 / 33
Clean and Canonical Measures
3 kinds of measure disturbances:
disturbances before the measure task underestimate
How Green are Java Best Practices? GreenDays | 2014-07-01 18 / 33
Clean and Canonical Measures
3 kinds of measure disturbances:
disturbances before the measure task underestimate
disturbances after the measure task overestimate
How Green are Java Best Practices? GreenDays | 2014-07-01 18 / 33
Clean and Canonical Measures
3 kinds of measure disturbances:
disturbances before the measure task underestimate
disturbances after the measure task overestimate
disturbances during the measure task overestimate
How Green are Java Best Practices? GreenDays | 2014-07-01 18 / 33
Clean and Canonical Measures
3 kinds of measure disturbances:
disturbances before the measure task
disturbances after the measure task
disturbances during the measure task
2 mere algorithms for cleaning measures:
How Green are Java Best Practices? GreenDays | 2014-07-01 19 / 33
Clean and Canonical Measures
3 kinds of measure disturbances:
disturbances before the measure task
disturbances after the measure task
disturbances during the measure task
2 mere algorithms for cleaning measures:
bounds checking algorithm (over a single measure)
How Green are Java Best Practices? GreenDays | 2014-07-01 19 / 33
Clean and Canonical Measures
3 kinds of measure disturbances:
disturbances before the measure task
disturbances after the measure task
disturbances during the measure task
2 mere algorithms for cleaning measures:
bounds checking algorithm (over a single measure)
split-and-merge algorithm (over a set of measures)
How Green are Java Best Practices? GreenDays | 2014-07-01 19 / 33
Clean and Canonical Measures
Cleaning algorithm evaluation:
500 clean measures from 25 rules annotated by 3 experts
How Green are Java Best Practices? GreenDays | 2014-07-01 20 / 33
Clean and Canonical Measures
Cleaning algorithm evaluation:
500 clean measures from 25 rules annotated by 3 experts
inter-agreement κ: 0.94 (almost perfect)
How Green are Java Best Practices? GreenDays | 2014-07-01 20 / 33
Clean and Canonical Measures
Cleaning algorithm evaluation:
500 clean measures from 25 rules annotated by 3 experts
inter-agreement κ: 0.94 (almost perfect)
baseline = quartile method
precision: 0.953
recall: 0.911
How Green are Java Best Practices? GreenDays | 2014-07-01 20 / 33
Clean and Canonical Measures
Cleaning algorithm evaluation:
500 clean measures from 25 rules annotated by 3 experts
inter-agreement κ: 0.94 (almost perfect)
baseline = quartile method
precision: 0.953
recall: 0.911
split-and-merge algorithm
precision: 0.941
recall: 1.0
How Green are Java Best Practices? GreenDays | 2014-07-01 20 / 33
Clean and Canonical Measures
Cleaning algorithm evaluation:
500 clean measures from 25 rules annotated by 3 experts
inter-agreement κ: 0.94 (almost perfect)
baseline = quartile method
precision: 0.953
recall: 0.911
split-and-merge algorithm
precision: 0.941
recall: 1.0
remove all disturbed measures
How Green are Java Best Practices? GreenDays | 2014-07-01 20 / 33
Clean and Canonical Measures
Canonical measure:
How Green are Java Best Practices? GreenDays | 2014-07-01 21 / 33
Clean and Canonical Measures
Canonical measure:
time: t3
space: s3
energy: e3
time: t2
space: s2
energy: e2
time: t1
space: s1
energy: e1
How Green are Java Best Practices? GreenDays | 2014-07-01 21 / 33
Clean and Canonical Measures
Canonical measure:
time: t3
space: s3
energy: e3
time: t2
space: s2
energy: e2
time: t1
space: s1
energy: e1
time: t
space: s
energy: e
How Green are Java Best Practices? GreenDays | 2014-07-01 21 / 33
Clean and Canonical Measures
Canonical measure:
time: t3
space: s3
energy: e3
time: t2
space: s2
energy: e2
time: t1
space: s1
energy: e1
time: t
space: s
energy: e
How Green are Java Best Practices? GreenDays | 2014-07-01 21 / 33
Clean and Canonical Measures
Canonical measure:
time: t3
space: s3
energy: e3
time: t2
space: s2
energy: e2
time: t1
space: s1
energy: e1
time: t
space: s
energy: e
How Green are Java Best Practices? GreenDays | 2014-07-01 21 / 33
Clean and Canonical Measures
Canonical measure:
time: t3
space: s3
energy: e3
time: t2
space: s2
energy: e2
time: t1
space: s1
energy: e1
time: t
space: s
energy: e
error margin: 2%
How Green are Java Best Practices? GreenDays | 2014-07-01 21 / 33
Code Maturity
Code Maturity
How many clean measures required for reliable results?
How Green are Java Best Practices? GreenDays | 2014-07-01 22 / 33
Code Maturity
Code Maturity
How many clean measures required for reliable results?
0 20 40 60 80 100 120
5
10
15
Measure Number
RelativeStandardDeviation
How Green are Java Best Practices? GreenDays | 2014-07-01 22 / 33
Code Maturity
Code Maturity
How many clean measures required for reliable results?
0 20 40 60 80 100 120
5
10
15
Measure Number
RelativeStandardDeviation
a set of 25 measures minimum
How Green are Java Best Practices? GreenDays | 2014-07-01 22 / 33
Code Maturity
Code Maturity
How many clean measures required for reliable results?
0 20 40 60 80 100 120
5
10
15
Measure Number
RelativeStandardDeviation
a set of 25 measures minimum
a standard deviation less than 10%
How Green are Java Best Practices? GreenDays | 2014-07-01 22 / 33
Results
Energy in nanojoules, time in nanoseconds
Memory in kilobytes
Standard Deviation on Energy
Replace Object Initialization by Literal Initialization
Rule Id
GreenEnergy
GrayEnergy
GreenTime
GrayTime
GreenMemory
GrayMemory
GreenStdDev
GrayStdDev
String 697 7885 842 7827 4136 36104 4.40% 8.14%
Float 10311 10448 4736 4127 20032 20032 5.85% 6.58%
Integer 685 9575 833 4591 4048 20032 5.21% 6.51%
Boolean 683 6267 775 4741 4048 20032 4.77% 7.03%
Char 695 33067 840 4595 4048 20032 5.04% 4.65%
Double 10003 10210 5810 4270 28032 28032 5.58% 7.83%
Long 669 8236 807 6066 4056 28032 2.89% 5.32%
Short 680 7819 819 3846 4048 20031 4.87% 7.71%
How Green are Java Best Practices? GreenDays | 2014-07-01 23 / 33
Results
Replace Object Initialization by Literal Initialization
Rule Id G
reen
Energy
G
ray
Energy
A
bsolute
G
ain
Relative
G
ain
String 697 7885 7188 91.16%
Float 10311 10448 137 1.31%
Integer 685 9575 8890 92.54%
Boolean 683 6267 5584 89.10%
Char 695 33067 32372 97.89%
Double 10003 10210 207 2.02%
Long 669 8236 7567 91.87%
Short 680 7819 7139 91.30%
How Green are Java Best Practices? GreenDays | 2014-07-01 24 / 33
Results
Rules for loops
A Prefer integer loop counters
B Avoid method loop conditions
C Prefer comparison-to-0 conditions
D Prefer first common condition
Id
GreenEnergy
GrayEnergy
GreenTime
GrayTime
GreenMemory
GrayMemory
GreenStdDev
GrayStdDev
A 82 98 4744 5931 16 16 8.66% 7.46%
B 8376 8602 6181 6364 20056 20056 3.83% 6.14%
C 89 284 4709 17367 16 16 5.09% 5.78%
D 97 100 4934 5017 16 16 4.37% 4.60%
How Green are Java Best Practices? GreenDays | 2014-07-01 25 / 33
Results
Rules for loops
A Prefer integer loop counters
B Avoid method loop conditions
C Prefer comparison-to-0 conditions
D Prefer first common condition
Id
G
reen
Energy
G
ray
Energy
A
bsolute
G
ain
Relative
G
ain
A 82 98 16 16.32%
B 8376 8602 226 2.62%
C 89 284 195 68.66%
D 97 100 3 3.00%
How Green are Java Best Practices? GreenDays | 2014-07-01 25 / 33
Results
Set String Builder or Buffer Size
A String Buffer/Builder capacity initialization
B String Buffer/Builder capacity setting
C String Buffer/Builder length setting
Id
GreenEnergy
GrayEnergy
GreenTime
GrayTime
GreenMemory
GrayMemory
GreenStdDev
GrayStdDev
A 593 1053 38085 59111 52056 73784 7.11% 8.40%
B 598 1053 38495 59111 52056 73784 7.86% 8.40%
C 1211 1053 59111 70765 73784 104064 8.40% 9.40%
A’ 378 899 19278 41088 52056 73784 8.27% 7.18%
B’ 429 899 41088 51214 73784 104064 7.18% 5.84%
C’ 1043 899 20976 41088 52056 73784 6.01% 7.18%
How Green are Java Best Practices? GreenDays | 2014-07-01 26 / 33
Results
Set String Builder or Buffer Size
A String Buffer/Builder capacity initialization
B String Buffer/Builder capacity setting
C String Buffer/Builder length setting
Id
G
reen
Energy
G
ray
Energy
A
bsolute
G
ain
Relative
G
ain
A 593 1053 460 43.68%
B 598 1053 455 43.20%
C 1211 1053 -158 -15.00%
A’ 378 899 521 57.95%
B’ 429 899 470 52.28%
C’ 1043 899 -144 -16.01%
How Green are Java Best Practices? GreenDays | 2014-07-01 26 / 33
Eco-Design Indicators
1 Eco-Design and Best Practices
2 Formalizing Practices
3 Measuring Codes
4 Analyzing Measures, Codes, Practices
5 Eco-Design Indicators
Summary
Future
How Green are Java Best Practices? GreenDays | 2014-07-01 27 / 33
Eco-Design Indicators
How Green are Java Best Practices? GreenDays | 2014-07-01 28 / 33
Eco-Design Indicators
Hypothesis
Best Coding Practices ≈ Eco-Design Rules
174 formalized and measured rules
How Green are Java Best Practices? GreenDays | 2014-07-01 29 / 33
Eco-Design Indicators
Hypothesis
Best Coding Practices ≈ Eco-Design Rules
174 formalized and measured rules
55% rules huge savings (more than 10%)
How Green are Java Best Practices? GreenDays | 2014-07-01 29 / 33
Eco-Design Indicators
Hypothesis
Best Coding Practices ≈ Eco-Design Rules
174 formalized and measured rules
55% rules huge savings (more than 10%)
20% rules few savings (between 3% and 10%)
How Green are Java Best Practices? GreenDays | 2014-07-01 29 / 33
Eco-Design Indicators
Hypothesis
Best Coding Practices ≈ Eco-Design Rules
174 formalized and measured rules
55% rules huge savings (more than 10%)
20% rules few savings (between 3% and 10%)
15% rules no savings (between -3% and 3%)
How Green are Java Best Practices? GreenDays | 2014-07-01 29 / 33
Eco-Design Indicators
Hypothesis
Best Coding Practices ≈ Eco-Design Rules
174 formalized and measured rules
55% rules huge savings (more than 10%)
20% rules few savings (between 3% and 10%)
15% rules no savings (between -3% and 3%)
10% rules some losses (less than -3%)
How Green are Java Best Practices? GreenDays | 2014-07-01 29 / 33
Eco-Design Indicators
With The Way: 1 reliable measure system
How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
Eco-Design Indicators
With The Way: 1 reliable measure system
hybrid physical and logical sensor management
How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
Eco-Design Indicators
With The Way: 1 reliable measure system
hybrid physical and logical sensor management
complex client/server architecture
How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
Eco-Design Indicators
With The Way: 1 reliable measure system
hybrid physical and logical sensor management
complex client/server architecture
focused star schema database
How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
Eco-Design Indicators
With The Way: 1 reliable measure system
hybrid physical and logical sensor management
complex client/server architecture
focused star schema database
robust automatic iterative process
How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
Eco-Design Indicators
With The Way: 1 reliable measure system
hybrid physical and logical sensor management
complex client/server architecture
focused star schema database
robust automatic iterative process
extensible programming API
How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
Eco-Design Indicators
With The Way: 1 reliable measure system
hybrid physical and logical sensor management
complex client/server architecture
focused star schema database
robust automatic iterative process
extensible programming API
reliable stable measure sets with few measures
How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
Eco-Design Indicators
• Jérôme Rocheteau, Virginie Gaillard, et Lamya Belhaj.
How Green are Java Best Coding Practices?
Proceedings of the 3rd International Conference on Smart
Grids and Green IT Systems,
pages 235–246.
Barcelona, Espagne, Avril 2014.
How Green are Java Best Practices? GreenDays | 2014-07-01 31 / 33
Future
1 Energy Efficiency Classes?
How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
Future
1 Energy Efficiency Classes?
2 Eco-Design Indicators?
How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
Future
1 Energy Efficiency Classes?
2 Eco-Design Indicators?
Absolute savings
How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
Future
1 Energy Efficiency Classes?
2 Eco-Design Indicators?
Absolute savings
Relative savings
How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
Future
1 Energy Efficiency Classes?
2 Eco-Design Indicators?
Absolute savings
Relative savings
3 Rule indicators in different environments
How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
Future
1 Energy Efficiency Classes?
2 Eco-Design Indicators?
Absolute savings
Relative savings
3 Rule indicators in different environments
4 Rule indicators in different programming languages
How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
Future
1 Energy Efficiency Classes?
2 Eco-Design Indicators?
Absolute savings
Relative savings
3 Rule indicators in different environments
4 Rule indicators in different programming languages
5 Energy efficiency of different programming languages
How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
Future
1 Energy Efficiency Classes?
2 Eco-Design Indicators?
Absolute savings
Relative savings
3 Rule indicators in different environments
4 Rule indicators in different programming languages
5 Energy efficiency of different programming languages
6 Accuracy of different physical and/or logical sensors
How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
Future
1 Energy Efficiency Classes?
2 Eco-Design Indicators?
Absolute savings
Relative savings
3 Rule indicators in different environments
4 Rule indicators in different programming languages
5 Energy efficiency of different programming languages
6 Accuracy of different physical and/or logical sensors
7 Energy and memory footprints of logical sensors
How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
Thank you
How Green are Java Best Practices? GreenDays | 2014-07-01 33 / 33
Data Model
How Green are Java Best Practices? GreenDays | 2014-07-01 33 / 33

More Related Content

Viewers also liked

Green Software Lab
Green Software LabGreen Software Lab
Green Software LabGreenLabAtDI
 
Introduction to the Green Code
Introduction to the Green CodeIntroduction to the Green Code
Introduction to the Green Codebuffalogreencode
 
Technology, apps, and websites you need to know about
Technology, apps, and websites you need to know aboutTechnology, apps, and websites you need to know about
Technology, apps, and websites you need to know aboutDoug Green
 
Presentation Joost Visser / SIG - what can be green about software- Workshop ...
Presentation Joost Visser / SIG - what can be green about software- Workshop ...Presentation Joost Visser / SIG - what can be green about software- Workshop ...
Presentation Joost Visser / SIG - what can be green about software- Workshop ...Jaak Vlasveld
 
Green-Language programming presentation
Green-Language programming presentationGreen-Language programming presentation
Green-Language programming presentationLorraine Cruz
 
3.2 System Design For Eco Efficiency
3.2 System Design For Eco Efficiency3.2 System Design For Eco Efficiency
3.2 System Design For Eco EfficiencyLeNS_slide
 
Towards Software Sustainability Assessment
Towards Software Sustainability AssessmentTowards Software Sustainability Assessment
Towards Software Sustainability AssessmentPatricia Lago
 
Green Code Lab Challenge 2015 Subject Details
Green Code Lab Challenge 2015 Subject DetailsGreen Code Lab Challenge 2015 Subject Details
Green Code Lab Challenge 2015 Subject DetailsOlivier Philippot
 
Software and Sustainability
Software and SustainabilitySoftware and Sustainability
Software and SustainabilityPatricia Lago
 
說服性科技 Persuasive technology
說服性科技 Persuasive technology說服性科技 Persuasive technology
說服性科技 Persuasive technologyJill Hsu
 
Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Izzet Mustafaiev
 
Sissa OSWC Malaga 2008
Sissa OSWC Malaga 2008Sissa OSWC Malaga 2008
Sissa OSWC Malaga 2008giosissa
 
Green ICT, sustainability and Open Source
Green ICT, sustainability and Open  SourceGreen ICT, sustainability and Open  Source
Green ICT, sustainability and Open Sourcegiosissa
 
Secure coding practices
Secure coding practicesSecure coding practices
Secure coding practicesScott Hurrey
 
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...Baruch Sadogursky
 
Random Facts about Web App Security
Random Facts about Web App SecurityRandom Facts about Web App Security
Random Facts about Web App SecurityŁukasz Wójcik
 
The Green Lab - [02 A] The experimental process
The Green Lab - [02 A] The experimental processThe Green Lab - [02 A] The experimental process
The Green Lab - [02 A] The experimental processIvano Malavolta
 

Viewers also liked (19)

Green Software Lab
Green Software LabGreen Software Lab
Green Software Lab
 
Introduction to the Green Code
Introduction to the Green CodeIntroduction to the Green Code
Introduction to the Green Code
 
Technology, apps, and websites you need to know about
Technology, apps, and websites you need to know aboutTechnology, apps, and websites you need to know about
Technology, apps, and websites you need to know about
 
Presentation Joost Visser / SIG - what can be green about software- Workshop ...
Presentation Joost Visser / SIG - what can be green about software- Workshop ...Presentation Joost Visser / SIG - what can be green about software- Workshop ...
Presentation Joost Visser / SIG - what can be green about software- Workshop ...
 
Green-Language programming presentation
Green-Language programming presentationGreen-Language programming presentation
Green-Language programming presentation
 
3.2 System Design For Eco Efficiency
3.2 System Design For Eco Efficiency3.2 System Design For Eco Efficiency
3.2 System Design For Eco Efficiency
 
Towards Software Sustainability Assessment
Towards Software Sustainability AssessmentTowards Software Sustainability Assessment
Towards Software Sustainability Assessment
 
Ten green bottles
Ten green bottlesTen green bottles
Ten green bottles
 
Green Code Lab Challenge 2015 Subject Details
Green Code Lab Challenge 2015 Subject DetailsGreen Code Lab Challenge 2015 Subject Details
Green Code Lab Challenge 2015 Subject Details
 
Green it
Green it  Green it
Green it
 
Software and Sustainability
Software and SustainabilitySoftware and Sustainability
Software and Sustainability
 
說服性科技 Persuasive technology
說服性科技 Persuasive technology說服性科技 Persuasive technology
說服性科技 Persuasive technology
 
Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?Docker. Does it matter for Java developer ?
Docker. Does it matter for Java developer ?
 
Sissa OSWC Malaga 2008
Sissa OSWC Malaga 2008Sissa OSWC Malaga 2008
Sissa OSWC Malaga 2008
 
Green ICT, sustainability and Open Source
Green ICT, sustainability and Open  SourceGreen ICT, sustainability and Open  Source
Green ICT, sustainability and Open Source
 
Secure coding practices
Secure coding practicesSecure coding practices
Secure coding practices
 
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
 
Random Facts about Web App Security
Random Facts about Web App SecurityRandom Facts about Web App Security
Random Facts about Web App Security
 
The Green Lab - [02 A] The experimental process
The Green Lab - [02 A] The experimental processThe Green Lab - [02 A] The experimental process
The Green Lab - [02 A] The experimental process
 

Similar to How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01

2014 nicta-reproducibility
2014 nicta-reproducibility2014 nicta-reproducibility
2014 nicta-reproducibilityc.titus.brown
 
Creativity vs Best Practices
Creativity vs Best PracticesCreativity vs Best Practices
Creativity vs Best PracticesSupun Dissanayake
 
Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...
Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...
Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...Lionel Briand
 
Query optimization to improve performance of the code execution
Query optimization to improve performance of the code executionQuery optimization to improve performance of the code execution
Query optimization to improve performance of the code executionAlexander Decker
 
11.query optimization to improve performance of the code execution
11.query optimization to improve performance of the code execution11.query optimization to improve performance of the code execution
11.query optimization to improve performance of the code executionAlexander Decker
 
A preliminary study on using code smells to improve bug localization
A preliminary study on using code smells to improve bug localizationA preliminary study on using code smells to improve bug localization
A preliminary study on using code smells to improve bug localizationkrws
 
IA3_presentation.pptx
IA3_presentation.pptxIA3_presentation.pptx
IA3_presentation.pptxKtonNguyn2
 
Refactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech TalkRefactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech TalkCodeOps Technologies LLP
 
Refactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech Talk Refactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech Talk Ganesh Samarthyam
 
Using SigOpt to Tune Deep Learning Models with Nervana Cloud
Using SigOpt to Tune Deep Learning Models with Nervana CloudUsing SigOpt to Tune Deep Learning Models with Nervana Cloud
Using SigOpt to Tune Deep Learning Models with Nervana CloudSigOpt
 
Using the Machine to predict Testability
Using the Machine to predict TestabilityUsing the Machine to predict Testability
Using the Machine to predict TestabilityMiguel Lopez
 
Certified Reasoning for Automated Verification
Certified Reasoning for Automated VerificationCertified Reasoning for Automated Verification
Certified Reasoning for Automated VerificationAsankhaya Sharma
 
Abcd iqs ssoftware-projects-mercecrosas
Abcd iqs ssoftware-projects-mercecrosasAbcd iqs ssoftware-projects-mercecrosas
Abcd iqs ssoftware-projects-mercecrosasMerce Crosas
 
Sharing massive data analysis: from provenance to linked experiment reports
Sharing massive data analysis: from provenance to linked experiment reportsSharing massive data analysis: from provenance to linked experiment reports
Sharing massive data analysis: from provenance to linked experiment reportsGaignard Alban
 
CS3114_09212011.ppt
CS3114_09212011.pptCS3114_09212011.ppt
CS3114_09212011.pptArumugam90
 
Data Science & AI Syllabus - DS & AI.pdf
Data Science & AI Syllabus - DS & AI.pdfData Science & AI Syllabus - DS & AI.pdf
Data Science & AI Syllabus - DS & AI.pdfAayushdigichrome
 
Python & machine learning Syllabus - DS & AI.pdf
Python & machine learning Syllabus - DS & AI.pdfPython & machine learning Syllabus - DS & AI.pdf
Python & machine learning Syllabus - DS & AI.pdfAayushdigichrome
 

Similar to How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01 (20)

2014 toronto-torbug
2014 toronto-torbug2014 toronto-torbug
2014 toronto-torbug
 
2014 nicta-reproducibility
2014 nicta-reproducibility2014 nicta-reproducibility
2014 nicta-reproducibility
 
Creativity vs Best Practices
Creativity vs Best PracticesCreativity vs Best Practices
Creativity vs Best Practices
 
Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...
Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...
Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...
 
Query optimization to improve performance of the code execution
Query optimization to improve performance of the code executionQuery optimization to improve performance of the code execution
Query optimization to improve performance of the code execution
 
11.query optimization to improve performance of the code execution
11.query optimization to improve performance of the code execution11.query optimization to improve performance of the code execution
11.query optimization to improve performance of the code execution
 
A preliminary study on using code smells to improve bug localization
A preliminary study on using code smells to improve bug localizationA preliminary study on using code smells to improve bug localization
A preliminary study on using code smells to improve bug localization
 
Siguccs20101026
Siguccs20101026Siguccs20101026
Siguccs20101026
 
IA3_presentation.pptx
IA3_presentation.pptxIA3_presentation.pptx
IA3_presentation.pptx
 
Refactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech TalkRefactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech Talk
 
Refactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech Talk Refactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech Talk
 
Using SigOpt to Tune Deep Learning Models with Nervana Cloud
Using SigOpt to Tune Deep Learning Models with Nervana CloudUsing SigOpt to Tune Deep Learning Models with Nervana Cloud
Using SigOpt to Tune Deep Learning Models with Nervana Cloud
 
Using the Machine to predict Testability
Using the Machine to predict TestabilityUsing the Machine to predict Testability
Using the Machine to predict Testability
 
Certified Reasoning for Automated Verification
Certified Reasoning for Automated VerificationCertified Reasoning for Automated Verification
Certified Reasoning for Automated Verification
 
Abcd iqs ssoftware-projects-mercecrosas
Abcd iqs ssoftware-projects-mercecrosasAbcd iqs ssoftware-projects-mercecrosas
Abcd iqs ssoftware-projects-mercecrosas
 
Distributed deep learning_over_spark_20_nov_2014_ver_2.8
Distributed deep learning_over_spark_20_nov_2014_ver_2.8Distributed deep learning_over_spark_20_nov_2014_ver_2.8
Distributed deep learning_over_spark_20_nov_2014_ver_2.8
 
Sharing massive data analysis: from provenance to linked experiment reports
Sharing massive data analysis: from provenance to linked experiment reportsSharing massive data analysis: from provenance to linked experiment reports
Sharing massive data analysis: from provenance to linked experiment reports
 
CS3114_09212011.ppt
CS3114_09212011.pptCS3114_09212011.ppt
CS3114_09212011.ppt
 
Data Science & AI Syllabus - DS & AI.pdf
Data Science & AI Syllabus - DS & AI.pdfData Science & AI Syllabus - DS & AI.pdf
Data Science & AI Syllabus - DS & AI.pdf
 
Python & machine learning Syllabus - DS & AI.pdf
Python & machine learning Syllabus - DS & AI.pdfPython & machine learning Syllabus - DS & AI.pdf
Python & machine learning Syllabus - DS & AI.pdf
 

Recently uploaded

6.2 Pests of Sesame_Identification_Binomics_Dr.UPR
6.2 Pests of Sesame_Identification_Binomics_Dr.UPR6.2 Pests of Sesame_Identification_Binomics_Dr.UPR
6.2 Pests of Sesame_Identification_Binomics_Dr.UPRPirithiRaju
 
DETECTION OF MUTATION BY CLB METHOD.pptx
DETECTION OF MUTATION BY CLB METHOD.pptxDETECTION OF MUTATION BY CLB METHOD.pptx
DETECTION OF MUTATION BY CLB METHOD.pptx201bo007
 
Oxo-Acids of Halogens and their Salts.pptx
Oxo-Acids of Halogens and their Salts.pptxOxo-Acids of Halogens and their Salts.pptx
Oxo-Acids of Halogens and their Salts.pptxfarhanvvdk
 
Q4-Mod-1c-Quiz-Projectile-333344444.pptx
Q4-Mod-1c-Quiz-Projectile-333344444.pptxQ4-Mod-1c-Quiz-Projectile-333344444.pptx
Q4-Mod-1c-Quiz-Projectile-333344444.pptxtuking87
 
complex analysis best book for solving questions.pdf
complex analysis best book for solving questions.pdfcomplex analysis best book for solving questions.pdf
complex analysis best book for solving questions.pdfSubhamKumar3239
 
CHROMATOGRAPHY PALLAVI RAWAT.pptx
CHROMATOGRAPHY  PALLAVI RAWAT.pptxCHROMATOGRAPHY  PALLAVI RAWAT.pptx
CHROMATOGRAPHY PALLAVI RAWAT.pptxpallavirawat456
 
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptxGENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptxRitchAndruAgustin
 
Measures of Central Tendency.pptx for UG
Measures of Central Tendency.pptx for UGMeasures of Central Tendency.pptx for UG
Measures of Central Tendency.pptx for UGSoniaBajaj10
 
Environmental Acoustics- Speech interference level, acoustics calibrator.pptx
Environmental Acoustics- Speech interference level, acoustics calibrator.pptxEnvironmental Acoustics- Speech interference level, acoustics calibrator.pptx
Environmental Acoustics- Speech interference level, acoustics calibrator.pptxpriyankatabhane
 
Charateristics of the Angara-A5 spacecraft launched from the Vostochny Cosmod...
Charateristics of the Angara-A5 spacecraft launched from the Vostochny Cosmod...Charateristics of the Angara-A5 spacecraft launched from the Vostochny Cosmod...
Charateristics of the Angara-A5 spacecraft launched from the Vostochny Cosmod...Christina Parmionova
 
Pests of Sunflower_Binomics_Identification_Dr.UPR
Pests of Sunflower_Binomics_Identification_Dr.UPRPests of Sunflower_Binomics_Identification_Dr.UPR
Pests of Sunflower_Binomics_Identification_Dr.UPRPirithiRaju
 
KDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdf
KDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdfKDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdf
KDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdfGABYFIORELAMALPARTID1
 
final waves properties grade 7 - third quarter
final waves properties grade 7 - third quarterfinal waves properties grade 7 - third quarter
final waves properties grade 7 - third quarterHanHyoKim
 
Loudspeaker- direct radiating type and horn type.pptx
Loudspeaker- direct radiating type and horn type.pptxLoudspeaker- direct radiating type and horn type.pptx
Loudspeaker- direct radiating type and horn type.pptxpriyankatabhane
 
Environmental acoustics- noise criteria.pptx
Environmental acoustics- noise criteria.pptxEnvironmental acoustics- noise criteria.pptx
Environmental acoustics- noise criteria.pptxpriyankatabhane
 
linear Regression, multiple Regression and Annova
linear Regression, multiple Regression and Annovalinear Regression, multiple Regression and Annova
linear Regression, multiple Regression and AnnovaMansi Rastogi
 
Unveiling the Cannabis Plant’s Potential
Unveiling the Cannabis Plant’s PotentialUnveiling the Cannabis Plant’s Potential
Unveiling the Cannabis Plant’s PotentialMarkus Roggen
 
BACTERIAL DEFENSE SYSTEM by Dr. Chayanika Das
BACTERIAL DEFENSE SYSTEM by Dr. Chayanika DasBACTERIAL DEFENSE SYSTEM by Dr. Chayanika Das
BACTERIAL DEFENSE SYSTEM by Dr. Chayanika DasChayanika Das
 
Science (Communication) and Wikipedia - Potentials and Pitfalls
Science (Communication) and Wikipedia - Potentials and PitfallsScience (Communication) and Wikipedia - Potentials and Pitfalls
Science (Communication) and Wikipedia - Potentials and PitfallsDobusch Leonhard
 
GLYCOSIDES Classification Of GLYCOSIDES Chemical Tests Glycosides
GLYCOSIDES Classification Of GLYCOSIDES  Chemical Tests GlycosidesGLYCOSIDES Classification Of GLYCOSIDES  Chemical Tests Glycosides
GLYCOSIDES Classification Of GLYCOSIDES Chemical Tests GlycosidesNandakishor Bhaurao Deshmukh
 

Recently uploaded (20)

6.2 Pests of Sesame_Identification_Binomics_Dr.UPR
6.2 Pests of Sesame_Identification_Binomics_Dr.UPR6.2 Pests of Sesame_Identification_Binomics_Dr.UPR
6.2 Pests of Sesame_Identification_Binomics_Dr.UPR
 
DETECTION OF MUTATION BY CLB METHOD.pptx
DETECTION OF MUTATION BY CLB METHOD.pptxDETECTION OF MUTATION BY CLB METHOD.pptx
DETECTION OF MUTATION BY CLB METHOD.pptx
 
Oxo-Acids of Halogens and their Salts.pptx
Oxo-Acids of Halogens and their Salts.pptxOxo-Acids of Halogens and their Salts.pptx
Oxo-Acids of Halogens and their Salts.pptx
 
Q4-Mod-1c-Quiz-Projectile-333344444.pptx
Q4-Mod-1c-Quiz-Projectile-333344444.pptxQ4-Mod-1c-Quiz-Projectile-333344444.pptx
Q4-Mod-1c-Quiz-Projectile-333344444.pptx
 
complex analysis best book for solving questions.pdf
complex analysis best book for solving questions.pdfcomplex analysis best book for solving questions.pdf
complex analysis best book for solving questions.pdf
 
CHROMATOGRAPHY PALLAVI RAWAT.pptx
CHROMATOGRAPHY  PALLAVI RAWAT.pptxCHROMATOGRAPHY  PALLAVI RAWAT.pptx
CHROMATOGRAPHY PALLAVI RAWAT.pptx
 
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptxGENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
 
Measures of Central Tendency.pptx for UG
Measures of Central Tendency.pptx for UGMeasures of Central Tendency.pptx for UG
Measures of Central Tendency.pptx for UG
 
Environmental Acoustics- Speech interference level, acoustics calibrator.pptx
Environmental Acoustics- Speech interference level, acoustics calibrator.pptxEnvironmental Acoustics- Speech interference level, acoustics calibrator.pptx
Environmental Acoustics- Speech interference level, acoustics calibrator.pptx
 
Charateristics of the Angara-A5 spacecraft launched from the Vostochny Cosmod...
Charateristics of the Angara-A5 spacecraft launched from the Vostochny Cosmod...Charateristics of the Angara-A5 spacecraft launched from the Vostochny Cosmod...
Charateristics of the Angara-A5 spacecraft launched from the Vostochny Cosmod...
 
Pests of Sunflower_Binomics_Identification_Dr.UPR
Pests of Sunflower_Binomics_Identification_Dr.UPRPests of Sunflower_Binomics_Identification_Dr.UPR
Pests of Sunflower_Binomics_Identification_Dr.UPR
 
KDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdf
KDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdfKDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdf
KDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdf
 
final waves properties grade 7 - third quarter
final waves properties grade 7 - third quarterfinal waves properties grade 7 - third quarter
final waves properties grade 7 - third quarter
 
Loudspeaker- direct radiating type and horn type.pptx
Loudspeaker- direct radiating type and horn type.pptxLoudspeaker- direct radiating type and horn type.pptx
Loudspeaker- direct radiating type and horn type.pptx
 
Environmental acoustics- noise criteria.pptx
Environmental acoustics- noise criteria.pptxEnvironmental acoustics- noise criteria.pptx
Environmental acoustics- noise criteria.pptx
 
linear Regression, multiple Regression and Annova
linear Regression, multiple Regression and Annovalinear Regression, multiple Regression and Annova
linear Regression, multiple Regression and Annova
 
Unveiling the Cannabis Plant’s Potential
Unveiling the Cannabis Plant’s PotentialUnveiling the Cannabis Plant’s Potential
Unveiling the Cannabis Plant’s Potential
 
BACTERIAL DEFENSE SYSTEM by Dr. Chayanika Das
BACTERIAL DEFENSE SYSTEM by Dr. Chayanika DasBACTERIAL DEFENSE SYSTEM by Dr. Chayanika Das
BACTERIAL DEFENSE SYSTEM by Dr. Chayanika Das
 
Science (Communication) and Wikipedia - Potentials and Pitfalls
Science (Communication) and Wikipedia - Potentials and PitfallsScience (Communication) and Wikipedia - Potentials and Pitfalls
Science (Communication) and Wikipedia - Potentials and Pitfalls
 
GLYCOSIDES Classification Of GLYCOSIDES Chemical Tests Glycosides
GLYCOSIDES Classification Of GLYCOSIDES  Chemical Tests GlycosidesGLYCOSIDES Classification Of GLYCOSIDES  Chemical Tests Glycosides
GLYCOSIDES Classification Of GLYCOSIDES Chemical Tests Glycosides
 

How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01

  • 1. How Green are Java Best Practices? Best Coding Practices and Software Eco-Design Jérôme Rocheteau Institut Catholique d’Arts et Métiers, Nantes, France GreenDays@Rennes – Mardi 1er juillet 2014 How Green are Java Best Practices? GreenDays | 2014-07-01 1 / 33
  • 2. Overview 1 Eco-Design and Best Practices 2 Formalizing Practices 3 Measuring Codes 4 Analyzing Measures, Codes, Practices 5 Eco-Design Indicators How Green are Java Best Practices? GreenDays | 2014-07-01 2 / 33
  • 3. Eco-Design and Best Practices 1 Eco-Design and Best Practices Context and Issues Hypothesis and Objectives 2 Formalizing Practices 3 Measuring Codes 4 Analyzing Measures, Codes, Practices 5 Eco-Design Indicators How Green are Java Best Practices? GreenDays | 2014-07-01 3 / 33
  • 4. Context and Issues Context: ICT accounted 2% of carbon emissions in 2007 Energy efficiency relies on hardware but not software Works on energy efficiency classes, energy-aware systems Issues: Help developers to build energy-efficient software 1 Detect energy-consuming patterns in source code 2 Replace these patterns by energy-saving ones Qualify the energy impact for such best practices How Green are Java Best Practices? GreenDays | 2014-07-01 4 / 33
  • 5. Hypothesis and Objectives Hypothesis Best coding practices are eco-design rules Objectives: 1 Formalizing Java best practices 2 Measuring savings of memory and energy at runtime 3 Evaluating confidence of such results How Green are Java Best Practices? GreenDays | 2014-07-01 5 / 33
  • 6. Formalizing Practices 1 Eco-Design and Best Practices 2 Formalizing Practices Informal and Formal Examples Time, Space, Energy Semantics 3 Measuring Codes 4 Analyzing Measures, Codes, Practices 5 Eco-Design Indicators How Green are Java Best Practices? GreenDays | 2014-07-01 6 / 33
  • 7. Informal and Formal Examples Best Coding Practice Example / Informal Rule: String Literal Initialization Initialization of strings with the keyword ’new’ creates new objects. This is costly in time and memory space. Initializations with literal strings avoids this. How Green are Java Best Practices? GreenDays | 2014-07-01 7 / 33
  • 8. Informal and Formal Examples Best Coding Practice Example / Informal Rule: String Literal Initialization Initialization of strings with the keyword ’new’ creates new objects. This is costly in time and memory space. Initializations with literal strings avoids this. Three shape of Java best coding practices : 1 Prefer this 2 Avoid that 3 Replace that by this How Green are Java Best Practices? GreenDays | 2014-07-01 7 / 33
  • 9. Informal and Formal Examples Best Coding Practice Example / Informal Rule: String Literal Initialization Initialization of strings with the keyword ’new’ creates new objects. This is costly in time and memory space. Initializations with literal strings avoids this. Three shape of Java best coding practices : 1 Prefer this 2 Avoid that 3 Replace that by this Can be extended to other primitive/wrapper types How Green are Java Best Practices? GreenDays | 2014-07-01 7 / 33
  • 10. Informal and Formal Examples Best Coding Practice Example / Informal Rule: String Literal Initialization Initialization of strings with the keyword ’new’ creates new objects. This is costly in time and memory space. Initializations with literal strings avoids this. Three shape of Java best coding practices : 1 Prefer this 2 Avoid that 3 Replace that by this Can be extended to other primitive/wrapper types Can be applied to other programming languages How Green are Java Best Practices? GreenDays | 2014-07-01 7 / 33
  • 11. Informal and Formal Examples Best Coding Practice Example / Informal Rule: String Literal Initialization Initialization of strings with the keyword ’new’ creates new objects. This is costly in time and memory space. Initializations with literal strings avoids this. Three shape of Java best coding practices : 1 Prefer this 2 Avoid that 3 Replace that by this Can be extended to other primitive/wrapper types Can be applied to other programming languages How Green are Java Best Practices? GreenDays | 2014-07-01 7 / 33
  • 12. Informal and Formal Examples Listing 1: Prefer String Literal Initialization <rule id="prefer-string-literal-initialization"> <title>Prefer string literal initialization</title> <description> Primitive type objects should be initialized with primitive values and without the use of any constructors. </description> <check green="StringValue" gray="StringObject" /> </rule> How Green are Java Best Practices? GreenDays | 2014-07-01 8 / 33
  • 13. Informal and Formal Examples Listing 2: String Literal Initialization p u b l i c c l a s s S t r i n g V a l u e implements Code { p r i v a t e S t r i n g [ ] a r r a y ; p u b l i c void setUp () { a r r a y = new S t r i n g [ 1 0 0 0 ] ; } p u b l i c void doRun () throws Exception { f o r ( i n t i = 0; i < 1000; i ++) { a r r a y [ i ] = " abcdefg . . . " ; } } p u b l i c void tearDown () { a r r a y = n u l l ; } } How Green are Java Best Practices? GreenDays | 2014-07-01 9 / 33
  • 14. Informal and Formal Examples Listing 3: String Object Initialization p u b l i c c l a s s S t r i n g O b j e c t implements Code { p r i v a t e S t r i n g [ ] a r r a y ; p u b l i c void setUp () { a r r a y = new S t r i n g [ 1 0 0 0 ] ; } p u b l i c void doRun () throws Exception { f o r ( i n t i = 0; i < 1000; i ++) { a r r a y [ i ] = new S t r i n g ( " abcdefg . . . " ) ; } } p u b l i c void tearDown () { a r r a y = n u l l ; } } How Green are Java Best Practices? GreenDays | 2014-07-01 10 / 33
  • 15. Time, Space, Energy Semantics Prefer Literal Initialization time = ft (td , tc ) space = fs (sd , sc ) energy = fe(ed , ec ) How Green are Java Best Practices? GreenDays | 2014-07-01 11 / 33
  • 16. Time, Space, Energy Semantics String Value Initialization Prefer Literal Initialization String Object Initialization time = ft (td , tc ) space = fs (sd , sc ) energy = fe(ed , ec ) How Green are Java Best Practices? GreenDays | 2014-07-01 11 / 33
  • 17. Time, Space, Energy Semantics String Value Initialization Prefer Literal Initialization String Object Initialization time tc space sc energy ec time td space sd energy ed time = ft (td , tc ) space = fs (sd , sc ) energy = fe(ed , ec ) How Green are Java Best Practices? GreenDays | 2014-07-01 11 / 33
  • 18. Time, Space, Energy Semantics String Value Initialization Prefer Literal Initialization String Object Initialization time tc space sc energy ec time td space sd energy ed time = ft (td , tc ) space = fs (sd , sc ) energy = fe(ed , ec ) How Green are Java Best Practices? GreenDays | 2014-07-01 11 / 33
  • 19. Time, Space, Energy Semantics Goal: statistical static analysis method and tools original code How Green are Java Best Practices? GreenDays | 2014-07-01 12 / 33
  • 20. Time, Space, Energy Semantics Goal: statistical static analysis method and tools original code How Green are Java Best Practices? GreenDays | 2014-07-01 12 / 33
  • 21. Time, Space, Energy Semantics Goal: statistical static analysis method and tools original code refactored code How Green are Java Best Practices? GreenDays | 2014-07-01 12 / 33
  • 22. Time, Space, Energy Semantics Goal: statistical static analysis method and tools original code refactored code possible savings X joules / X % How Green are Java Best Practices? GreenDays | 2014-07-01 12 / 33
  • 23. Measuring Codes 1 Eco-Design and Best Practices 2 Formalizing Practices 3 Measuring Codes Needs and Requirements Measure Task and Process 4 Analyzing Measures, Codes, Practices 5 Eco-Design Indicators How Green are Java Best Practices? GreenDays | 2014-07-01 13 / 33
  • 24. Needs and Requirements Needs: Requirements: How Green are Java Best Practices? GreenDays | 2014-07-01 14 / 33
  • 25. Needs and Requirements Needs: power-meter with digital outputs Requirements: power-meter with fine-grain precision How Green are Java Best Practices? GreenDays | 2014-07-01 14 / 33
  • 26. Needs and Requirements Needs: power-meter with digital outputs memory monitor with digital outputs Requirements: power-meter with fine-grain precision How Green are Java Best Practices? GreenDays | 2014-07-01 14 / 33
  • 27. Needs and Requirements Needs: power-meter with digital outputs memory monitor with digital outputs platform for running Java codes Requirements: power-meter with fine-grain precision Java micro-benchmarking to avoid JIT How Green are Java Best Practices? GreenDays | 2014-07-01 14 / 33
  • 28. Needs and Requirements Needs: power-meter with digital outputs memory monitor with digital outputs platform for running Java codes system for managing codes and measures Requirements: power-meter with fine-grain precision Java micro-benchmarking to avoid JIT system able to manage physical and logical sensors How Green are Java Best Practices? GreenDays | 2014-07-01 14 / 33
  • 29. Measure Task and Process Measurement Protocol: 1 4 seconds idle 2 10 seconds execution time 3 3 seconds idle How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
  • 30. Measure Task and Process Semantics based on quantitative metrics: x-axis execution time y-axis instant power or instant memory space How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
  • 31. Measure Task and Process Preliminary Computations: How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
  • 32. Measure Task and Process Preliminary Computations: total energy obtained by the trapezoidal rule How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
  • 33. Measure Task and Process Preliminary Computations: total energy obtained by the trapezoidal rule idle power = average of the first 4 second instant powers How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
  • 34. Measure Task and Process Preliminary Computations: total energy obtained by the trapezoidal rule idle power = average of the first 4 second instant powers idle energy = idle power × protocol time How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
  • 35. Measure Task and Process Code energy computation and normalization: code energy = total energy - idle energy How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
  • 36. Measure Task and Process Code energy computation and normalization: code energy = total energy - idle energy normalized code energy = code energy / times of execution How Green are Java Best Practices? GreenDays | 2014-07-01 15 / 33
  • 37. Measure Task and Process Measure Process: How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
  • 38. Measure Task and Process Measure Process: 1 Retrieve an available Java code How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
  • 39. Measure Task and Process Measure Process: 1 Retrieve an available Java code 2 Iterate while this code isn’t mature: How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
  • 40. Measure Task and Process Measure Process: 1 Retrieve an available Java code 2 Iterate while this code isn’t mature: Clean its measure set How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
  • 41. Measure Task and Process Measure Process: 1 Retrieve an available Java code 2 Iterate while this code isn’t mature: Clean its measure set Compute its maturity How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
  • 42. Measure Task and Process Measure Process: 1 Retrieve an available Java code 2 Iterate while this code isn’t mature: Clean its measure set Compute its maturity Plan new measures if required How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
  • 43. Measure Task and Process Measure Process: 1 Retrieve an available Java code 2 Iterate while this code isn’t mature: Clean its measure set Compute its maturity Plan new measures if required Perform these measures 3 Send the report of this code How Green are Java Best Practices? GreenDays | 2014-07-01 16 / 33
  • 44. Analyzing Measures, Codes, Practices 1 Eco-Design and Best Practices 2 Formalizing Practices 3 Measuring Codes 4 Analyzing Measures, Codes, Practices Clean and Canonical Measures Code Maturity Results 5 Eco-Design Indicators How Green are Java Best Practices? GreenDays | 2014-07-01 17 / 33
  • 45. Clean and Canonical Measures 3 kinds of measure disturbances: How Green are Java Best Practices? GreenDays | 2014-07-01 18 / 33
  • 46. Clean and Canonical Measures 3 kinds of measure disturbances: disturbances before the measure task underestimate How Green are Java Best Practices? GreenDays | 2014-07-01 18 / 33
  • 47. Clean and Canonical Measures 3 kinds of measure disturbances: disturbances before the measure task underestimate disturbances after the measure task overestimate How Green are Java Best Practices? GreenDays | 2014-07-01 18 / 33
  • 48. Clean and Canonical Measures 3 kinds of measure disturbances: disturbances before the measure task underestimate disturbances after the measure task overestimate disturbances during the measure task overestimate How Green are Java Best Practices? GreenDays | 2014-07-01 18 / 33
  • 49. Clean and Canonical Measures 3 kinds of measure disturbances: disturbances before the measure task disturbances after the measure task disturbances during the measure task 2 mere algorithms for cleaning measures: How Green are Java Best Practices? GreenDays | 2014-07-01 19 / 33
  • 50. Clean and Canonical Measures 3 kinds of measure disturbances: disturbances before the measure task disturbances after the measure task disturbances during the measure task 2 mere algorithms for cleaning measures: bounds checking algorithm (over a single measure) How Green are Java Best Practices? GreenDays | 2014-07-01 19 / 33
  • 51. Clean and Canonical Measures 3 kinds of measure disturbances: disturbances before the measure task disturbances after the measure task disturbances during the measure task 2 mere algorithms for cleaning measures: bounds checking algorithm (over a single measure) split-and-merge algorithm (over a set of measures) How Green are Java Best Practices? GreenDays | 2014-07-01 19 / 33
  • 52. Clean and Canonical Measures Cleaning algorithm evaluation: 500 clean measures from 25 rules annotated by 3 experts How Green are Java Best Practices? GreenDays | 2014-07-01 20 / 33
  • 53. Clean and Canonical Measures Cleaning algorithm evaluation: 500 clean measures from 25 rules annotated by 3 experts inter-agreement κ: 0.94 (almost perfect) How Green are Java Best Practices? GreenDays | 2014-07-01 20 / 33
  • 54. Clean and Canonical Measures Cleaning algorithm evaluation: 500 clean measures from 25 rules annotated by 3 experts inter-agreement κ: 0.94 (almost perfect) baseline = quartile method precision: 0.953 recall: 0.911 How Green are Java Best Practices? GreenDays | 2014-07-01 20 / 33
  • 55. Clean and Canonical Measures Cleaning algorithm evaluation: 500 clean measures from 25 rules annotated by 3 experts inter-agreement κ: 0.94 (almost perfect) baseline = quartile method precision: 0.953 recall: 0.911 split-and-merge algorithm precision: 0.941 recall: 1.0 How Green are Java Best Practices? GreenDays | 2014-07-01 20 / 33
  • 56. Clean and Canonical Measures Cleaning algorithm evaluation: 500 clean measures from 25 rules annotated by 3 experts inter-agreement κ: 0.94 (almost perfect) baseline = quartile method precision: 0.953 recall: 0.911 split-and-merge algorithm precision: 0.941 recall: 1.0 remove all disturbed measures How Green are Java Best Practices? GreenDays | 2014-07-01 20 / 33
  • 57. Clean and Canonical Measures Canonical measure: How Green are Java Best Practices? GreenDays | 2014-07-01 21 / 33
  • 58. Clean and Canonical Measures Canonical measure: time: t3 space: s3 energy: e3 time: t2 space: s2 energy: e2 time: t1 space: s1 energy: e1 How Green are Java Best Practices? GreenDays | 2014-07-01 21 / 33
  • 59. Clean and Canonical Measures Canonical measure: time: t3 space: s3 energy: e3 time: t2 space: s2 energy: e2 time: t1 space: s1 energy: e1 time: t space: s energy: e How Green are Java Best Practices? GreenDays | 2014-07-01 21 / 33
  • 60. Clean and Canonical Measures Canonical measure: time: t3 space: s3 energy: e3 time: t2 space: s2 energy: e2 time: t1 space: s1 energy: e1 time: t space: s energy: e How Green are Java Best Practices? GreenDays | 2014-07-01 21 / 33
  • 61. Clean and Canonical Measures Canonical measure: time: t3 space: s3 energy: e3 time: t2 space: s2 energy: e2 time: t1 space: s1 energy: e1 time: t space: s energy: e How Green are Java Best Practices? GreenDays | 2014-07-01 21 / 33
  • 62. Clean and Canonical Measures Canonical measure: time: t3 space: s3 energy: e3 time: t2 space: s2 energy: e2 time: t1 space: s1 energy: e1 time: t space: s energy: e error margin: 2% How Green are Java Best Practices? GreenDays | 2014-07-01 21 / 33
  • 63. Code Maturity Code Maturity How many clean measures required for reliable results? How Green are Java Best Practices? GreenDays | 2014-07-01 22 / 33
  • 64. Code Maturity Code Maturity How many clean measures required for reliable results? 0 20 40 60 80 100 120 5 10 15 Measure Number RelativeStandardDeviation How Green are Java Best Practices? GreenDays | 2014-07-01 22 / 33
  • 65. Code Maturity Code Maturity How many clean measures required for reliable results? 0 20 40 60 80 100 120 5 10 15 Measure Number RelativeStandardDeviation a set of 25 measures minimum How Green are Java Best Practices? GreenDays | 2014-07-01 22 / 33
  • 66. Code Maturity Code Maturity How many clean measures required for reliable results? 0 20 40 60 80 100 120 5 10 15 Measure Number RelativeStandardDeviation a set of 25 measures minimum a standard deviation less than 10% How Green are Java Best Practices? GreenDays | 2014-07-01 22 / 33
  • 67. Results Energy in nanojoules, time in nanoseconds Memory in kilobytes Standard Deviation on Energy Replace Object Initialization by Literal Initialization Rule Id GreenEnergy GrayEnergy GreenTime GrayTime GreenMemory GrayMemory GreenStdDev GrayStdDev String 697 7885 842 7827 4136 36104 4.40% 8.14% Float 10311 10448 4736 4127 20032 20032 5.85% 6.58% Integer 685 9575 833 4591 4048 20032 5.21% 6.51% Boolean 683 6267 775 4741 4048 20032 4.77% 7.03% Char 695 33067 840 4595 4048 20032 5.04% 4.65% Double 10003 10210 5810 4270 28032 28032 5.58% 7.83% Long 669 8236 807 6066 4056 28032 2.89% 5.32% Short 680 7819 819 3846 4048 20031 4.87% 7.71% How Green are Java Best Practices? GreenDays | 2014-07-01 23 / 33
  • 68. Results Replace Object Initialization by Literal Initialization Rule Id G reen Energy G ray Energy A bsolute G ain Relative G ain String 697 7885 7188 91.16% Float 10311 10448 137 1.31% Integer 685 9575 8890 92.54% Boolean 683 6267 5584 89.10% Char 695 33067 32372 97.89% Double 10003 10210 207 2.02% Long 669 8236 7567 91.87% Short 680 7819 7139 91.30% How Green are Java Best Practices? GreenDays | 2014-07-01 24 / 33
  • 69. Results Rules for loops A Prefer integer loop counters B Avoid method loop conditions C Prefer comparison-to-0 conditions D Prefer first common condition Id GreenEnergy GrayEnergy GreenTime GrayTime GreenMemory GrayMemory GreenStdDev GrayStdDev A 82 98 4744 5931 16 16 8.66% 7.46% B 8376 8602 6181 6364 20056 20056 3.83% 6.14% C 89 284 4709 17367 16 16 5.09% 5.78% D 97 100 4934 5017 16 16 4.37% 4.60% How Green are Java Best Practices? GreenDays | 2014-07-01 25 / 33
  • 70. Results Rules for loops A Prefer integer loop counters B Avoid method loop conditions C Prefer comparison-to-0 conditions D Prefer first common condition Id G reen Energy G ray Energy A bsolute G ain Relative G ain A 82 98 16 16.32% B 8376 8602 226 2.62% C 89 284 195 68.66% D 97 100 3 3.00% How Green are Java Best Practices? GreenDays | 2014-07-01 25 / 33
  • 71. Results Set String Builder or Buffer Size A String Buffer/Builder capacity initialization B String Buffer/Builder capacity setting C String Buffer/Builder length setting Id GreenEnergy GrayEnergy GreenTime GrayTime GreenMemory GrayMemory GreenStdDev GrayStdDev A 593 1053 38085 59111 52056 73784 7.11% 8.40% B 598 1053 38495 59111 52056 73784 7.86% 8.40% C 1211 1053 59111 70765 73784 104064 8.40% 9.40% A’ 378 899 19278 41088 52056 73784 8.27% 7.18% B’ 429 899 41088 51214 73784 104064 7.18% 5.84% C’ 1043 899 20976 41088 52056 73784 6.01% 7.18% How Green are Java Best Practices? GreenDays | 2014-07-01 26 / 33
  • 72. Results Set String Builder or Buffer Size A String Buffer/Builder capacity initialization B String Buffer/Builder capacity setting C String Buffer/Builder length setting Id G reen Energy G ray Energy A bsolute G ain Relative G ain A 593 1053 460 43.68% B 598 1053 455 43.20% C 1211 1053 -158 -15.00% A’ 378 899 521 57.95% B’ 429 899 470 52.28% C’ 1043 899 -144 -16.01% How Green are Java Best Practices? GreenDays | 2014-07-01 26 / 33
  • 73. Eco-Design Indicators 1 Eco-Design and Best Practices 2 Formalizing Practices 3 Measuring Codes 4 Analyzing Measures, Codes, Practices 5 Eco-Design Indicators Summary Future How Green are Java Best Practices? GreenDays | 2014-07-01 27 / 33
  • 74. Eco-Design Indicators How Green are Java Best Practices? GreenDays | 2014-07-01 28 / 33
  • 75. Eco-Design Indicators Hypothesis Best Coding Practices ≈ Eco-Design Rules 174 formalized and measured rules How Green are Java Best Practices? GreenDays | 2014-07-01 29 / 33
  • 76. Eco-Design Indicators Hypothesis Best Coding Practices ≈ Eco-Design Rules 174 formalized and measured rules 55% rules huge savings (more than 10%) How Green are Java Best Practices? GreenDays | 2014-07-01 29 / 33
  • 77. Eco-Design Indicators Hypothesis Best Coding Practices ≈ Eco-Design Rules 174 formalized and measured rules 55% rules huge savings (more than 10%) 20% rules few savings (between 3% and 10%) How Green are Java Best Practices? GreenDays | 2014-07-01 29 / 33
  • 78. Eco-Design Indicators Hypothesis Best Coding Practices ≈ Eco-Design Rules 174 formalized and measured rules 55% rules huge savings (more than 10%) 20% rules few savings (between 3% and 10%) 15% rules no savings (between -3% and 3%) How Green are Java Best Practices? GreenDays | 2014-07-01 29 / 33
  • 79. Eco-Design Indicators Hypothesis Best Coding Practices ≈ Eco-Design Rules 174 formalized and measured rules 55% rules huge savings (more than 10%) 20% rules few savings (between 3% and 10%) 15% rules no savings (between -3% and 3%) 10% rules some losses (less than -3%) How Green are Java Best Practices? GreenDays | 2014-07-01 29 / 33
  • 80. Eco-Design Indicators With The Way: 1 reliable measure system How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
  • 81. Eco-Design Indicators With The Way: 1 reliable measure system hybrid physical and logical sensor management How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
  • 82. Eco-Design Indicators With The Way: 1 reliable measure system hybrid physical and logical sensor management complex client/server architecture How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
  • 83. Eco-Design Indicators With The Way: 1 reliable measure system hybrid physical and logical sensor management complex client/server architecture focused star schema database How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
  • 84. Eco-Design Indicators With The Way: 1 reliable measure system hybrid physical and logical sensor management complex client/server architecture focused star schema database robust automatic iterative process How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
  • 85. Eco-Design Indicators With The Way: 1 reliable measure system hybrid physical and logical sensor management complex client/server architecture focused star schema database robust automatic iterative process extensible programming API How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
  • 86. Eco-Design Indicators With The Way: 1 reliable measure system hybrid physical and logical sensor management complex client/server architecture focused star schema database robust automatic iterative process extensible programming API reliable stable measure sets with few measures How Green are Java Best Practices? GreenDays | 2014-07-01 30 / 33
  • 87. Eco-Design Indicators • Jérôme Rocheteau, Virginie Gaillard, et Lamya Belhaj. How Green are Java Best Coding Practices? Proceedings of the 3rd International Conference on Smart Grids and Green IT Systems, pages 235–246. Barcelona, Espagne, Avril 2014. How Green are Java Best Practices? GreenDays | 2014-07-01 31 / 33
  • 88. Future 1 Energy Efficiency Classes? How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
  • 89. Future 1 Energy Efficiency Classes? 2 Eco-Design Indicators? How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
  • 90. Future 1 Energy Efficiency Classes? 2 Eco-Design Indicators? Absolute savings How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
  • 91. Future 1 Energy Efficiency Classes? 2 Eco-Design Indicators? Absolute savings Relative savings How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
  • 92. Future 1 Energy Efficiency Classes? 2 Eco-Design Indicators? Absolute savings Relative savings 3 Rule indicators in different environments How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
  • 93. Future 1 Energy Efficiency Classes? 2 Eco-Design Indicators? Absolute savings Relative savings 3 Rule indicators in different environments 4 Rule indicators in different programming languages How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
  • 94. Future 1 Energy Efficiency Classes? 2 Eco-Design Indicators? Absolute savings Relative savings 3 Rule indicators in different environments 4 Rule indicators in different programming languages 5 Energy efficiency of different programming languages How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
  • 95. Future 1 Energy Efficiency Classes? 2 Eco-Design Indicators? Absolute savings Relative savings 3 Rule indicators in different environments 4 Rule indicators in different programming languages 5 Energy efficiency of different programming languages 6 Accuracy of different physical and/or logical sensors How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
  • 96. Future 1 Energy Efficiency Classes? 2 Eco-Design Indicators? Absolute savings Relative savings 3 Rule indicators in different environments 4 Rule indicators in different programming languages 5 Energy efficiency of different programming languages 6 Accuracy of different physical and/or logical sensors 7 Energy and memory footprints of logical sensors How Green are Java Best Practices? GreenDays | 2014-07-01 32 / 33
  • 97. Thank you How Green are Java Best Practices? GreenDays | 2014-07-01 33 / 33
  • 98. Data Model How Green are Java Best Practices? GreenDays | 2014-07-01 33 / 33