Draft
Conversation
New scenario that clones dotnet/maui, builds dependencies, patches in PerfLabExporter via BenchmarkDotNet.Extensions, and runs the Core, XAML, and Graphics BDN benchmark suites on desktop (Windows). Key implementation details: - Sparse-clone of dotnet/maui with depth 1 (only needed directories) - Patches Directory.Build.props to disable non-desktop TFMs so all builds (including BDN internal builds) work without mobile workloads - Removes MAUI BDN PackageReference, injects BDN.Extensions ProjectRef - Patches Program.cs with ManualConfig + PerfLabExporter - Branch mapping: net11.0 to net11.0, net10.0 to net10.0 - All heavy work in test.py to keep correlation payload small - Pipeline entries disabled until validated in CI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move lifecycle logic (clone, patch, build, run, collect) from standalone test.py into shared/bdndesktop.py BDNDesktopHelper class, following the same pattern as AndroidInstrumentationHelper. Add BDNDESKTOP test type to const.py and runner.py subparser routing. test.py is now 16 lines, delegating to Runner(traits).run(). Tested locally: Graphics.Benchmarks ran successfully via runner path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move clone, branch mapping, sparse checkout, and dependency build into test.py (MAUI-specific orchestrator). BDNDesktopHelper now accepts repo_dir, benchmark_projects, and disable_props as constructor params, making it reusable for any repo's BDN desktop benchmarks. Remove bdndesktop routing from runner.py and const.py since test.py drives the helper directly with its own arg parsing. Tested locally: Graphics.Benchmarks ran successfully via refactored path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new MAUI Desktop BenchmarkDotNet (BDN) scenario to the repo, including a reusable shared helper to patch/build/run external desktop benchmark suites and (optionally) collect/upload PerfLabExporter results.
Changes:
- Introduces
BDNDesktopHelper(shared/bdndesktop.py) to patch TFMs, inject PerfLabExporter, build, run, and collect BDN results from external repos. - Adds a new
mauiDesktopBenchmarksscenario (pre/test/post scripts) plus a Helix project file to run MAUI desktop BDN suites. - Adds (currently disabled) pipeline job stubs for the new run kind in
sdk-perf-jobs.yml.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/scenarios/shared/runner.py | Whitespace-only change in argument parsing. |
| src/scenarios/shared/bdndesktop.py | New shared helper for patching external repos and running/collecting BDN desktop benchmarks. |
| src/scenarios/mauiDesktopBenchmarks/test.py | Clones dotnet/maui, patches props, builds dependencies, runs BDN suites via shared helper. |
| src/scenarios/mauiDesktopBenchmarks/pre.py | Minimal pre-command script (logging only). |
| src/scenarios/mauiDesktopBenchmarks/post.py | Cleans up MAUI repo checkout and combined report artifact. |
| eng/pipelines/sdk-perf-jobs.yml | Adds new MAUI desktop BDN job entries, currently gated by if false. |
| eng/performance/maui_desktop_benchmarks.proj | New Helix project definition for MAUI desktop BDN work item. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+344
to
+347
| basename = os.path.basename(report_file) | ||
| dest = os.path.join(upload_root, basename) | ||
| shutil.copy2(report_file, dest) | ||
| log.info(f' Copied {basename} to upload root') |
Comment on lines
+162
to
+169
| # Add ProjectReference to BDN.Extensions | ||
| item_group = ET.SubElement(root, f'{ns}ItemGroup') | ||
| item_group.set('Label', 'PerfLabInjected') | ||
| proj_ref = ET.SubElement(item_group, f'{ns}ProjectReference') | ||
| proj_ref.set('Include', bdn_ext_rel) | ||
|
|
||
| tree.write(csproj_path, xml_declaration=True, encoding='utf-8') | ||
| log.info(f' Added ProjectReference: {bdn_ext_rel}') |
…ty, semicolon handling - Use performance.common.remove_directory() instead of shutil.rmtree for Windows long-path handling in test.py and post.py (C4, C5) - Narrow BDN PackageReference removal to exact package names instead of prefix match to preserve optional subpackages (C1) - Always emit trailing semicolon in patched Program.cs to avoid invalid C# when source pattern lacks semicolon (C2) - Add whitespace tolerance to Directory.Build.props regex and log when a requested property has zero matches (C9) - Harmonize report glob pattern to *perf-lab-report.json across collection and upload paths (C11) - Remove whitespace-only change in runner.py (C8) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the if false guards from both the public (win-x64) and private (win-x64-viper) MAUI Desktop BenchmarkDotNet pipeline entries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Helix work items don't have git on PATH. Add _find_git() to check common Windows install locations (Program Files\Git\cmd\git.exe). If git is truly unavailable, fall back to downloading the GitHub archive as a zip and extracting only the sparse checkout directories plus root-level files (Directory.Build.props, NuGet.config, etc.). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Python's bundled SSL certificates don't include the CA certs trusted by Helix machines, causing CERTIFICATE_VERIFY_FAILED. Use curl.exe (built into Windows 10+/Server 2016+) which uses the Windows certificate store instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Git sparse-checkout automatically includes files in parent directories of checked-out paths. The zip fallback wasn't extracting files like src/MultiTargeting.targets and src/PublicAPI.targets because they live at the src/ level, outside the specific sparse checkout subdirectories. Compute parent directories from the sparse checkout list and include files directly in those parent dirs (non-recursively). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
No description provided.