easy_profiler icon indicating copy to clipboard operation
easy_profiler copied to clipboard

API for extracting cached information from profiler

Open rokups opened this issue 7 years ago • 7 comments

Since Urho3D maintainers are not interested in making use of easy_profiler i no longer maintain integration. There is however some interest from AtomicGameEngine community. However they want to maintain on-screen display of recent profiling data snapshot.

We already discussed ability to get data tree at runtime in Urho3D forum. But could we get API to receive cached profiling data anyway? Does not have to be anything fancy, just a dump of blocks profiler collected on last frame. Then i could use that to build a tree real-time for display on the screen.

rokups avatar Apr 12 '17 07:04 rokups

As I said in Urho3D forum - blocks are stored in very optimized manner and it is quite hard to get full tree of events from profiler at run-time. We could discuss such functionality but this would require special build flags and the profiler should have different interior itself.

Currently we could make function dumpBlocksToStream() public, then you need to use profiler reader to build hierarchy for you, but I think this is too heavy for run-time operation.

Which profit of displaying these snapshots on screen at run-time? This could be rapidly changed picture which would be quite hard to inspect.

cas4ey avatar Apr 12 '17 11:04 cas4ey

There is no value in this but i have hard time making project maintainers believe that loss of this functionality would have no impact.. Besides they still want to maintain ability to view profiling data without Qt tool. They do not want this heavy dependency to be a requirement.

rokups avatar Apr 12 '17 11:04 rokups

We have included necessary Qt files into release so they do not need to build profiler_gui separately - they could use prebuilt binaries. There is no need to include profiler_gui with its Qt dependencies to the main project so there are no licensing issues.

But if they want to create their own viewer it is not a big problem - they just need to be familiar with .prof file format (they still have to be familiar with it if they want to display it at run-time).

But I still think that displaying profiled information at run-time is too heavy and will break normal frame duration of the profiled application. Then they will refuse this idea and we all together would waste a lot of time for nothing.

This is just my personal opinion though.

@yse what do you think?

cas4ey avatar Apr 12 '17 11:04 cas4ey

@rokups can you please give a link to the conversation at AtomicGameEngine?

cas4ey avatar Apr 12 '17 15:04 cas4ey

Well there wasnt much of a conversation. In a few sentences it boiled down "it would not be cool to loose current functionality". However we seem to be reaching agreement that this indeed could be not required. If you are interested in our discussions drop by on gitter. There is full history of past conversations as well.

rokups avatar Apr 12 '17 15:04 rokups

@rokups I think it would be unfair not to thank you :) Thank you very much for your help, fresh ideas and for a huge work you have done by promoting easy_profiler to AtomicGameEngine and Urho3D community.

cas4ey avatar Apr 12 '17 17:04 cas4ey

Hey thanks! Glad you see it that way, because i was starting to feel like bit of a pest :) I am doing a selfish thing here though. There are bunch of more complete profilers with ogl/dx/vulkan profiling already but they seem to follow this webapp trend and stick their profiling data viewers into the browser. It is horrible. easy_profiler on the other hand has stellar profiling tool. To not make use of it would be a crime.

rokups avatar Apr 13 '17 08:04 rokups