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

feat: promote env variable to ProfilingEnabled option #3692

Merged

Conversation

Bablzz
Copy link
Contributor

@Bablzz Bablzz commented Apr 18, 2024

What?

Add env option K6_PROFILING_ENABLED to enable it in k6

Why?

Fix issue #3670

Checklist

  • [ x] I have performed a self-review of my code.
  • I have added tests for my changes.
  • [ x] I have run linter locally (make lint) and all checks pass.
  • [ x] I have run tests locally (make tests) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Related PR(s)/Issue(s)

@Bablzz Bablzz requested a review from a team as a code owner April 18, 2024 10:48
@Bablzz Bablzz requested review from mstoykov and oleiade and removed request for a team April 18, 2024 10:48
@CLAassistant
Copy link

CLAassistant commented Apr 18, 2024

CLA assistant check
All committers have signed the CLA.

Comment on lines +180 to +182
if _, ok := env["K6_PROFILING_ENABLED"]; ok {
result.ProfilingEnabled = true
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a test for this in the configuraiton consolidation tests as was previously requested in the issue.

Copy link
Contributor Author

@Bablzz Bablzz Apr 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, yes of course

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and thsi can aso be set by cli flag

Copy link
Contributor Author

@Bablzz Bablzz Apr 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have seen a code - I have to check --profiling-enabled and K6_PROFILING_ENABLED together, right?

@mstoykov mstoykov added this to the v0.51.0 milestone Apr 19, 2024
Copy link
Collaborator

@mstoykov mstoykov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the PR 🙇

@oleiade oleiade merged commit 2fd7096 into grafana:master Apr 24, 2024
21 checks passed
@Bablzz
Copy link
Contributor Author

Bablzz commented Apr 24, 2024

LGTM! Thanks for the PR 🙇

it's a pleasure for me!

@mstoykov mstoykov added the documentation-needed A PR which will need a separate PR for documentation label Apr 24, 2024
@Bablzz Bablzz deleted the feature/promote-profiling-enabled-options branch April 25, 2024 08:01
@Bablzz
Copy link
Contributor Author

Bablzz commented Apr 25, 2024

I can add documentation if nobody disagrees.

@mstoykov
Copy link
Collaborator

Thank you @Bablzz 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation-needed A PR which will need a separate PR for documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants