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 setting for grid spacing on temporal axis #195

Merged
merged 4 commits into from
Jul 31, 2024

Conversation

chrisduerr
Copy link
Contributor

@chrisduerr chrisduerr commented Feb 15, 2024

Add the ability to change the spacing of the x-axis indicators from the default 10ms to an arbitrary interval. This is particularly useful to determine when a frame misses its desired vblank.


This change is primarily motivated by my own necessity to easily determine when a particular frame ran for over ~16ms and specifically which part of the flamegraph caused it to stretch beyond that limit. It's probably not the ideal solution, but I wanted to open up a PR to see if there's any interest in this feature from upstream.

One particularity of the current implementation is that 1, 10, 100, and 1000 all behave the same, since the interval is somewhat relative to the current viewport's width. I don't care about this since it doesn't really make a difference (you just need to zoom in/out), but I can see how that might be an undesired user experience.

tmp.mp4

Add the ability to change the spacing of the x-axis indicators from the
default 10ms to an arbitrary interval. This is particularly useful to
determine when a frame misses its desired vblank.
Copy link
Collaborator

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make more to have an option to add an additional line at a user-specified time (e.g. 16.666ms)?

@chrisduerr
Copy link
Contributor Author

Would it make more to have an option to add an additional line at a user-specified time (e.g. 16.666ms)?

Do you mean drawing a separate vertical line in the grid? That certainly would be an option but I'm not sure how nicely that would look like when the two are close to each other. I'd also still want multiple lines, since it's good to know if a worst case missed one vblank, or two. Everyone knows about 16.6…, but 33.3… (at least to me) is usually acquired by some quick maths in my head, so it's nice to just have the indicators to clearly show you those intervals.

@emilk emilk changed the title puffin_egui: Add input for dynamic graph x-axis indicators Add setting for grid spacing on temporal axis Jul 31, 2024
@emilk emilk merged commit 8ac2733 into EmbarkStudios:main Jul 31, 2024
1 of 6 checks passed
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.

2 participants