I'd like to measure the FPS (refresh rate) of a certain Android View which uses TextureView. To do this, I need some way to measure FPS programmatically (e.g. not using ADB.exe and not using third party apps or tools).
I have seen this question but it does not answer where to log frame time.
Is there an API within Android to get an event when the screen refreshes or is composed? Using this it would be relatively simple to measure frame time and hence calculate FPS.
Same question for CPU usage. Any or all APIs to measure performance appreciated!