-
Notifications
You must be signed in to change notification settings - Fork 783
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
Use Performance API to add "User Timings" #1296
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't done a full review, but I like this idea! A couple thoughts:
-
Looks like the Performance API has started to land in newer Node versions. It would be good if we supported that use case as well. Any issues with adding support for that?
-
Do you have any thoughts on adding tests for these? On the one hand, any tests are likely to feel like they're testing implementation details, but if users start querying the Performance marks/measurements, then we want to make sure we don't break them.
Yeah, looks like node could also be supported, but I'd rather land this first and add node support in a subsequent PR. Tests would be nice, but we'd have to mock the performance API, and I'm not sure if it's worth it 🤔 |
@trentmwillis I have a hard time finding any tests for the |
@trentmwillis friendly reminder :) |
@trentmwillis bump |
Sorry y'all, I've been busy. I'll take a look at this sometime this week. Adding a reminder so I don't forget... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reports are tested indirectly via the "events" tests.
After reviewing again, I'm fine with landing this as-is. We can add Node support and tests in follow-up PRs.
Thanks! And sorry for taking so long to merge
awesome, thank you @trentmwillis :) |
@trentmwillis any plans on a release in the near future? |
@Turbo87 yep, within the next day. See #1311 (comment) |
Great, thanks a lot! |
awesome! |
I had implemented a similar thing using the
on()
event handlers for one of our projects and it was invaluable in tracking down slowness in our test suite. Having this implemented in QUnit by default makes it even more accessible for people that don't know about this API yet. :)/cc @trentmwillis