How can I check the power draw of an application? #5766
Replies: 1 comment
-
Posted at 2022-04-25 by malaire No, there is no way to measure power draw (easily). When I asked that earlier Gordon said that he has has some setup where watch is opened and connected to external battery, with power meter, to measure power draw. Posted at 2022-04-25 by HughB There is a list somewhere of the m/A draw per hardware element. GPS will flatten the battery in 6 hours. Posted at 2022-04-25 by @gfwilliams It's listed here: https://www.espruino.com/Bangle.js2#power-consumption About all you can do without opening it is to look at the battery percentage change after a day of running it... Posted at 2022-04-25 by @fanoush
If you mostly care only about CPU activity = your code running too long/too much/in busy loop, there is Posted at 2022-04-25 by @gfwilliams Actually a good one is Generally if you actually see it flashing once a second on the clock, it's something that'll end up using a reasonable amount of power (so ~1 week battery rather than a month) edit: interestingly it is possible to look at SysTick ( Posted at 2023-02-20 by @halemmerich While trying things out for my current power manager app changes, I found this thread and was intrigued by @gfwilliams 's last edit. Some experimentation lead to:
Is this actually a valid way to guesstimate CPU-usage? On an bangle without boot code this shows 6-7% non-idle time while being connected to bluetooth. That drops down to 2.5% without bluetooth. Since there is a bit of stuff ongoing every 250/2000ms, that seems to be believable to me. Scrolling around in the launcher can get up to 100% as long I am actively scrolling. Posted at 2023-02-22 by @gfwilliams Wow, thanks for that experimentation! I'd say yes, that looks like it could be pretty good.
That sounds about right, yes. Interestingly we do have a SysTick_Handler in Posted at 2023-02-27 by m-p{3} It would be really handy to troubleshoot battery life issues, right now I'm struggling to keep it to last two days on a single charge, and I ran a calibration after charging it for three hours, the flattened the battery, recharged it for thee hours and the issue persists, so I don't think it's a calibration issue. I don't receive more notifications than usual either.
Attachments: Posted at 2023-02-27 by @halemmerich https://espruino.github.io/BangleApps/?id=powermanager now has some logging capability for power use troubleshooting. It can show you code executed by timeouts and intervals and some estimation for hardware use. Posted at 2023-02-28 by m-p{3} Hmm so I enabled logging, the watch got really sluggish, and at some point frozen. I had to force it to reboot and it said
😬 Posted at 2023-03-01 by @gfwilliams :( that's not good. Sorry to hear that - however maybe if the storage had got corrupt, it was that which was causing your battery to run flat so fast? Posted at 2023-03-01 by @halemmerich That really should not happen. Did you use the detail logging? That can write a lot of data relatively fast into a storage file. Normal logging writes two files every 5 minutes and on reloads. Do you know how full the storage was? Posted at 2023-03-01 by m-p{3} Sadly I don't, I didn't get the chance to look at the logs before it happened. I've reconfigured my watch from scratch, keeping the apps and tweaks to a minimum. We'll see how it goes from there, and if the battery drain happens again I'll make sure to capture the logs often. Posted at 2023-03-05 by m-p{3} I switched back to 2v16 and the battery draw is back to normal. I'll have to dig deeper to find the source of the drain. Posted at 2023-03-07 by m-p{3} Two days later, the difference is quite drastic, with the same set of apps. Attachments: Posted at 2023-03-08 by user140377 Did you look at the logging of power manager by now? Posted at 2023-03-16 by Cthulhu Hi there I've been fighting battery drain issues on my kickstarter Bangle for the last couple of months. I've tried factory resetting multiple times and only installing a minimum amount of apps. But so far to avail. It's gotten so bad that the watch will lock up and drain the battery in a matter of hours. Attachments: Posted at 2023-03-16 by m-p{3}
I have the same issue with Banglejs Gadgetbridge (v0.71.2a-banglejs, from Google Play Store), so I usually disconnects from GB and do the update through https://banglejs.com/apps using Chrome / Bromite. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-04-24 by Asynchronous
I'm writing an application and need to check and record the watch's power draw while it runs.
Is there any command I can run, or alternative method, to check the power draw?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions