Claude posting for Erik Darling
PerformanceMonitor never runs BenefitScorer, so no plan finding gets a benefit score, and the scorer's own findings never appear.
Seen
BenefitScorer.Score(ParsedPlan) (PerformanceMonitor.PlanAnalysis/BenefitScorer.cs) exists, and its own doc comment says it "runs after PlanAnalyzer.Analyze()". But no product code calls it. git grep -n "BenefitScorer.Score" -- '*.cs' ':!*Tests*' finds nothing. Every entry point runs only the analyzer:
| Entry point |
File |
Runs on |
| Darling analysis pass (plan advisories) |
PerformanceMonitor.PlanAnalysis/PlanAdvisoryAggregator.cs ~58 |
service thread pool |
| Darling drill-down plans |
Darling/PerformanceMonitor.Darling.Analysis/PgDrillDownCollector.Plans.cs ~79 |
service thread pool |
| MCP plan tools |
PerformanceMonitor.PlanAnalysis/McpPlanAnalysisFormatter.cs ~98 |
web host |
| Lite drill-down |
Lite/Analysis/DrillDownCollector.Plans.cs ~77 |
Lite |
| Plan viewer |
PerformanceMonitor.Ui/PlanViewerControl.xaml.cs ~119 |
UI thread |
So PlanWarning.MaxBenefitPercent and PlanStatement.WaitBenefits are always empty. Nothing reads them in the viewer, MCP output or Lite either.
Why it matters now
The plan-analysis sync (#4511) ports PerformanceStudio changes that live in the scorer, and none of them has any effect in PM until the scorer runs:
PerformanceStudio runs both steps in one place (PlanAnalysisPipeline: analyze, then score).
Fix shape
Run BenefitScorer.Score(plan) right after PlanAnalyzer.Analyze(plan) at each entry point above, or through one shared analyze-then-score helper like PerformanceStudio's. Then decide whether the viewer and the MCP output show each finding's benefit. The deep-plan stack fix (#4512) covers the scorer's recursion too.
Claude posting for Erik Darling
PerformanceMonitor never runs
BenefitScorer, so no plan finding gets a benefit score, and the scorer's own findings never appear.Seen
BenefitScorer.Score(ParsedPlan)(PerformanceMonitor.PlanAnalysis/BenefitScorer.cs) exists, and its own doc comment says it "runs afterPlanAnalyzer.Analyze()". But no product code calls it.git grep -n "BenefitScorer.Score" -- '*.cs' ':!*Tests*'finds nothing. Every entry point runs only the analyzer:PerformanceMonitor.PlanAnalysis/PlanAdvisoryAggregator.cs~58Darling/PerformanceMonitor.Darling.Analysis/PgDrillDownCollector.Plans.cs~79PerformanceMonitor.PlanAnalysis/McpPlanAnalysisFormatter.cs~98Lite/Analysis/DrillDownCollector.Plans.cs~77PerformanceMonitor.Ui/PlanViewerControl.xaml.cs~119So
PlanWarning.MaxBenefitPercentandPlanStatement.WaitBenefitsare always empty. Nothing reads them in the viewer, MCP output or Lite either.Why it matters now
The plan-analysis sync (#4511) ports PerformanceStudio changes that live in the scorer, and none of them has any effect in PM until the scorer runs:
PerformanceStudio runs both steps in one place (
PlanAnalysisPipeline: analyze, then score).Fix shape
Run
BenefitScorer.Score(plan)right afterPlanAnalyzer.Analyze(plan)at each entry point above, or through one shared analyze-then-score helper like PerformanceStudio's. Then decide whether the viewer and the MCP output show each finding's benefit. The deep-plan stack fix (#4512) covers the scorer's recursion too.