Measuring and reducing energy consumption of streaming