Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions eng/performance/maui_desktop_benchmarks.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">

<Import Project="Scenarios.Common.props" />

<!-- MAUI Desktop BenchmarkDotNet benchmarks
Clones dotnet/maui, builds dependencies, patches in PerfLabExporter,
and runs the Core, XAML, and Graphics BDN benchmark suites. -->

<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<HelixWorkItem Include="MAUI Desktop BDN Benchmarks">
<PayloadDirectory>$(ScenariosDir)mauiDesktopBenchmarks</PayloadDirectory>
<PreCommands>$(Python) pre.py -f $(PERFLAB_Framework)</PreCommands>
<Command>$(Python) test.py --framework $(PERFLAB_Framework) --suite all</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
</ItemGroup>

<Import Project="PreparePayloadWorkItems.targets" />
</Project>
30 changes: 30 additions & 0 deletions eng/pipelines/sdk-perf-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,21 @@ jobs:
${{ each parameter in parameters.jobParameters }}:
${{ parameter.key }}: ${{ parameter.value }}

# MAUI Desktop BenchmarkDotNet benchmarks
- template: /eng/pipelines/templates/build-machine-matrix.yml
parameters:
jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml
buildMachines:
- win-x64
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is one of these win-x64 and the other win-x64-viper?

Copy link
Copy Markdown
Member Author

@LoopedBard3 LoopedBard3 May 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

win-x64 supports public builds (isPublic: true) while win-x64-viper is gated to private builds (not(eq(isPublic, true))). We can probably update the machine list to remove tiger and move the private win-x64 runs to viper, but it currently runs as it.

isPublic: true
jobParameters:
runKind: maui_desktop_benchmarks
projectFileName: maui_desktop_benchmarks.proj
channels:
- main
${{ each parameter in parameters.jobParameters }}:
${{ parameter.key }}: ${{ parameter.value }}

# Blazor scenario benchmarks
- template: /eng/pipelines/templates/build-machine-matrix.yml
parameters:
Expand Down Expand Up @@ -623,6 +638,21 @@ jobs:
${{ each parameter in parameters.jobParameters }}:
${{ parameter.key }}: ${{ parameter.value }}

# MAUI Desktop BDN benchmarks (private)
- template: /eng/pipelines/templates/build-machine-matrix.yml
parameters:
jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml
buildMachines:
- win-x64-viper
isPublic: false
jobParameters:
runKind: maui_desktop_benchmarks
projectFileName: maui_desktop_benchmarks.proj
channels:
- main
${{ each parameter in parameters.jobParameters }}:
${{ parameter.key }}: ${{ parameter.value }}

Comment thread
LoopedBard3 marked this conversation as resolved.
# NativeAOT scenario benchmarks
- template: /eng/pipelines/templates/build-machine-matrix.yml
parameters:
Expand Down
2 changes: 1 addition & 1 deletion src/harness/BenchmarkDotNet.Extensions/ExclusionFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace BenchmarkDotNet.Extensions
{
class ExclusionFilter : IFilter
public class ExclusionFilter : IFilter
{
private readonly GlobFilter? globFilter;

Expand Down
28 changes: 28 additions & 0 deletions src/scenarios/mauiDesktopBenchmarks/post.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
'''
Post-commands for MAUI Desktop BenchmarkDotNet benchmarks.
Cleans up the cloned maui repo and temporary artifacts.
'''
import os
from performance.common import remove_directory
from performance.logger import setup_loggers, getLogger

setup_loggers(True)
log = getLogger(__name__)

# Match the absolute-path resolution used by test.py so cleanup finds the
# checkout regardless of the cwd post.py inherits.
MAUI_REPO_DIRNAME = 'maui_repo'
MAUI_REPO_DIR = os.path.abspath(MAUI_REPO_DIRNAME)


def cleanup():
"""Remove the cloned maui repository."""
if os.path.exists(MAUI_REPO_DIR):
log.info(f'Removing cloned MAUI repo: {MAUI_REPO_DIR}')
remove_directory(MAUI_REPO_DIR)

Comment thread
LoopedBard3 marked this conversation as resolved.
log.info('Post-commands cleanup complete.')


if __name__ == '__main__':
cleanup()
19 changes: 19 additions & 0 deletions src/scenarios/mauiDesktopBenchmarks/pre.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'''
Pre-commands for MAUI Desktop BenchmarkDotNet benchmarks.
Kept minimal — all heavy lifting (clone, build, patch, run) is in test.py
to keep the correlation payload small.
'''
import argparse
from performance.logger import setup_loggers, getLogger

setup_loggers(True)
log = getLogger(__name__)

if __name__ == '__main__':
parser = argparse.ArgumentParser(description='MAUI Desktop BDN Benchmarks - Pre-commands')
parser.add_argument('-f', '--framework', default='net11.0',
help='Target .NET framework (determines MAUI branch)')
args = parser.parse_args()
log.info(f'MAUI Desktop BDN Benchmarks pre-commands (framework={args.framework})')
log.info('Setup deferred to test.py to minimize correlation payload.')

Loading