Battery life is now the top priority for most mobile consumers. Developers need to take action to ensure their app doesn’t consume too much power, but most of them have no idea how much power there app consumes. You could use software like GameBench or Trepn Profiler to measure power consumption, but those run on your device. Collecting large amounts of power data and storing it locally consumes CPU cycles, which can inflate power readings. Another problem is the fact that popular devices, such as the Samsung Galaxy S7 and iPhone 7 do not report accurate power readings. With these devices, you need to measure power using an off-target hardware-based solution.
This article shows you how it’s done: https://mostly-tech.com/2015/05/31/how-to-power-profile-your-app-using-hardware/