You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Profiling with psutil directly in code
Reading RAM and CPU used
Completion of 50 000 000 cycles to amplify impacts
Application of the formula for calculating the CO2 equivalent present on this url: https://boavizta.org/blog/empreinte-de-la-fabrication-d-un-serveur
servermanufgwp(kgCO2eq) = servertypegwp(kgCO2eq) + cpuunits(unit) x cpubasegwp(kgCO2eq/unit) + ramsize(GB) x ramsizegwp(kgCO2eq/GB)
Calculating the differential between code implementing bad code and code implementing good code practice
Validation
The rule is not really validated by the measurement.
Link to the code used to validate the rule: https://github.com/JulienPlanque/python-profiling
Validation result
Lancement du conteneur pour le script avoidDoubleQuoteCheckBad.py...
4478091441.0
Lancement du conteneur pour le script avoidDoubleQuoteCheckGood.py...
4478091411.0
Calculation of deltas:
Delta between bad practice and good code practice for rule AvoidListComprehensionInIterations: 30
The text was updated successfully, but these errors were encountered:
AntoineMeheut
changed the title
[Hackaton 2024][Rhodium-Antimoine][PYTHON] Avoid Double Quote Check Bad
[Hackaton 2024][Rhodium-Antimoine][PYTHON] Avoid Double Quote Check
May 30, 2024
Associated rule title
[PYTHON] Avoid Double Quote Check
Associated rule link
https://github.com/green-code-initiative/ecoCode/blob/main/ecocode-rules-specifications/src/main/rules/EC66/python/EC66.asciidoc
Language and platform
Example: Python
Itel proc 12th Gen Core i7-1255U 1,7 GHz
Docker container : python:3.9-slim
memory = 4go
swap = 6go
cpu=2
Measure justification
Profiling with psutil directly in code
Reading RAM and CPU used
Completion of 50 000 000 cycles to amplify impacts
Application of the formula for calculating the CO2 equivalent present on this url: https://boavizta.org/blog/empreinte-de-la-fabrication-d-un-serveur
servermanufgwp(kgCO2eq) = servertypegwp(kgCO2eq) + cpuunits(unit) x cpubasegwp(kgCO2eq/unit) + ramsize(GB) x ramsizegwp(kgCO2eq/GB)
Calculating the differential between code implementing bad code and code implementing good code practice
Validation
The rule is not really validated by the measurement.
Link to the code used to validate the rule: https://github.com/JulienPlanque/python-profiling
Validation result
Lancement du conteneur pour le script avoidDoubleQuoteCheckBad.py...
4478091441.0
Lancement du conteneur pour le script avoidDoubleQuoteCheckGood.py...
4478091411.0
Calculation of deltas:
Delta between bad practice and good code practice for rule AvoidListComprehensionInIterations: 30
The text was updated successfully, but these errors were encountered: