GoogleCloudPlatform / professional-services

Common solutions and tools developed by Google Cloud's Professional Services team. This repository and its contents are not an officially supported Google product.
Apache License 2.0
2.82k stars 1.33k forks source link

bq-visualizer: duration-based coloring of stages #453

Open timurakhmadeev opened 4 years ago

timurakhmadeev commented 4 years ago

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.
agold-rh commented 1 year ago

@ryanmcdowell @smeyn Do you have input here, or should this be closed?