-
Notifications
You must be signed in to change notification settings - Fork 222
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
Option --profiling-enabled #1417
Conversation
@@ -904,6 +905,22 @@ export const options = { | |||
|
|||
{{< /code >}} | |||
|
|||
## Profiling Enabled | |||
|
|||
Enables [pprof](https://pkg.go.dev/net/http/pprof) profiling endpoints under the k6's REST API [address](#address). These endpoints help debug and profile k6 itself. k6's REST API should be enabled as well. |
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.
@olegbespalov I think this looks good, I just have one question here, what does "k6's REST API should be enabled as well" mean? Is that something the user needs to do as well for profiling to work?
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 guess it refers to this: https://k6.io/docs/misc/k6-rest-api/
However, the docs say: By default, that server listens on localhost:6565...
, so I guess that comes by default, and just enabling profiling would be enough? 🤔
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.
The point is that enabled REST API is required for the profiling endpoints. It's enabled by default but could be manually turned off; in that case, profiling endpoints won't be exposed. So, this sentence tries to document that case.
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.
All good and clear to me :)
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.
Gotcha, that makes sense. How would one manually turn that off? 🤔
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.
Pass an empty string like k6 run --address "" script.js
What?
It documents a new
--profiling-enabled
option from the https://github.com/grafana/k6/pull/3370/files.Why?
This is a new option and it should be documented.