I am using the energy profiler to measure energy consumed while executing a python script. The energy measurements provided by the profiler seems to be in mAh. I wanted to measure energy consumed in Watt hours and also in finer granularity. I was wondering if I could use the instantaneous power measurements given by the profiler and compute the energy consumed as the area under the power curve. I am not sure if it is fair to assume that the 0.25 second interval is adequate enough for computing energy consumed accurately.
Any thoughts/suggestions ?