vercel / speed-insights

Vercel Speed Insights package
https://vercel.com/docs/speed-insights
Apache License 2.0
57 stars 9 forks source link

[Feature Request] Speed Insights CI #66

Closed devjiwonchoi closed 3 months ago

devjiwonchoi commented 6 months ago

Like lighthouse CI, how about we support an API for CI such as GitHub Actions, etc.

Or, we could add this to the Vercel Bot comment?

feugy commented 3 months ago

There's fundamental difference between Lighthouse and Vercel's Speed insights.

Lighthouse is meant to run during continuous integration, because it operates "in the vaccum", that is, on a test machine. Vercel Speed Insights is meant to collect data from "real" users visiting your web application.

Given there's a Vercel preview deployment for each pull request you open on your repository, you could definitely spawn a headless browser during your CI and visit your application. This would report core web vitals in Speed Insights dashboard. However, it would not represent "real" user experience, since your headless browser is not reflective or people's real conditions. That's why, at the time of writing, I don't see the value of reporting performance during CI.