-
Notifications
You must be signed in to change notification settings - Fork 4
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
Utils for tagging stages #6
Conversation
src/stages.js
Outdated
// TODO: should we use another tag key? | ||
exec.vu.tags['stage'] = getStageProfile() |
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.
Opinions?
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.
My opinion is that at least tagWithCurrentStageIndex
and tagWithCurrentStageProfile
should not use the same key. I mean, what if a customer wants to have them both? 🤔
src/stages.js
Outdated
// TODO: should we use another tag key? | ||
exec.vu.tags['stage'] = getStageProfile() |
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.
My opinion is that at least tagWithCurrentStageIndex
and tagWithCurrentStageProfile
should not use the same key. I mean, what if a customer wants to have them both? 🤔
Added some more edge cases, and applied more refactor for making the code a bit more readable. Let me know if you have better ideas for having a better code for |
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.
Nickel Chrome! Great work! 🎉
Ok, based on the approvals we are ready to open a PR on the docs and the relative PR on |
Cool to see "unit tests" using k6chaijs! 🎉 |
This PR implements the code for tagging stages, adding some utils function for getting and tagging with the index (or the computed profile) of the current running stage.
It requires an
xk6
build of grafana/k6#2493 for running the tests.