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

Core: Add QUnit.reporters.perf (factor PerfReporter from suite.js) #1714

Merged
merged 2 commits into from
May 29, 2023

Conversation

Krinkle
Copy link
Member

@Krinkle Krinkle commented Apr 27, 2023

This is in preparation for QUnit 3 where we'd like to make it possible to enable this on Node.js, not just in browsers.

For now it remains unconditionally enabled, and limited to browsers by virtue of using window.performance. The reason we don't enable it unconditionally is due to its overhead and that it should remain opt-in for QUnit CLI.

I'm still gathering feedback, but it's possible we'll make it opt-in for browsers as well, depending how significant the overhead is and how often people use this.

Another way might be to leave it on by default when using the HTML reporter, but that when someone configures the list of reporters explicitly (e.g. to enable "TAP" in the browser for a CI pipeline) to then automatically turn off any default reporters ("html" and "perf").

In other words, the default is html+perf, and we could offer a way in QUnit.config to enable tap declaratively in a way that, if you want to also have the html reporter, you have to list it explicitly.

Feedback welcome here, or at #1498.

@Krinkle Krinkle changed the title Core: Introduce QUnit.reporters.perf (factor PerfReporter from suit… Core: Add QUnit.reporters.perf (factor PerfReporter from suit… Apr 27, 2023
@Krinkle Krinkle changed the title Core: Add QUnit.reporters.perf (factor PerfReporter from suit… Core: Add QUnit.reporters.perf (factor PerfReporter from suite.js) Apr 27, 2023
No longer dynamically enumerate reporters, which would include
the newly added invisible "perf" reporter that is currently
browser-only.
@Krinkle Krinkle merged commit 0d034a1 into main May 29, 2023
@Krinkle Krinkle deleted the perf-rep branch May 29, 2023 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant