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

Add performance hints #501

Merged
merged 5 commits into from
Dec 11, 2024
Merged

Add performance hints #501

merged 5 commits into from
Dec 11, 2024

Conversation

ecooper
Copy link
Contributor

@ecooper ecooper commented Dec 10, 2024

Problem

The query API can enable performance hints in the payload summary. This feature is not available in the CLI.

Solution

This PR adds performance hints to query and shell. Within shell, you can toggle them on and off. When using query, they are printed to stderr so they do not interfere with things reading outputs.

Because performance hints come through summary, some parsing logic needs to be in place to protect against that. Additionally, we apply fql formatting to the actual diagnostic text itself. If for whatever reason this fails, we just print the summary as is.

Result

Query
Screenshot 2024-12-10 at 2 07 43 PM

Query w/ summary
Screenshot 2024-12-10 at 3 55 11 PM

Shell
Screenshot 2024-12-10 at 2 08 22 PM

Shell with multiple hints
Screenshot 2024-12-10 at 3 52 00 PM

Testing

Tests were added to prove its wired up to the driver and displays appropriately in shell and query.

@ecooper ecooper requested a review from a team as a code owner December 10, 2024 22:29
@ecooper ecooper merged commit 79681b6 into v3 Dec 11, 2024
4 checks passed
@ecooper ecooper deleted the v3-hints branch December 11, 2024 00:06
@cleve-fauna cleve-fauna mentioned this pull request Dec 13, 2024
@mwilde345 mwilde345 mentioned this pull request Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants