Measuring energy and power with PAPI