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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to restrict the statistics window to a time frame and display both inclusive/exclusive times at once. #67

Closed
simonvanbernem opened this issue Jul 4, 2020 · 12 comments

Comments

@simonvanbernem
Copy link
Contributor

I quite often want to know things like "what functions took long during this frame", "how often did this zone appear during this function call", "was this also a problem when the client wasn't connected to the server" or "what took long only during startup". Right now, tracy can't answer these questions since the statistics evaluates all zones globally. It would be great, to be able to restrict the statistics window to a timeframe, similar to how one can create annotations. Just select a timeframe and the statistics only evaluate zones that overlap the timeframe. Then tracy would be able to answer all these questions.

Also one more oddity I noticed: inclusive/exclusive time measurement is a toggle in tracy, when basically all other profiling frontends I know display this information side by side. I don't know if there is a benefit from doing this differently, but personally, I have stumbled a couple of times about this break in convention. So if there is no good reason why this is the way it is, I would find it more accessible to match the existing convention.

@wolfpld
Copy link
Owner

wolfpld commented Jul 4, 2020

Also one more oddity I noticed: inclusive/exclusive time measurement is a toggle in tracy, when basically all other profiling frontends I know display this information side by side. I don't know if there is a benefit from doing this differently, but personally, I have stumbled a couple of times about this break in convention. So if there is no good reason why this is the way it is, I would find it more accessible to match the existing convention.

This is mostly to reduce UI clutter and in some cases, to reduce performance impact.

@simonvanbernem
Copy link
Contributor Author

I would not imagine it to be problem for the UI personally. But it's no biggy either way, just wanted to put it up for consideration.

@wolfpld
Copy link
Owner

wolfpld commented Aug 6, 2020

Proof of concept implementation is available in e18e941.

@simonvanbernem
Copy link
Contributor Author

I'm playing around with it right now. This is great! I love that you can right click the frame and directly go to the limits menu instantly!

The only thing I could possibly nitpick is that when the statistics-limit and find-limit zones overlap, the diagonal pattern doesn't stay exactly the same. Sometimes it interleaves nicely like
here and sometimes it merges not so nicely like
here. But thats already so minor it feels ridiculous to mention.

Thanks for adding this feature!

@wolfpld
Copy link
Owner

wolfpld commented Aug 6, 2020

If you want to play with stripes alignment, DrawStripedRect() in TracyImGui.hpp is the place to look at.

@simonvanbernem
Copy link
Contributor Author

I will try that. I also just noticed a real bug: If I draw a find- or statistic-limit from right to left (so the start point of my drag is to the right of the end point) tracy generates a 0-length limit. Doing the same with annotations works as expected.

@simonvanbernem
Copy link
Contributor Author

Ok, so I extended DrawStripedRect to be able to fix the stripes in screenspace and to invert them (via two bool params). This leads to this look when the two zones overlap, no matter how they are sized or placed:
grafik
How do I send you this so you can check it out? I have never contributed to a github, soo... do I just commit to a local branch and do a pull-request or something?

@wolfpld
Copy link
Owner

wolfpld commented Aug 6, 2020

Fork, push changes, create a pull request :)

@wolfpld
Copy link
Owner

wolfpld commented Aug 6, 2020

I also just noticed a real bug: If I draw a find- or statistic-limit from right to left (so the start point of my drag is to the right of the end point) tracy generates a 0-length limit.

Fixed.

@simonvanbernem
Copy link
Contributor Author

simonvanbernem commented Aug 7, 2020

Fork, push changes, create a pull request :)

here you go #86
(For some reason I could not get my fork to build because of this 1>freetyped.lib(sfnt.c.obj) : error LNK2019: unresolved external symbol BrotliDecoderDecompress referenced in function woff2_decompress so I hope the CI doesn't kick my butt)

@wolfpld wolfpld closed this as completed Aug 7, 2020
@mcleary
Copy link

mcleary commented Aug 7, 2020

Fork, push changes, create a pull request :)

here you go #86
(For some reason I could not get my fork to build because of this 1>freetyped.lib(sfnt.c.obj) : error LNK2019: unresolved external symbol BrotliDecoderDecompress referenced in function woff2_decompress so I hope the CI doesn't kick my butt)

I got the same error when doing a clean building from master. I believe something changed in the packages and freetype is not compatible with brotli anymore at tip

@wolfpld
Copy link
Owner

wolfpld commented Aug 7, 2020

This is due to random breakages in vcpkg...

microsoft/vcpkg#12405

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

No branches or pull requests

3 participants