-
Notifications
You must be signed in to change notification settings - Fork 21
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
k6-summary: update to v0.1.0 #113
Conversation
ec1b3cf
to
9da4729
Compare
9da4729
to
f7f9aa8
Compare
The build was produced by the CI and attached as release artifact https://github.com/grafana/k6-jslib-summary/releases/tag/v0.1.0 |
lib/k6-summary/0.1.0/index.js
Outdated
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'm not too familiar with the codebase and I've noticed that some libs/versions are minified and some aren't, so I wanted to ask: do we have guidelines for this?
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.
yep, that was the case and created some kind of confusion, but we'd like to try set up most of the projects with minification (like in a PR grafana/k6-jslib-summary#8) and at some point automate updating of this repo code, by using the artifacts from the releases
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.
IMO minifying with adding the map file doesn't make much sense for k6.
k6 does by default download and load map files as to make developer experience better. As such all the savings from not minifying will be not existant.
I am pretty sure we minify others for:
- k6 did not have source map support
- this is what you just do with js ... 🤷
I guess we can make k6 stop doing this by default, but then the UX will be worse whenever there is an exception.
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.
Okay, than I had a wrong assumption. How about just minify the scripts then?
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.
IMO - it doesn't matter as much either way - which is why I approved this.
In the end on each test run k6 will download those files once.
If a user use k6 archive
and then runs the archive - only on the archive
command they will be downloaded.
Which also means that in the cloud only on k6 cloud
but ont on just rerunnign from the UI or if it is scheduled.
All in all I expect the amount of downloads is not significant to matter whether:
- we minify it.
- k6 has to download a map as well as 1
- we do not modify it k6 has to download slightly bigger file.
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.
Then to go back to the original question, it seems to me that the guideline we would like to have is to not minify the scripts. And, the reason is so we can keep their projects simpler. Am I getting it right?
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.
@codebien I believe that you don't. The main point of the discussion right now are source maps. Minifying and source maps are related, but the minifying doesn't require source maps.
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.
LGTM!
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.
LGTM!
With the caveat that minifying source doesn't really help k6 .. it makes it worse
Description
Please fill in this template.
npm run test
command succeeds.yarn run generate-homepage
locally and verify the new homepage/lib/index.html
file looks legit.Select one of these and delete the others:
If adding a new jslib:
/lib/{jslib_name}
folder./lib/{jslib_name}/{desired_version}
folder./lib/{jslib_name}/{desired_version}/index.js
file containing the jslib's code bundle exists.supported.json
file to contain an entry for the newly added jslib and its{desired_version}
, as in the following example:/tests/basic.js
and/tests/testSuite.js
to ensure that the added jslib is importable and runnable by k6.If publishing a new version of an existing jslib:
version bump
label./lib/{jslib_name}/{desired_version}
folder./lib/{jslib_name}/{desired_version}/index.js
file containing the jslib's code bundle.supported.json
file to contain an entry for the newly added jslib version, as in the following example:/tests/basic.js
and/tests/testSuite.js
files to ensure that the new version of the jslib is importable and runnable by k6.