From 575c31ee079bc3787e37fd794b0ba180715a04af Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Thu, 26 Feb 2026 20:54:20 -0500 Subject: [PATCH 1/2] Add nightly build workflow Scheduled at 6:00 AM UTC (1:00 AM EST), builds from dev branch. Skips if no new commits in 24 hours. Creates a rolling "nightly" pre-release with Dashboard, Lite, and Installer zips. Also supports manual trigger via workflow_dispatch. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/nightly.yml | 148 ++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 .github/workflows/nightly.yml diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..dc1c917 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,148 @@ +name: Nightly Build + +on: + schedule: + # 6:00 AM UTC (1:00 AM EST / 2:00 AM EDT) + - cron: '0 6 * * *' + workflow_dispatch: # manual trigger + +permissions: + contents: write + +jobs: + check: + runs-on: ubuntu-latest + outputs: + has_changes: ${{ steps.check.outputs.has_changes }} + steps: + - uses: actions/checkout@v4 + with: + ref: dev + fetch-depth: 0 + + - name: Check for new commits in last 24 hours + id: check + run: | + RECENT=$(git log --since="24 hours ago" --oneline | head -1) + if [ -n "$RECENT" ]; then + echo "has_changes=true" >> $GITHUB_OUTPUT + echo "New commits found — building nightly" + else + echo "has_changes=false" >> $GITHUB_OUTPUT + echo "No new commits — skipping nightly build" + fi + + build: + needs: check + if: needs.check.outputs.has_changes == 'true' || github.event_name == 'workflow_dispatch' + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + with: + ref: dev + + - name: Setup .NET 8.0 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Set nightly version + id: version + shell: pwsh + run: | + $base = ([xml](Get-Content Dashboard/Dashboard.csproj)).Project.PropertyGroup.Version | Where-Object { $_ } + $date = Get-Date -Format "yyyyMMdd" + $nightly = "$base-nightly.$date" + echo "VERSION=$nightly" >> $env:GITHUB_OUTPUT + echo "Nightly version: $nightly" + + - name: Restore dependencies + run: | + dotnet restore Dashboard/Dashboard.csproj + dotnet restore Lite/PerformanceMonitorLite.csproj + dotnet restore Installer/PerformanceMonitorInstaller.csproj + dotnet restore InstallerGui/InstallerGui.csproj + dotnet restore Lite.Tests/Lite.Tests.csproj + + - name: Run tests + run: dotnet test Lite.Tests/Lite.Tests.csproj -c Release --verbosity normal + + - name: Publish Dashboard + run: dotnet publish Dashboard/Dashboard.csproj -c Release -o publish/Dashboard + + - name: Publish Lite + run: dotnet publish Lite/PerformanceMonitorLite.csproj -c Release -o publish/Lite + + - name: Publish CLI Installer + run: dotnet publish Installer/PerformanceMonitorInstaller.csproj -c Release + + - name: Publish GUI Installer + run: dotnet publish InstallerGui/InstallerGui.csproj -c Release + + - name: Package artifacts + shell: pwsh + run: | + $version = "${{ steps.version.outputs.VERSION }}" + New-Item -ItemType Directory -Force -Path releases + + Compress-Archive -Path 'publish/Dashboard/*' -DestinationPath "releases/PerformanceMonitorDashboard-$version.zip" -Force + Compress-Archive -Path 'publish/Lite/*' -DestinationPath "releases/PerformanceMonitorLite-$version.zip" -Force + + $instDir = 'publish/Installer' + New-Item -ItemType Directory -Force -Path $instDir + New-Item -ItemType Directory -Force -Path "$instDir/install" + New-Item -ItemType Directory -Force -Path "$instDir/upgrades" + + Copy-Item 'Installer/bin/Release/net8.0/win-x64/publish/PerformanceMonitorInstaller.exe' $instDir + Copy-Item 'InstallerGui/bin/Release/net8.0-windows/win-x64/publish/PerformanceMonitorInstallerGui.exe' $instDir -ErrorAction SilentlyContinue + Copy-Item 'install/*.sql' "$instDir/install/" + if (Test-Path 'install/templates') { Copy-Item 'install/templates' "$instDir/install/templates" -Recurse -ErrorAction SilentlyContinue } + if (Test-Path 'upgrades') { Copy-Item 'upgrades/*' "$instDir/upgrades/" -Recurse -ErrorAction SilentlyContinue } + if (Test-Path 'README.md') { Copy-Item 'README.md' $instDir } + if (Test-Path 'LICENSE') { Copy-Item 'LICENSE' $instDir } + if (Test-Path 'THIRD_PARTY_NOTICES.md') { Copy-Item 'THIRD_PARTY_NOTICES.md' $instDir } + + Compress-Archive -Path 'publish/Installer/*' -DestinationPath "releases/PerformanceMonitorInstaller-$version.zip" -Force + + - name: Generate checksums + shell: pwsh + run: | + $checksums = Get-ChildItem releases/*.zip | ForEach-Object { + $hash = (Get-FileHash $_.FullName -Algorithm SHA256).Hash.ToLower() + "$hash $($_.Name)" + } + $checksums | Out-File -FilePath releases/SHA256SUMS.txt -Encoding utf8 + Write-Host "Checksums:" + $checksums | ForEach-Object { Write-Host $_ } + + - name: Delete previous nightly release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release delete nightly --yes --cleanup-tag 2>$null; exit 0 + shell: pwsh + + - name: Create nightly release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: pwsh + run: | + $version = "${{ steps.version.outputs.VERSION }}" + $sha = git rev-parse --short HEAD + $body = @" + Automated nightly build from ``dev`` branch. + + **Version:** ``$version`` + **Commit:** ``$sha`` + **Built:** $(Get-Date -Format "yyyy-MM-dd HH:mm UTC") + + > These builds include the latest changes and may be unstable. + > For production use, download the [latest stable release](https://github.com/erikdarlingdata/PerformanceMonitor/releases/latest). + "@ + + gh release create nightly ` + --target dev ` + --title "Nightly Build ($version)" ` + --notes $body ` + --prerelease ` + releases/*.zip releases/SHA256SUMS.txt From 7d8130a87a352b36498ae74c3f7f747cd2690020 Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:54:09 -0500 Subject: [PATCH 2/2] Revert "Merge pull request #352 from erikdarlingdata/dev" This reverts commit 4202ad7e0b3a2dfce41d0c61ecad4da82cf390cb, reversing changes made to 7c9d981744275d0efa685e693cca0cd60b873708. --- Dashboard/Controls/MemoryContent.xaml.cs | 8 - Dashboard/Controls/PlanViewerControl.xaml | 81 +-- Dashboard/Controls/PlanViewerControl.xaml.cs | 285 ++-------- .../Controls/ResourceMetricsContent.xaml.cs | 17 - .../Controls/SystemEventsContent.xaml.cs | 21 - Dashboard/Helpers/ChartHoverHelper.cs | 5 +- Dashboard/Models/PlanModels.cs | 4 +- Dashboard/Services/PlanAnalyzer.cs | 536 +----------------- Dashboard/Services/ShowPlanParser.cs | 4 +- Installer/Program.cs | 13 - InstallerGui/MainWindow.xaml | 6 - InstallerGui/MainWindow.xaml.cs | 2 - InstallerGui/Services/InstallationService.cs | 12 - Lite/Controls/PlanViewerControl.xaml.cs | 10 +- Lite/Controls/ServerTab.xaml.cs | 25 - Lite/Helpers/ChartHoverHelper.cs | 5 +- Lite/Models/PlanModels.cs | 4 +- Lite/Services/PlanAnalyzer.cs | 536 +----------------- .../RemoteCollectorService.QueryStore.cs | 17 - .../RemoteCollectorService.ServerConfig.cs | 17 - Lite/Services/ShowPlanParser.cs | 4 +- README.md | 1 - install/01_install_database.sql | 45 -- install/08_collect_query_stats.sql | 28 +- install/09_collect_query_store.sql | 68 +-- install/10_collect_procedure_stats.sql | 38 +- install/18_collect_cpu_utilization_stats.sql | 4 +- install/22_collect_blocked_processes.sql | 6 +- install/24_collect_deadlock_xml.sql | 6 +- install/28_collect_system_health_wrapper.sql | 6 +- install/29_collect_default_trace.sql | 6 +- install/39_collect_database_configuration.sql | 17 - install/45_create_agent_jobs.sql | 247 ++++---- 33 files changed, 257 insertions(+), 1827 deletions(-) diff --git a/Dashboard/Controls/MemoryContent.xaml.cs b/Dashboard/Controls/MemoryContent.xaml.cs index f381af5..f78b0ab 100644 --- a/Dashboard/Controls/MemoryContent.xaml.cs +++ b/Dashboard/Controls/MemoryContent.xaml.cs @@ -82,14 +82,6 @@ public MemoryContent() SetupChartContextMenus(); Loaded += OnLoaded; - // Apply dark theme immediately so charts don't flash white before data loads - TabHelpers.ApplyDarkModeToChart(MemoryStatsOverviewChart); - TabHelpers.ApplyDarkModeToChart(MemoryGrantSizingChart); - TabHelpers.ApplyDarkModeToChart(MemoryGrantActivityChart); - TabHelpers.ApplyDarkModeToChart(MemoryClerksChart); - TabHelpers.ApplyDarkModeToChart(PlanCacheChart); - TabHelpers.ApplyDarkModeToChart(MemoryPressureEventsChart); - _memoryStatsOverviewHover = new Helpers.ChartHoverHelper(MemoryStatsOverviewChart, "MB"); _memoryGrantSizingHover = new Helpers.ChartHoverHelper(MemoryGrantSizingChart, "MB"); _memoryGrantActivityHover = new Helpers.ChartHoverHelper(MemoryGrantActivityChart, "count"); diff --git a/Dashboard/Controls/PlanViewerControl.xaml b/Dashboard/Controls/PlanViewerControl.xaml index a3610c9..c5e0608 100644 --- a/Dashboard/Controls/PlanViewerControl.xaml +++ b/Dashboard/Controls/PlanViewerControl.xaml @@ -27,10 +27,13 @@