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

Add customisation for improving performance culture #325

Open
jochemvogel opened this issue Jun 7, 2023 · 6 comments
Open

Add customisation for improving performance culture #325

jochemvogel opened this issue Jun 7, 2023 · 6 comments

Comments

@jochemvogel
Copy link

jochemvogel commented Jun 7, 2023

I recently thought about this and maybe others agree on this. Why not add customisation to the messages shown in the CLI and CI.

For example. I updated line 156 of create-report.js to:

if (typeof check.loadTime !== 'undefined') {
 rows.push(['Loading time', formatTime(check.loadTime), 'for ~1000 users per month'])
}

Can't find a way to modify the loading time. Currently it's set to Slow 3G (400kb/s & 2000ms latency). I would like to update it to the speed of our users.

This issue is not about solving this particular wish, it's about others as well. When possible to customise those messages, it will help to create awareness for the engineers.

image

Could elaborate on this and dive deeper into it, but I first want to see if people agree on this.

Possibly add it to the package.json. Just a rough draft:

"size-limit": [
  {  
     "path": "./clients/dashboard/build/static/js/vendorsMain.*.bundle.js",
     "customConfig": {
         "downloadSpeed": "1200 kb",
         "latency": "800 ms",
         "audienceMessage": "for ~600 users"
  }
],
@ai
Copy link
Owner

ai commented Jun 7, 2023

The best way to do it right now is to use JSON output and generate text output by custom JS code.

If you have a simple way to add a customization to Size Limit (for instance, by plugins), send PR.

@jochemvogel
Copy link
Author

jochemvogel commented Jun 7, 2023

Ah ok, thanks. Makes sense. Is there any way to modify the Slow 3G settings? I've been looking for it for a while now, but looks like it's nowhere configured (which I don't believe).

I could update the docs so others can find it as well.

@ai
Copy link
Owner

ai commented Jun 7, 2023

No, we did not plan to make it customizable.

@jochemvogel
Copy link
Author

Will have a look the coming days to see if it's worth my time. Otherwise I'll close this issue. Thank you.

@zernie
Copy link

zernie commented Jun 3, 2024

@ai Sorry, why isn't it customizable? 99% of our clients are not on slow 3G so it'd be really helpful to have a more realistic metrics

@ai
Copy link
Owner

ai commented Jun 3, 2024

@zernie if nobody want to send PR, it means that feature is not very popular.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants