Methodological Guidelines for Measuring Energy Consumption of Software Applications