ci: add CodSpeed Vitest benches for parse and HTML render - #388
Draft
farnabaz wants to merge 2 commits into
Draft
Conversation
Introduce isolated Vitest benches and a separate CodSpeed workflow so parser/render regressions can be tracked on main and PRs without mixing into the heavy CI job. Remove the invalid dual-parseMarkdown "benchmark" test and keep mitata scripts for local exploratory comparisons.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
comark
@comark/angular
@comark/ansi
@comark/html
@comark/nuxt
@comark/react
@comark/svelte
@comark/vue
commit: |
Contributor
📦 Bundle size snapshot is out of dateThe published size of one or more packages changed, so the inline snapshot in Please review the diff below. If the change is expected, accept the new snapshot:
Only maintainers with write access can trigger the update. You can also comment Bundle size diff FAIL test/bundle.test.ts > package bundle size > published size of each package
Error: Snapshot `package bundle size > published size of each package 1` mismatched
- Expected
+ Received
@@ -4,7 +4,7 @@
"@comark/html": "18.9k (58 files)",
"@comark/nuxt": "11.8k (58 files)",
"@comark/react": "43.6k (74 files)",
"@comark/svelte": "43.9k (82 files)",
"@comark/vue": "60.5k (78 files)",
- "comark": "423k (156 files)",
+ "comark": "424k (156 files)",
}
❯ test/bundle.test.ts:61:20
59| }
60|
61| expect(report).toMatchInlineSnapshot(`
| ^
62| {
63| "@comark/angular": "60.6k (70 files)",
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯ |
Add dedicated renderMarkdown and parse+renderMarkdown workloads so the CodSpeed suite covers markdown roundtrip stringify, not only HTML.
Congrats! CodSpeed is installed 🎉
You will start to see performance impacts in the reports once the benchmarks are run from your default branch.
|
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.
What
Adds an isolated CodSpeed-compatible Vitest bench suite and a separate
codspeedGitHub Actions workflow so parse/render performance can be tracked onmainand PRs. Retires the invalidbenchmark.test.tsthat measuredparseMarkdownagainst itself under a “markdown-it” label.Why
Performance is a core Comark claim, and parser changes can introduce subtle regressions. The existing Mitata scripts are useful for local exploratory comparisons (including vs markdown-it/exit), but CodSpeed needs Vitest benches and stable, Comark-only workloads. Shipping a focused first suite (parse, autoClose off, incremental streaming, HTML render) in a lightweight workflow keeps signal high without bloating the main CI job. Reporting-only for now — no regression gate until variance is understood.
Notes for reviewers
pnpm bench(wall-clock fallback when not on CodSpeed runners).github/workflows/codspeed.ymlruns CPU simulation on push/PR tomainCODSPEED_TOKENafter installing the CodSpeed GitHub app; without it the job still runs local simulationbenchmarks/*.tsare unchanged for ad-hoc local work