-
Notifications
You must be signed in to change notification settings - Fork 337
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
chore(*): add codspeed for benchmark visualization #75
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
CodSpeed Performance ReportCongrats! CodSpeed is installed 🎉
You will start to see performance impacts in the reports once the benchmarks are run from your default branch.
|
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.
Way better DX. This motivate contributors intuitively with numbers
benchmarks/partition.bench.ts
Outdated
@@ -3,11 +3,11 @@ import { partition as partitionToolkit } from 'es-toolkit'; | |||
import { partition as partitionLodash } from 'lodash'; | |||
|
|||
describe('partition', () => { | |||
bench('es-toolkit', () => { | |||
bench('es-toolkit/', () => { |
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.
es-toolkit/partition
?
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 fixed it. Thanks! 3020b5d
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.
Thanks!
related #57
Background
Recently, contributions to improve the performance of the es-toolkit have been ongoing. Many people have been measuring performance improvements using the experimental bench feature applied to vitest. (like this)
So I have discovered codspeed, a tool that further automates this process, and I want to install it. We can easliy install this package because we already have
*.bench.ts
files. Prisma is already using it, and it is available for free in public open source projects.Features
CodSpeed visualizes performance metrics, allowing us to see improvements or regressions by comparing with previous benchmarks. We can view these visualizations both in PR comments and on the codSpeed dashboard. (maybe it would be https://codspeed.io/toss/es-toolkit/benchmarks)
Changes
When I tested it in the forked repository, and it was difficult to identify which function belonged to lodash and es-toolkit. So, I added delimiters like
lodash/uniq
andes-toolkit/uniq
in the*.bench.ts
file.