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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative percentage display for Console output #174

Closed
wants to merge 5 commits into from

Conversation

Khreas
Copy link

@Khreas Khreas commented Jan 5, 2022

Hello!

First of all, thanks for the great package. I discovered it recently but am already a big fan of it! 馃巼

Issue #132 and issue #171 mentioned the fact that displaying percentages alongside actual timings could be interesting. The kind of percentages discussed in the two issues are not exactly the same. #171 mentioned the percentage of time a frame took to execute compared to the whole execution time while #132 mentioned the percentages of time a frame took relatively to its direct siblings.

Since I am also interested in this kind feature, I have implemented a specific processor that computes the percentage of time for a specific frame given its direct siblings. Switching to the overall execution percentage should be easy by modifying the said processor.

Plus, I modified the ConsoleRenderer and the Profiler classes by adding a parameter that controls whether those percentages should be displayed or not. Finally, I added a command line switch that would trigger the

Here's what it looks like:

image

I did not push the development too far (like adding that to the HTML output) for the moment to leave room for discussion, but if you think that such changes could be of any interest, I'll gladly add support to HTML / JSONRenderers!

Have a nice day 馃殌

@joerick
Copy link
Owner

joerick commented Jan 8, 2022

Hi @Khreas, thanks for sending this over! I personally think that percentages relative to the total as seen in #171 might be more useful. Would that suit your use case also? Additionally, I wanted to have a look at how we might generalise the renderer options so that other renderers can add options without further expanding the command line interface. So I might take a crack at this myself and see where I end up.

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

Successfully merging this pull request may close these issues.

None yet

2 participants