Repository navigation
feat(cli): list every budget and its verdict in the reports - #326
Merged
Merged
Conversation
The reports list every budget the run was given, with its value and verdict: passed, exceeded with by how much, or not measured with why. The human and markdown reports have a Budgets section, the JSON output and the body of --report-to a budgets field, also in each combination of a matrix, and a matrix lists the failed budgets with their combination under its table. A pull request comment says which budget failed, which only stderr said before. cli/src/reporters/budgets-view.js shapes the rows for both reports, and bin.js keeps the verdicts it already computes for the exit code.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
6 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Phase 1 of the budgets, second part (#325 was the first): the reports say which budget failed. Before, only stderr did, which the comment of a pull request does not show.
Human report: a Budgets section with every budget the run was given, passed or not.
Markdown report: the same as a table, for the comment of a pull request (the TTFB row shows the format of a metric that was not measured):
JSON output and
--report-to: abudgetsfield with{ metric, budget, value, unit, verdict, note? }for each budget, also in each combination of a matrix. No field without budgets.Matrix: under the table, the failed budgets with their combination (
<combination>: LCP <value> exceeds budget 250ms), orEvery budget passed. The report of each combination, with--verboseor in its<details>block, has its own Budgets section.cli/src/reporters/budgets-view.jsshapes the rows for both reports, each with its own format of a value, andbin.jskeeps the verdicts it already computes for the exit code.cli/README.md,content/CLI.mdxand the CLI changelog describe it.Test plan
budgetsin the JSON; the failed budgets of a matrix with their combination, andEvery budget passed. They failed before the change.--jsoncarries the verdict of each budget, and--markdownthe table (budgets.test.js); the body of--report-tocarriesbudgets, and has no field without them (report-to.test.js); the human report of a matrix names the combination of the failed budget (matrix.test.js).check:emoji, CLI unit 346 of 346, CLI e2e 586 of 586,test:site44 of 44 (local).--workflow interaction --interact-script click.json --budget-inp 200on a page with a slow button prints✗ INP 304ms budget 200ms exceeded by 104ms;--budget-lcp 2500 --budget-cls 0 --markdownprints the table with both passed.