Skip to content

Conversation

rolfbjarne
Copy link
Member

Context: dotnet/maui#31058
Context: dotnet/android#10388

We are in the process of adding Metrics to .NET MAUI to enable dotnet-counters such as:

> dotnet-counters monitor --dsrouter ios --counters Microsoft.Maui
Press p to pause, r to resume, q to quit.
Status: Running

Name                                      Current Value
[Microsoft.Maui]
    maui.layout.arrange_count ({times})               6
    maui.layout.arrange_duration (ns)
        Percentile
        50                                      518,656
        95                                    2,367,488
        99                                    2,367,488
    maui.layout.measure_count ({times})              11
    maui.layout.measure_duration (ns)
        Percentile
        50                                      389,632
        95                                   28,475,392
        99                                   28,475,392

For this to work, you'd unfortunately need to build the app with:

dotnet build -c Release -p:EnableDiagnostics=true -p:MetricsSupport=true -p:EventSourceSupport=true

That's way too many properties to mess with!

So, we should make the defaults:

  • For Release mode, $(Optimize) is true.

  • Only if $(EnableDiagnostics) is not true, then:

    • $(MetricsSupport) is false.

    • $(EventSourceSupport) is false.

…icsSupport'.

Context: dotnet/maui#31058
Context: dotnet/android#10388

We are in the process of adding `Metrics` to .NET MAUI to enable `dotnet-counters` such as:

    > dotnet-counters monitor --dsrouter ios --counters Microsoft.Maui
    Press p to pause, r to resume, q to quit.
    Status: Running

    Name                                      Current Value
    [Microsoft.Maui]
        maui.layout.arrange_count ({times})               6
        maui.layout.arrange_duration (ns)
            Percentile
            50                                      518,656
            95                                    2,367,488
            99                                    2,367,488
        maui.layout.measure_count ({times})              11
        maui.layout.measure_duration (ns)
            Percentile
            50                                      389,632
            95                                   28,475,392
            99                                   28,475,392

For this to work, you'd unfortunately need to build the app with:

    dotnet build -c Release -p:EnableDiagnostics=true -p:MetricsSupport=true -p:EventSourceSupport=true

That's way too many properties to mess with!

So, we should make the defaults:

* For `Release` mode, `$(Optimize)` is `true`.

* Only if `$(EnableDiagnostics)` is not `true`, then:

  * `$(MetricsSupport)` is `false`.

  * `$(EventSourceSupport)` is `false`.
@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #676f1e0] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 676f1e017c889c69bca29307ca8ff29351ece9a8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #676f1e0] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 676f1e017c889c69bca29307ca8ff29351ece9a8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #676f1e0] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 676f1e017c889c69bca29307ca8ff29351ece9a8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #676f1e0] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: 676f1e017c889c69bca29307ca8ff29351ece9a8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #676f1e0] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: 676f1e017c889c69bca29307ca8ff29351ece9a8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #676f1e0] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: 676f1e017c889c69bca29307ca8ff29351ece9a8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #676f1e0] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: 676f1e017c889c69bca29307ca8ff29351ece9a8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

.NET ( No breaking changes )

✅ API diff vs stable

.NET ( No breaking changes )

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 676f1e017c889c69bca29307ca8ff29351ece9a8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build #676f1e0] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 115 tests passed 🎉

Tests counts

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 8 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 676f1e017c889c69bca29307ca8ff29351ece9a8 [PR build]

@rolfbjarne rolfbjarne merged commit 22f6705 into net10.0 Aug 12, 2025
44 checks passed
@rolfbjarne rolfbjarne deleted the dev/rolf/default-metrics branch August 12, 2025 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants