FPS Debug gauge / GPU Report

I've noticed that when running my SpriteKit game on a Metal capable device, the FPS report in Xcode is gone. Can we hope to see it again some day ? I understand that it was an OpenGL thing but it was quite practical.


In the meantime I'm using SKView's showsFPS property but it's certainly not as convenient to observe frame drops, any other good option ?

Answered by C_Wiz in 143648022

Bumping this old thread with the good news, for those who may not have seen it yet, that the FPS Gauge is back in Xcode 8, and works with Metal rendering ! Very happy about that one, you get :

- Live FPS

- CPU and GPU frame time

- Tiler/Renderer/Device %usage


You also get a double chart that shows how the CPU/GPU Frame time is split, from Render to Physics to Actions, etc etc... It's pretty awesome !


Thanks to the teams who fixed it !

I really need this as well. Any news Apple?

Does anyone know if the GPU report still works on non-metal devices?

I found a workaround and posted the answer here http://stackoverflow.com/a/33962321/2158465

While definitely a good trick, I don't think we can call this a workaround. Switching back to OpenGL ES rendering will not show anything relevant to release builds on those specific devices.

Because OpenGL ES and Metal are very different by design, what's fast with one API isn't with another, and vice versa. One should not assume that because things are fast with OpenGL ES, they will be fast(er) with Metal in my experience with 9.0/9.1. It's still a good trick to check stuff if you don't have a non metal device, but we still reaaaally need proper Metal support in Xcode !

Hi Struct,


There is no performance debugging tool for SpriteKit right now, beyond the runtime show* properties on SKView. Please let us know what you'd like to see in the future. Would an Intruments tool be useful? Would a gauge in Xcode be useful? What sort of metrics are you looking for? Are there specific pitfalls you find yourself falling into often?


If you could wrap some of your feedback in a bug report that would be great help to us.


Cheers

Thanks for your response, greven.


Not having any gauge in Xcode is an issue for me. Right now it shows a blank FPS gauge with 0 FPS and a greyed out "Analyze" button when running on a device in Metal mode, as you know. At the very least we can agree that it's not intuitive to display this, not displaying anything would be better.


When debugging on device it's particularly useful to be able to see a timeline of your FPS drops and not just a realtime counter on device. Even though the gauge in Xcode is basic, it filled a great need for me when trying to understand what caused drops. Clicking on the gauge used to also give you a GPU usage% which was useful for shaders.


Using Instruments can be sort of a workaround but it's not realtime, which doesn't help. The "GPU Driver" instrument will give you a once per second updated frame count which would be nice if realtime. The "Metal Application" is useless for me, considering how I don't know how spritekit works internally, it's one step too removed to be useful.


So a specific SpriteKit instrument, why not, but bringing back the gauge should be top priority in my opinion.


Anyway, as per your request, submitted bug report 23703643.


Edit : Since you asked about what kind of metrics would be useful on top of what used to be, assuming this would be some sort of instrument tool, per frame info that could be useful :

- Classic stuff : FPS, node count, quad count (so like SKView properties but logged)

- Process/Rendering times : Actions evaluation, Simulates physics, Evaluates constrants, view rendering

- Even better would be some info about how things are rendered : some info about what was/wasn't rasterized ? some information on some internal states/optimizations ?


Those are some basic ideas of what could be useful. To give you a practical example of a current issue I'm tracking, it's pretty hard to track why SKEffectNode+shouldRasterize will stop using the rasterization optimisation when I run an action somewhere on the scene, even on some separate part of the node tree. Having better tools to understand where the CPU time is consumed and what makes the rendered take the decision to use raster/not raster and other various batching optimisations would be greatly helpful.

Wouldn't it be useful to know which actions on which node consump most of the resources? Sometimes I need a tool like this.

It definitely would although it's probably hard to track, since actions can impact both rendering time and evaluation time. But anything around action would be a massive help, I agree !

Accepted Answer

Bumping this old thread with the good news, for those who may not have seen it yet, that the FPS Gauge is back in Xcode 8, and works with Metal rendering ! Very happy about that one, you get :

- Live FPS

- CPU and GPU frame time

- Tiler/Renderer/Device %usage


You also get a double chart that shows how the CPU/GPU Frame time is split, from Render to Physics to Actions, etc etc... It's pretty awesome !


Thanks to the teams who fixed it !

FPS Debug gauge / GPU Report
 
 
Q