GoogleCloudPlatform / GoogleCloudPlatform/professional-services
bq-visualizer: duration-based coloring of stages
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 1.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 44
Description
In a complex plan with 100+ steps, it's not immediately obvious which step(s) account for most of the time spent executing query. You can see those steps on the Timing tab, but you can't see dependencies here.
So, here's a suggestion:
1. take the duration for each stage, and assign node color depending on the percentage of time spent executing this step
2. on top of that, a minor but perhaps important addition would be to also show what type of activity took the most time
Example:
"wait (ms) ": "avg: 553 max: 598",
"read (ms) ": "avg: 0 max: 0",
"compute (ms) ": "avg: 46,406 max: 2,088,480",
"write (ms) ": "avg: 2 max: 50",
"duration ": "0.628% - 90.012%"
Here you see that stage duration is 90% with most of the time spent in compute.
If you assign colors to wait/read/write/compute as grey/blue/red/green, and then:
1. use different tints for stages: those taking relatively small time from the total would be pale, and those taking more time would be bright
2. divide each stage' box and use colors for showing type of activity taking the most based on the maximum time; or simply use a single color depending on the type of the longest activity of that stage.
Contributor guide
Research direction
Start by examining the bq-visualizer and its Timing tab, then trace how stage durations and activity metrics are displayed. Define how duration percentages, activity types, and color intensity should be represented before implementing the visualization and checking it against complex plans with many stages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- google-cloud, python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100