Repository navigation
Wait-category colours: a laid-out, contrast-checked palette - #4583
Merged
Merged
Conversation
Port PerformanceStudio dev's contrast-checked wait-category palette (erikdarlingdata/PerformanceStudio@161785f) into the shared ChartPalette.WaitColor table consumed by the Darling Viewer's plan viewer and Lite's wait charts. Hue carries the family, lightness climbs within a family, and every colour now clears a 3:1 contrast floor against the chart background; three previously did not. Re-checked the light-background override table against the new hexes: kept SQL CLR and Full Text Search with recomputed overrides, dropped Replication's (its new hue reads fine unmodified).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4578. Part of #4511.
Why
erikdarlingdata/PerformanceStudio@161785f replaced 23 individually-picked wait-category colours with a laid-out palette: hue carries the family (green = compute, blue = storage/network, warm = contention, grey = "no information"), lightness climbs within a family so neighbours stay apart under simulated colour-vision deficiency, and every colour clears a 3:1 contrast floor against the chart background. Three of the old colours failed that floor (Buffer IO measured 2.00), and two pairs shared a hue outright.
What changes
PerformanceMonitor.Common/ChartPalette.cs'sWaitCategoryColorstable now holds PerformanceStudio dev's hex values, copied verbatim from its currentDarkTheme.axaml(unchanged since 161785f through PS dev 85492a1).WaitCategoryColorsLight(PM's own light-background override, which PS's Avalonia app has no equivalent for) is kept as a mechanism, but re-checked against the new hexes: SQL CLR and Full Text Search still need a darker override on light backgrounds and got new values computed against their new base colours; Replication's new hue reads fine unmodified on a light background, so its entry was dropped.Batch Modeis a PM-only category with no counterpart in PS's diff (PM classifies batch-mode hash/bitmap-filter waits separately; PS folds them elsewhere); its colour is untouched — PM-ahead, not part of this port.ChartPalette.WaitColoris shared code (PerformanceMonitor.Common), consumed by both the Darling Viewer's plan viewer and Lite's wait charts through the same call path, so both get the new palette with this one change.Test plan
New file
Darling/Darling.Tests/Viewer4578Tests.cs:WaitColor(category, lightBackground: false)matches PS dev's hex, byte for byte;#1A1D23,BackgroundBrushin PS'sDarkTheme.axaml), the same floor PS's commit measured against.Built clean, 0 warnings / 0 errors, on
Darling.Tests.csproj -c Release -p:EnableWindowsTargeting=true.Ran in-process on macOS (
dotnet Darling.Tests.dll -class Darling.Tests.Viewer4578Tests):Total: 46, Errors: 0, Failed: 0, Skipped: 0.RED confirmed against pre-fix dev (130bc6a, a disposable worktree, same test file copied in, built and run the same way):
Total: 46, Errors: 0, Failed: 26. The 26 failures are the 23 golden-hex mismatches plus 3 contrast failures (Buffer IO, Mirroring, Others — the categories whose old colours sat under or near the 3:1 floor).Lite: gets this too, since it renders wait charts through the same shared
ChartPalette.WaitColor. No Lite-specific code changed; not separately pinned because the helper it calls is the one pinned above.CHANGELOG
SECTION: Changed
ENTRY: - Wait-category colours use PerformanceStudio's contrast-checked palette ([#4583]) - Wait-category chart colours in the plan viewer and Lite's wait charts now use a laid-out, contrast-checked palette instead of individually picked colours, and three colours that fell short of readable contrast against the dark chart background are fixed.
REF: [#4583]: #4583