I am developing an app for the pebble watch and I would like to find out the CPU and battery usage of the watch while the app is running.
I am searching through the documentation but I did not find anything so far regarding the CPU usage, nor I found a similar question somewhere.
Is there a way to get that kind of data?
Related
Do you have any ideas for finding out why the phone's battery will be too hot?
I implement the PWA site with React and Firebase (firestore). And I'm running into the above problem. To find out about it, I watch the following tools.
Chrome's memory tab
performance's memory tab
Please tell me other ways to find out why the battery is hot.
There are many reasons why your phone runs hot and we are unable to deduce which is the main cause with the data provided. But, some reasons why your phone runs hot may be old hardware, deteriorated battery, the cpu consumption of your page is too high, there is a lot of data transfers happening in the background and many more. Sometimes it might not be even your page that is causing your phone to run hot.
I am developing a UWP app which could have a fair amount of memory pressure.
I want to adapt the memory usage, so that I don't get short of it when I need.
Is there a way inside the App (I am thinking mainly about an event that I can register from my App or MainPage, or something similar...) to get notified when i.e. the memory usage of the App reached 90% of the allowed value for my App (e.g. in tablets) or 90% of the available memory of the overall system?
Thank you!
Your best bet for this is the MemoryManager.AppMemoryUsageIncreased event:
https://learn.microsoft.com/en-us/uwp/api/windows.system.memorymanager.appmemoryusageincreased
If this isn't granular enough for your purpose, you could monitor MemoryManager.AppMemoryUsage property yourself, relative to the MemoryManager.AppMemoryUsageLimit property
https://learn.microsoft.com/en-us/uwp/api/windows.system.memorymanager.appmemoryusage
https://learn.microsoft.com/en-us/uwp/api/windows.system.memorymanager.appmemoryusagelimit
I'm working to reduce the CPU load on an RN app. I've built the app to a device, in release, and trimmed the console logs from the project. Even after doing this the app is still around 33% CPU usage mostly on a blank screen.
The interesting part is that occasionally, about after 6 minutes, the CPU frees up and drops to 3-4%. I suspect that a really long loop has completed but I am unable to find it.
I've run the app in Xcode's Instruments, it's only on iOS atm, and found some interesting things. From the looks of it, it's gotten into a long chain of [CALayer renderInContext] which is coming from UVVideoRecorder. I'm not familiar with UVVideoRecorder and would love to hear any thoughts people might have.
Call Stack + Threads
I suggest using Why Did You Render which will help you track when and why every component re-render ... and hence catch unnecessary re-renders to optimize it....
I think profiling can help you with this. You can get detailed information about work done in the JavaScript thread and main thread side-by-side.
Profiling in React Native - https://reactnative.dev/docs/profiling
I, and a few other of my Android app users, run a Galaxy Nexus. Most of us find the app to be blazing fast, but a couple are reporting that it is unusably slow also on a Galaxy Nexus. I'm shocked to hear them tell me that the buttons, scrolling, etc. are all slow. The main view of the app is a ListView containing many images, textviews, etc. In fact, you can check out the app for free on Google Play if you feel like digging deeper. I'm trying to compile a checklist of what might cause this issue.
Here's what I have so far:
Low memory
Low disk space
Uncaught errors
Rooted device (?)
Any other ideas?
More importantly, is there any way to detect (or even adjust for!) potential problems?
Some other things:
CPU Usage (monitor via an app like WatchDog (it's free)); it mightn't be your app that's the problem
Android version.
Connection speed (Wi-Fi vs 4G vs 3G vs 1x)
Carrier (since they like to flash their own custom ROMs)
AFAIK Android version and connection speed are exposed by the SDK, not sure about CPU usage or carrier.
Of the errors you listed, I think that low memory would be the most likely factor.
If I were you, I'd create a function that would collect as much of this information as possible and send it to your email (or someplace). Then, have some way for the user to call this function (e.g. in the settings menu or someplace like that).
Granted this is all just intuition as an end-user, I have little experience debugging deployed apps from the coding side.
I'm currently having a hard time driving down the peak memory consumption of my background agent below the 6MB limit. Are there any recommendations for WP7 capable memory profilers. I am not even asking for something along the lines of dotTrace but basically anything that offers some insight about what's going on.
The Windows Phone SDK comes with a profiler for both memory consumption, and other things, that's available in Visual Studio after installation of the SDK.
You can read more about it on MSDN
Also, try look isolated at the background agent code, and move it to a separate application, where you run it in the foreground. That could possible make it easier for you to nail where the problem is.