Relative percentage display for Console output #174
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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 馃殌