tracy icon indicating copy to clipboard operation
tracy copied to clipboard

Best way to handle "fixed frame frequency" frames

Open jorgenpt opened this issue 1 year ago • 2 comments

I've got an application where the main frame loop is running at a fixed frequency (10Hz, in this case). We intentionally run a "sleep" every frame if the main workload doesn't consume the full 100ms. This means that in the profiler, unless we run over our budget, the frame always shows up as taking ~100ms. Is there a way to make the main frame concept in the application discontinuous? We can use FrameMarkStart/FrameMarkEnd to create a pair of discontinuous frames around our main body of work, but I don't see a way to not have the default frames that also include the time we sleep. I would assume that graphical applications that use VSync would have the same problem as well?

jorgenpt avatar Jul 20 '22 21:07 jorgenpt

There is no way to change how the "main" frames work.

wolfpld avatar Jul 22 '22 11:07 wolfpld

The above still stands, but Tracy now suppresses display of empty frame sets, so if you don't do any calls to FrameMark, you shouldn't be seeing the main frame set anymore.

wolfpld avatar Oct 29 '22 21:10 wolfpld