-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: add profiler to query command in cli #21006
Conversation
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.
Other than my one question:
- Can you update
CHANGELOG.md
? - How does passing
-p
change the output of the CLI? Can we updatecmd/influx/query_test.go
to check the new behavior?
cmd/influx/query.go
Outdated
} | ||
|
||
if queryFlags.profiler { | ||
body_map["extern"] = map[string]interface{}{ |
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.
Can you move the map[string]interface{}{...}
definition to a top-level const
? IMO it'd make it more clear that it's a "magic" constant instead of something that depends on user input.
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.
Once it's moved, is there a docs page we could link to in a comment that explains the structure? In case something changes in the future and we need to figure out how this should be updated to match
example output
|
Talked on Slack - would be better to support enabling specific profilers
Closes #21005
influx query -p operator "buckets() |> limit(n:1)"
influx query -p query,operator "buckets() |> limit(n:1)"
influx query -p query "buckets() |> limit(n:1)"