Skip to content

Plan viewer: colour each plan edge by how far actual rows differ from the estimate #4579

Closed

Description

@erikdarlingdata

Part of #4511, plan viewer parity with PerformanceStudio (PS). The viewer control is shared by the Darling Viewer and Lite, so each change lands in both.

"Colored links" is edge (elbow-connector) coloring by the child operator's estimate-vs-actual row-count ratio, replacing the flat EdgeBrush. PS erikdarlingdata/PerformanceStudio@70d28e6 (PlanViewerControl.Rendering.cs:379-447, GetLinkColorBrush(PlanNode, double divergenceLimit)): only colors edges on actual plans (estimated plans keep neutral EdgeBrush); computes accuracyRatio = ActualRows/EstimateRows; within [1/limit, limit] stays neutral; outside that band climbs through Light Orange → Fluo Orange → Fluo Red (overestimated, i.e. fewer actual rows) or Blue → Light Blue → Fluo Blue (underestimated) at limit, limit×10, limit×100 thresholds. limit is a user setting, AccuracyRatioDivergenceLimit (default 10), loaded once per render, floored at 2.0. The minimap (D2) reuses the same function.

PM has only a single static EdgeBrush (PlanViewerControl.xaml.cs:39) — no accuracy-based coloring, no setting. WPF equivalent: a pure helper GetLinkColorBrush(PlanNode child, double divergenceLimit) returning one of 7 brushes, called from wherever PM builds its elbow-connector Path/Line (need to locate PM's edge-drawing method in PlanViewerControl.Rendering.cs — not yet read in this pass); add AccuracyRatioDivergenceLimit to PM's settings service.

At 08f3e3c4e. PS reference: its dev branch at 85492a1.

Activity

  1. added a commit that references this issue on Sep 28, 2026
    461d503
  2. erikdarlingdata commented on Sep 28, 2026

    @erikdarlingdata
    OwnerAuthor

    Closed by the watcher: delivered in PR #4586, merged to dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions