Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Measuring CPU, Memory and FPS on main thread is not accurate #7

Closed
LeoNatan opened this issue May 16, 2017 · 3 comments
Closed

Measuring CPU, Memory and FPS on main thread is not accurate #7

LeoNatan opened this issue May 16, 2017 · 3 comments

Comments

@LeoNatan
Copy link

Hello,

Very nice toolkit!
One thing I’ve noticed is, the more blocked the main thread is, the less accurate the measurements are. Especially the FPS measurement, it is possible to lose entire CPU spikes (60 fps -> quick ramp up of a CPU spike for some time -> 60 fps). I have found that the CADisplayLink strategy for measuring FPS is not the most accurate if main thread spikes exist.

One challenge with moving the measurements to a background queue is updating the widget and table view. This can be solved by using a CATextLayer to update the text in a background queue (CALayer and CATransation are thread safe as of iOS 4).

Would you be interested in a PR that accomplishes this?

@dbukowski
Copy link
Owner

Hello @LeoNatan!

Thank you very much for the kind words about the library and the effort to make it better! It would be great if you could open a PR with this change, as I am currently working in my spare time on a new big feature for DBDebugToolkit :)

@LeoNatan
Copy link
Author

Great! 👍

I’ll be working on this soon™. I want to make sure everything is safe to access from any thread.

@gamada-de
Copy link
Collaborator

This issue will be closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants