Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8776a7f
Add a script for startup performance measurement (#14345)
karolz-ms Feb 11, 2026
5aa8a61
Add backmerge release workflow to automate merging changes from relea…
joperezr Feb 12, 2026
62d5c97
Bump Aspire branding from 13.2 to 13.3 (#14456)
Copilot Feb 12, 2026
8a82621
Update Azure.Core to latest version - lift all runtime dependencies t…
eerhardt Feb 12, 2026
6d4f747
Update Arcade to latest version from the .NET 10 Eng channel (#13556)
dotnet-maestro[bot] Feb 12, 2026
fb80caf
Refactor backmerge PR creation to update existing PRs and streamline …
joperezr Feb 12, 2026
8ae1e4d
Merge remote-tracking branch 'origin/release/13.2' into backmerge/rel…
github-actions[bot] Feb 12, 2026
e9c1fc1
[main] Fix transitive Azure role assignments through WaitFor dependen…
github-actions[bot] Feb 13, 2026
a459276
Merge pull request #14480 from dotnet/backmerge/release-13.2-to-main
joperezr Feb 13, 2026
8df3c85
Remove auto-merge step from backmerge workflow (#14481)
joperezr Feb 13, 2026
4ecfe0d
Merge remote-tracking branch 'origin/release/13.2' into backmerge/rel…
github-actions[bot] Feb 14, 2026
7990dfc
Merge pull request #14500 from dotnet/backmerge/release-13.2-to-main
joperezr Feb 14, 2026
477abdc
Merge remote-tracking branch 'origin/release/13.2' into backmerge/rel…
github-actions[bot] Feb 17, 2026
a9e0ee1
[Automated] Backmerge release/13.2 to main (#14521)
joperezr Feb 17, 2026
17e330e
Add agentic workflow daily-repo-status (#14498)
joperezr Feb 17, 2026
edad21b
[Automated] Backmerge release/13.2 to main (#14536)
github-actions[bot] Feb 18, 2026
10705f2
[Automated] Update AI Foundry Models (#14541)
github-actions[bot] Feb 18, 2026
e89bba5
Detect CLI at default install paths when not on PATH (#14545)
adamint Feb 18, 2026
4ada2fc
[automated] Unquarantine stable tests with 25+ days zero failures (#1…
Copilot Feb 18, 2026
fa2336f
Partially fix quarantined test: Update stale snapshot for DeployAsync…
Copilot Feb 18, 2026
bba02f2
Merge remote-tracking branch 'origin/release/13.2' into backmerge/rel…
github-actions[bot] Feb 19, 2026
ff754ac
Merge pull request #14561 from dotnet/backmerge/release-13.2-to-main
joperezr Feb 19, 2026
64bf57f
Update daily report to 13.2 milestone burndown (#14563)
joperezr Feb 19, 2026
edc4aaa
Merge remote-tracking branch 'origin/release/13.2' into backmerge/rel…
github-actions[bot] Feb 20, 2026
7922bfe
Merge pull request #14587 from dotnet/backmerge/release-13.2-to-main
joperezr Feb 20, 2026
9e6381b
Update Aspire.Hosting.Kubernetes.csproj
bbartels Feb 20, 2026
2d3ccae
Initialize _kubernetesComponents with ResourceNameComparer
bbartels Feb 20, 2026
d6df9e3
Update KubernetesPublisherTests.cs
bbartels Feb 20, 2026
03a3211
Update Aspire.Hosting.Kubernetes.csproj
bbartels Feb 20, 2026
bf018c3
Adds snapshots
bbartels Feb 21, 2026
382d3c5
Adds Chart.yaml to snapshot
bbartels Feb 21, 2026
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@
# https://github.com/github/linguist/issues/1626#issuecomment-401442069
# this only affects the repo's language statistics
*.h linguist-language=C

.github/workflows/*.lock.yml linguist-generated=true merge=ours
8 changes: 4 additions & 4 deletions .github/policies/milestoneAssignment.prClosed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ configuration:
branch: main
then:
- addMilestone:
milestone: 13.2
milestone: 13.3
description: '[Milestone Assignments] Assign Milestone to PRs merged to the `main` branch'
- if:
- payloadType: Pull_Request
- isAction:
action: Closed
- targetsBranch:
branch: release/13.1
branch: release/13.2
then:
- removeMilestone
- addMilestone:
milestone: 13.1.1
description: '[Milestone Assignments] Assign Milestone to PRs merged to release/13.1 branch'
milestone: 13.2
description: '[Milestone Assignments] Assign Milestone to PRs merged to release/13.2 branch'
193 changes: 193 additions & 0 deletions .github/skills/startup-perf/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
---
name: startup-perf
description: Measures Aspire application startup performance using dotnet-trace and the TraceAnalyzer tool. Use this when asked to measure impact of a code change on Aspire application startup performance.
---

# Aspire Startup Performance Measurement

This skill provides patterns and practices for measuring .NET Aspire application startup performance using the `Measure-StartupPerformance.ps1` script and the companion `TraceAnalyzer` tool.

## Overview

The startup performance tooling collects `dotnet-trace` traces from an Aspire AppHost application and computes the startup duration from `AspireEventSource` events. Specifically, it measures the time between the `DcpModelCreationStart` (event ID 17) and `DcpModelCreationStop` (event ID 18) events emitted by the `Microsoft-Aspire-Hosting` EventSource provider.

**Script Location**: `tools/perf/Measure-StartupPerformance.ps1`
**TraceAnalyzer Location**: `tools/perf/TraceAnalyzer/`
**Documentation**: `docs/getting-perf-traces.md`

## Prerequisites

- PowerShell 7+
- `dotnet-trace` global tool (`dotnet tool install -g dotnet-trace`)
- .NET SDK (restored via `./restore.cmd` or `./restore.sh`)

## Quick Start

### Single Measurement

```powershell
# From repository root — measures the default TestShop.AppHost
.\tools\perf\Measure-StartupPerformance.ps1
```

### Multiple Iterations with Statistics

```powershell
.\tools\perf\Measure-StartupPerformance.ps1 -Iterations 5
```

### Custom Project

```powershell
.\tools\perf\Measure-StartupPerformance.ps1 -ProjectPath "path\to\MyApp.AppHost.csproj" -Iterations 3
```

### Preserve Traces for Manual Analysis

```powershell
.\tools\perf\Measure-StartupPerformance.ps1 -Iterations 3 -PreserveTraces -TraceOutputDirectory "C:\traces"
```

### Verbose Output

```powershell
.\tools\perf\Measure-StartupPerformance.ps1 -Verbose
```

## Parameters

| Parameter | Default | Description |
|-----------|---------|-------------|
| `ProjectPath` | TestShop.AppHost | Path to the AppHost `.csproj` to measure |
| `Iterations` | 1 | Number of measurement runs (1–100) |
| `PreserveTraces` | `$false` | Keep `.nettrace` files after analysis |
| `TraceOutputDirectory` | temp folder | Directory for preserved trace files |
| `SkipBuild` | `$false` | Skip `dotnet build` before running |
| `TraceDurationSeconds` | 60 | Maximum trace collection time (1–86400) |
| `PauseBetweenIterationsSeconds` | 45 | Pause between iterations (0–3600) |
| `Verbose` | `$false` | Show detailed output |

## How It Works

The script follows this sequence:

1. **Prerequisites check** — Verifies `dotnet-trace` is installed and the project exists.
2. **Build** — Builds the AppHost project in Release configuration (unless `-SkipBuild`).
3. **Build TraceAnalyzer** — Builds the companion `tools/perf/TraceAnalyzer` project.
4. **For each iteration:**
a. Locates the compiled executable (Arcade-style or traditional output paths).
b. Reads `launchSettings.json` for environment variables.
c. Launches the AppHost as a separate process.
d. Attaches `dotnet-trace` to the running process with the `Microsoft-Aspire-Hosting` provider.
e. Waits for the trace to complete (duration timeout or process exit).
f. Runs the TraceAnalyzer to extract the startup duration from the `.nettrace` file.
g. Cleans up processes.
5. **Reports results** — Prints per-iteration times and statistics (min, max, average, std dev).

## TraceAnalyzer Tool

The `tools/perf/TraceAnalyzer` is a small .NET console app that parses `.nettrace` files using the `Microsoft.Diagnostics.Tracing.TraceEvent` library.

### What It Does

- Opens the `.nettrace` file with `EventPipeEventSource`
- Listens for events from the `Microsoft-Aspire-Hosting` provider
- Extracts timestamps for `DcpModelCreationStart` (ID 17) and `DcpModelCreationStop` (ID 18)
- Outputs the duration in milliseconds (or `"null"` if events are not found)

### Standalone Usage

```bash
dotnet run --project tools/perf/TraceAnalyzer -c Release -- <path-to-nettrace-file>
```

## Understanding Output

### Successful Run

```
==================================================
Aspire Startup Performance Measurement
==================================================
Project: TestShop.AppHost
Iterations: 3
...
Iteration 1
----------------------------------------
Starting TestShop.AppHost...
Attaching trace collection to PID 12345...
Collecting performance trace...
Trace collection completed.
Analyzing trace: ...
Startup time: 1234.56 ms
...
==================================================
Results Summary
==================================================
Iteration StartupTimeMs
--------- -------------
1 1234.56
2 1189.23
3 1201.45
Statistics:
Successful iterations: 3 / 3
Minimum: 1189.23 ms
Maximum: 1234.56 ms
Average: 1208.41 ms
Std Dev: 18.92 ms
```

### Common Issues

| Symptom | Cause | Fix |
|---------|-------|-----|
| `dotnet-trace is not installed` | Missing global tool | Run `dotnet tool install -g dotnet-trace` |
| `Could not find compiled executable` | Project not built | Remove `-SkipBuild` or build manually |
| `Could not find DcpModelCreation events` | Trace too short or events not emitted | Increase `-TraceDurationSeconds` |
| `Application exited immediately` | App crash on startup | Check app logs, ensure dependencies are available |
| `dotnet-trace exited with code != 0` | Trace collection error | Check verbose output; trace file may still be valid |

## Comparing Before/After Performance

To measure the impact of a code change:

```powershell
# 1. Measure baseline (on main branch)
git checkout main
.\tools\perf\Measure-StartupPerformance.ps1 -Iterations 5 -PreserveTraces -TraceOutputDirectory "C:\traces\baseline"
# 2. Measure with changes
git checkout my-feature-branch
.\tools\perf\Measure-StartupPerformance.ps1 -Iterations 5 -PreserveTraces -TraceOutputDirectory "C:\traces\feature"
# 3. Compare the reported averages and std devs
```

Use enough iterations (5+) and a consistent pause between iterations for reliable comparisons.

## Collecting Traces for Manual Analysis

If you need to inspect trace files manually (e.g., in PerfView or Visual Studio):

```powershell
.\tools\perf\Measure-StartupPerformance.ps1 -PreserveTraces -TraceOutputDirectory "C:\my-traces"
```

See `docs/getting-perf-traces.md` for guidance on analyzing traces with PerfView or `dotnet trace report`.

## EventSource Provider Details

The `Microsoft-Aspire-Hosting` EventSource emits events for key Aspire lifecycle milestones. The startup performance script focuses on:

| Event ID | Event Name | Description |
|----------|------------|-------------|
| 17 | `DcpModelCreationStart` | Marks the beginning of DCP model creation |
| 18 | `DcpModelCreationStop` | Marks the completion of DCP model creation |

The measured startup time is the wall-clock difference between these two events, representing the time to create all application services and supporting dependencies.
23 changes: 23 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,26 @@ When you comment on a PR (not an issue), the workflow will automatically push ch
### Concurrency

The workflow uses concurrency groups based on the issue/PR number to prevent race conditions when multiple commands are issued on the same issue.

## Backmerge Release Workflow

The `backmerge-release.yml` workflow automatically creates PRs to merge changes from `release/13.2` back into `main`.

### Schedule

Runs daily at 00:00 UTC (4pm PT during standard time, 5pm PT during daylight saving time). Can also be triggered manually via `workflow_dispatch`.

### Behavior

1. **Change Detection**: Checks if `release/13.2` has commits not in `main`
2. **PR Creation**: If changes exist, creates a PR to merge `release/13.2``main`
3. **Auto-merge**: Enables GitHub's auto-merge feature, so the PR merges automatically once approved
4. **Conflict Handling**: If merge conflicts occur, creates an issue instead of a PR

### Assignees

PRs and conflict issues are automatically assigned to @joperezr and @radical.

### Manual Trigger

To trigger manually, go to Actions → "Backmerge Release to Main" → "Run workflow".
Loading
Loading