Skip to content

Commit 9cf649a

Browse files
Merge pull request #283 from erikdarlingdata/feature/issue-281-memory-grant-charts
Issue #281: Standardize memory grant stats and add charts
2 parents 98d5e56 + 9995376 commit 9cf649a

21 files changed

Lines changed: 828 additions & 469 deletions

Dashboard/Controls/MemoryContent.xaml

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -95,34 +95,40 @@
9595

9696
<!-- Memory Grants Sub-Tab -->
9797
<TabItem Header="Memory Grants">
98-
<!-- Chart + Summary Panel (grid removed) -->
99-
<Border BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Margin="5">
100-
<Grid>
101-
<Grid.RowDefinitions>
102-
<RowDefinition Height="Auto"/>
103-
<RowDefinition Height="*"/>
104-
<RowDefinition Height="Auto"/>
105-
</Grid.RowDefinitions>
106-
<TextBlock Grid.Row="0" Text="Memory Grants Over Time" FontWeight="Bold" FontSize="14" Margin="10,5" Foreground="{DynamicResource ForegroundBrush}"/>
107-
<ScottPlot:WpfPlot Grid.Row="1" x:Name="MemoryGrantsChart"/>
108-
<!-- Summary Panel -->
109-
<Border Grid.Row="2" Background="{DynamicResource BackgroundBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0" Padding="10,8">
110-
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
111-
<TextBlock Text="Grantees:" FontWeight="SemiBold" Foreground="{DynamicResource ForegroundDimBrush}" VerticalAlignment="Center" Margin="0,0,5,0"/>
112-
<TextBlock x:Name="MemoryGrantsGranteesText" Text="0" Foreground="{DynamicResource ForegroundBrush}" VerticalAlignment="Center" Margin="0,0,20,0"/>
113-
<TextBlock Text="Waiters:" FontWeight="SemiBold" Foreground="{DynamicResource ForegroundDimBrush}" VerticalAlignment="Center" Margin="0,0,5,0"/>
114-
<TextBlock x:Name="MemoryGrantsWaitersText" Text="0" Foreground="{DynamicResource ForegroundBrush}" VerticalAlignment="Center" Margin="0,0,20,0"/>
115-
<TextBlock Text="Timeouts:" FontWeight="SemiBold" Foreground="{DynamicResource ForegroundDimBrush}" VerticalAlignment="Center" Margin="0,0,5,0"/>
116-
<TextBlock x:Name="MemoryGrantsTimeoutsText" Text="0" Foreground="{DynamicResource ForegroundBrush}" VerticalAlignment="Center" Margin="0,0,20,0"/>
117-
<TextBlock Text="Forced:" FontWeight="SemiBold" Foreground="{DynamicResource ForegroundDimBrush}" VerticalAlignment="Center" Margin="0,0,5,0"/>
118-
<TextBlock x:Name="MemoryGrantsForcedText" Text="0" Foreground="{DynamicResource ForegroundBrush}" VerticalAlignment="Center"/>
119-
</StackPanel>
120-
</Border>
121-
<TextBlock x:Name="MemoryGrantsNoDataMessage" Grid.Row="1" Style="{StaticResource EmptyStateMessage}"
122-
Text="No memory grant data in selected time range"/>
123-
<controls:LoadingOverlay x:Name="MemoryGrantsLoading" Grid.Row="1"/>
124-
</Grid>
125-
</Border>
98+
<Grid>
99+
<Grid.RowDefinitions>
100+
<RowDefinition Height="*"/>
101+
<RowDefinition Height="*"/>
102+
</Grid.RowDefinitions>
103+
<!-- Chart 1: Memory Grant Sizing -->
104+
<Border Grid.Row="0" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Margin="5,5,5,2">
105+
<Grid>
106+
<Grid.RowDefinitions>
107+
<RowDefinition Height="Auto"/>
108+
<RowDefinition Height="*"/>
109+
</Grid.RowDefinitions>
110+
<TextBlock Grid.Row="0" Text="Memory Grant Sizing Over Time" FontWeight="Bold" FontSize="14" Margin="10,5" Foreground="{DynamicResource ForegroundBrush}"/>
111+
<ScottPlot:WpfPlot Grid.Row="1" x:Name="MemoryGrantSizingChart"/>
112+
<TextBlock x:Name="MemoryGrantSizingNoData" Grid.Row="1" Style="{StaticResource EmptyStateMessage}"
113+
Text="No memory grant data in selected time range"/>
114+
<controls:LoadingOverlay x:Name="MemoryGrantSizingLoading" Grid.Row="1"/>
115+
</Grid>
116+
</Border>
117+
<!-- Chart 2: Memory Grant Activity -->
118+
<Border Grid.Row="1" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Margin="5,2,5,5">
119+
<Grid>
120+
<Grid.RowDefinitions>
121+
<RowDefinition Height="Auto"/>
122+
<RowDefinition Height="*"/>
123+
</Grid.RowDefinitions>
124+
<TextBlock Grid.Row="0" Text="Memory Grant Activity Over Time" FontWeight="Bold" FontSize="14" Margin="10,5" Foreground="{DynamicResource ForegroundBrush}"/>
125+
<ScottPlot:WpfPlot Grid.Row="1" x:Name="MemoryGrantActivityChart"/>
126+
<TextBlock x:Name="MemoryGrantActivityNoData" Grid.Row="1" Style="{StaticResource EmptyStateMessage}"
127+
Text="No memory grant data in selected time range"/>
128+
<controls:LoadingOverlay x:Name="MemoryGrantActivityLoading" Grid.Row="1"/>
129+
</Grid>
130+
</Border>
131+
</Grid>
126132
</TabItem>
127133

128134
<!-- Memory Clerks Sub-Tab -->

0 commit comments

Comments
 (0)