For the process that's using the most CPU :
adb shell top

Unfortunately, I'm not sure about the battery drain per app.  I'm still
investigating.  I think we may need a gecko API?  I did find dumpsys and
dumpstate which might be useful for other purposes.


On Wed, Jul 1, 2015 at 12:18 PM, Michael Henretty <mhenre...@mozilla.com>
wrote:

> Thanks Noaki! Is there any way to tell which process is using the most
> CPU? Conversely, do we have any tools to tell us what apps causing battery
> drain?
>
> On Wed, Jul 1, 2015 at 1:06 AM, Naoki Hirata <nhir...@mozilla.com> wrote:
>
>> Here's a script you can place on the sdcard and run from there once you
>> chmod it.
>> Currently, I can't seem to connect adb over wifi (bug 1179144 ).
>> Anyways, here's the script:
>>
>> INTERVAL=1
>>
>> CAPACITYVOLTAGE=0
>> while true; do
>>   PREVVOLTAGE=$CAPACITYVOLTAGE
>>   DATETIME=$(date +'%Y/%m/%d|%H:%M:%S')
>>   CAPACITYVOLTAGE="$(( $(cat
>> /sys/devices/qpnp-charger-f612e800/power_supply/battery/voltage_now) / 1000
>> ))"
>>   CAPACITYPERCENT="$(cat
>> /sys/devices/qpnp-charger-f612e800/power_supply/battery/capacity)"
>>   DISCHARGE="+$(( $CAPACITYVOLTAGE - $PREVVOLTAGE ))"
>>   TEMP="$(( $(cat
>> /sys/devices/qpnp-charger-f612e800/power_supply/battery/temp) / 10 ))"
>>
>>
>>   echo "${DATETIME}|$(echo
>> ${DISCHARGE})mA|${CAPACITYPERCENT}%|${CAPACITYVOLTAGE}mV|${TEMP}°C"
>>
>>   sleep ${INTERVAL}
>> done
>>
>>
>>
>>
>>
>> _______________________________________________
>> dev-gaia mailing list
>> dev-g...@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-gaia
>>
>>
>
_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to