Skip to content

Commit 41f182f

Browse files
Merge pull request #856 from erikdarlingdata/sync/planalyzer-from-ps-apr16
Sync PlanAnalyzer + BenefitScorer from PerformanceStudio (Apr 9-16)
2 parents 2b67f09 + e668b76 commit 41f182f

6 files changed

Lines changed: 1900 additions & 77 deletions

File tree

Dashboard/Models/PlanModels.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public class PlanStatement
6161
public SetOptionsInfo? SetOptions { get; set; }
6262
public List<PlanParameter> Parameters { get; set; } = new();
6363
public List<WaitStatInfo> WaitStats { get; set; } = new();
64+
public List<WaitBenefit> WaitBenefits { get; set; } = new();
6465
public QueryTimeInfo? QueryTimeStats { get; set; }
6566

6667
// Wave 2: MaxQueryMemory + QueryPlan-level warnings
@@ -370,6 +371,17 @@ public class PlanWarning
370371
public string Message { get; set; } = "";
371372
public PlanWarningSeverity Severity { get; set; }
372373
public SpillDetail? SpillDetails { get; set; }
374+
375+
/// <summary>
376+
/// Maximum percentage of elapsed time that could be saved by addressing this finding.
377+
/// null = not quantifiable, 0 = calculated as negligible.
378+
/// </summary>
379+
public double? MaxBenefitPercent { get; set; }
380+
381+
/// <summary>
382+
/// Short actionable fix suggestion (e.g., "Add INCLUDE (columns) to index").
383+
/// </summary>
384+
public string? ActionableFix { get; set; }
373385
}
374386

375387
public enum PlanWarningSeverity { Info, Warning, Critical }
@@ -433,6 +445,13 @@ public class PlanParameter
433445
public string? RuntimeValue { get; set; }
434446
}
435447

448+
public class WaitBenefit
449+
{
450+
public string WaitType { get; set; } = "";
451+
public double MaxBenefitPercent { get; set; }
452+
public string Category { get; set; } = "";
453+
}
454+
436455
public class WaitStatInfo
437456
{
438457
public string WaitType { get; set; } = "";

0 commit comments

Comments
 (0)