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

Instance Metrics using OxQL #2654

Draft
wants to merge 61 commits into
base: main
Choose a base branch
from
Draft

Instance Metrics using OxQL #2654

wants to merge 61 commits into from

Conversation

charliepark
Copy link
Contributor

Still very much in flux; creating a draft PR for easier comparing/contrasting/discussing.

Copy link

vercel bot commented Jan 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Feb 22, 2025 1:10am

@david-crespo
Copy link
Collaborator

david-crespo commented Jan 18, 2025

Once you have something basically working (you might already, I didn’t check) it might be worth looking at getting better mock data to make iteration and testing easier. One way to start would be to take a real response for a decent sized time range and hard code it as a mock response, filtered by the time range extracted from the OxQL query with regexes. It’ll be janky but the goal is to be just complex enough to support testing the UI.

@benjaminleonard
Copy link
Contributor

benjaminleonard commented Jan 20, 2025

Once you have something basically working (you might already, I didn’t check) it might be worth looking at getting better mock data to make iteration and testing easier.

That's probably better, to get something more accurate.

I have a silly alternative that could work. By modifying the generateUtilization function to walk deterministically based on the time. We interpolate between the start and end time (maybe snap to nearest n time) – and use that as the seed for for the randomness, so even as the relative time moves the values stay consistent.

@charliepark
Copy link
Contributor Author

charliepark commented Jan 27, 2025

It's coming along; will push latest shortly. I had been originally trying to map the existing charts, but chatted with @bnaecker on Friday, and he noted that showing the data as it comes through from OxQL will be a bit more useful to people.

Regarding the existing (top) and new (bottom) charts …
Screenshot 2025-01-27 at 11 33 31 AM
Ben noted …

Folks generally want to know "when was my disk busy", or "how many ops were in this period". To answer that in the bottom, you just look at those spikes. To answer that in the top, you have to look at the periods where the slope is high.

Two instances to check out from dogfood to see read data:

Alan noted that Crucible is having some issues writing write data, so the writes charts aren't useful right now.

@david-crespo
Copy link
Collaborator

Looks fantastic. Glad the data is more useful!

@david-crespo david-crespo linked an issue Jan 31, 2025 that may be closed by this pull request
@benjaminleonard
Copy link
Contributor

Making note of a few polish things would be nice to get in:

  1. Loading state
  2. Error state
  3. Feedback on the refresh button
  4. Empty state
  5. Y axis auto width
  6. Style OxQL button (design has this as a dropdown – we could potentially have CLI command copy in here too? Or "Docs" that takes you to the associated section, e.g. virtual_disk:reads

* OxQL metrics more actions

* take CopyCodeModal refactor further, fix motion import

* move oxql schema docs thing into links file

---------

Co-authored-by: David Crespo <[email protected]>
* Dynamic Y axis width

* Remove spacing and make tick size/margin explicit

* Need spacing on old cards
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.

Instance CPU metrics
4 participants