Skip to content

Commit 6ccdf9a

Browse files
Raise wait stats cap from 20 to 30/50 so poison waits are never dropped (#139) (#172)
SQL view TOP (20) → TOP (50) ensures low-volume poison waits like THREADPOOL reach the client. UI default selection cap raised from 20 to 30 across both Dashboard and Lite, giving enough room for poison waits + usual suspects + top 10 without squeezing. Closes #139 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 03033ae commit 6ccdf9a

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

Dashboard/Controls/ResourceMetricsContent.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="5,2">
113113
<Button Content="Top Waits" Click="WaitTypes_SelectAll_Click" Padding="6,2" FontSize="10" Margin="0,0,5,0"/>
114114
<Button Content="Clear All" Click="WaitTypes_ClearAll_Click" Padding="6,2" FontSize="10"/>
115-
<TextBlock x:Name="WaitTypeCountText" Text="0 / 20 selected" FontSize="10" Foreground="{DynamicResource ForegroundMutedBrush}" VerticalAlignment="Center" Margin="8,0,0,0"/>
115+
<TextBlock x:Name="WaitTypeCountText" Text="0 / 30 selected" FontSize="10" Foreground="{DynamicResource ForegroundMutedBrush}" VerticalAlignment="Center" Margin="8,0,0,0"/>
116116
</StackPanel>
117117
<TextBox Grid.Row="2" x:Name="WaitTypeSearchBox" Margin="5,2" Height="24" FontSize="11"
118118
TextChanged="WaitTypeSearch_TextChanged"

Dashboard/Controls/ResourceMetricsContent.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,8 +1923,8 @@ private void UpdateWaitTypeCount()
19231923
{
19241924
if (_waitTypeItems == null || WaitTypeCountText == null) return;
19251925
int count = _waitTypeItems.Count(x => x.IsSelected);
1926-
WaitTypeCountText.Text = $"{count} / 20 selected";
1927-
WaitTypeCountText.Foreground = count >= 20
1926+
WaitTypeCountText.Text = $"{count} / 30 selected";
1927+
WaitTypeCountText.Foreground = count >= 30
19281928
? new System.Windows.Media.SolidColorBrush((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#E57373")!)
19291929
: (System.Windows.Media.Brush)FindResource("ForegroundMutedBrush");
19301930
}

Dashboard/Helpers/TabHelpers.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public static class TabHelpers
8787

8888
/// <summary>
8989
/// Returns the set of wait types that should be selected by default:
90-
/// poison waits + usual suspects + top 10 by total wait time (deduped), capped at 20.
90+
/// poison waits + usual suspects + top 10 by total wait time (deduped), capped at 30.
9191
/// The availableWaitTypes list must be sorted by total wait time descending.
9292
/// </summary>
9393
public static HashSet<string> GetDefaultWaitTypes(IList<string> availableWaitTypes)
@@ -108,11 +108,11 @@ public static HashSet<string> GetDefaultWaitTypes(IList<string> availableWaitTyp
108108
if (w.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
109109
defaults.Add(w);
110110

111-
// 4. Top 10 by total wait time (items not already in the set), hard cap at 20 total
111+
// 4. Top 10 by total wait time (items not already in the set), hard cap at 30 total
112112
int added = 0;
113113
foreach (var w in availableWaitTypes)
114114
{
115-
if (defaults.Count >= 20) break;
115+
if (defaults.Count >= 30) break;
116116
if (added >= 10) break;
117117
if (defaults.Add(w))
118118
{

Lite/Controls/ServerTab.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,0,0,4">
128128
<Button Content="Top Waits" Click="WaitTypeSelectAll_Click" Padding="6,2" Margin="0,0,4,0" FontSize="11"/>
129129
<Button Content="Clear All" Click="WaitTypeClearAll_Click" Padding="6,2" FontSize="11"/>
130-
<TextBlock x:Name="WaitTypeCountText" Text="0 / 20 selected" FontSize="10" Foreground="{StaticResource ForegroundMutedBrush}" VerticalAlignment="Center" Margin="8,0,0,0"/>
130+
<TextBlock x:Name="WaitTypeCountText" Text="0 / 30 selected" FontSize="10" Foreground="{StaticResource ForegroundMutedBrush}" VerticalAlignment="Center" Margin="8,0,0,0"/>
131131
</StackPanel>
132132
<TextBox Grid.Row="2" x:Name="WaitTypeSearchBox" TextChanged="WaitTypeSearch_TextChanged"
133133
Margin="0,0,0,4" Padding="4,2"/>

Lite/Controls/ServerTab.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ private static HashSet<string> GetDefaultWaitTypes(List<string> availableWaitTyp
11191119
int added = 0;
11201120
foreach (var w in availableWaitTypes)
11211121
{
1122-
if (defaults.Count >= 20) break;
1122+
if (defaults.Count >= 30) break;
11231123
if (added >= 10) break;
11241124
if (defaults.Add(w)) { added++; }
11251125
}
@@ -1156,8 +1156,8 @@ private void UpdateWaitTypeCount()
11561156
{
11571157
if (_waitTypeItems == null || WaitTypeCountText == null) return;
11581158
int count = _waitTypeItems.Count(x => x.IsSelected);
1159-
WaitTypeCountText.Text = $"{count} / 20 selected";
1160-
WaitTypeCountText.Foreground = count >= 20
1159+
WaitTypeCountText.Text = $"{count} / 30 selected";
1160+
WaitTypeCountText.Foreground = count >= 30
11611161
? new SolidColorBrush((System.Windows.Media.Color)ColorConverter.ConvertFromString("#E57373")!)
11621162
: (System.Windows.Media.Brush)FindResource("ForegroundMutedBrush");
11631163
}

install/47_create_reporting_views.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ WITH
144144
WHERE ws.collection_time >= DATEADD(HOUR, -1, SYSDATETIME())
145145
AND ws.wait_time_ms_delta > 0
146146
)
147-
SELECT TOP (20)
147+
SELECT TOP (50)
148148
wait_type = rw.wait_type,
149149
wait_time_ms = rw.wait_time_ms_delta,
150150
wait_time_sec = rw.wait_time_ms_delta / 1000.0,

0 commit comments

Comments
 (0)