-
Notifications
You must be signed in to change notification settings - Fork 564
[xabt] fix default trimmer switches for Metrics
#10388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The one |
| <DebuggerSupport Condition=" '$(DebuggerSupport)' == '' ">false</DebuggerSupport> | ||
| <HttpActivityPropagationSupport Condition=" '$(HttpActivityPropagationSupport)' == '' ">false</HttpActivityPropagationSupport> | ||
| <!-- Only set if *not* using $(EnableDiagnostics) --> | ||
| <MetricsSupport Condition=" '$(MetricsSupport)' == '' and '$(AndroidEnableProfiler)' != 'true' ">false</MetricsSupport> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a use case just profiling or tracing the native runtime events that doesn't need the large set of diagnostic libraries on Release. With this change users needs to opt out of metric + event source if they enable AndroidEnableProfiler on Release builds. I guess that is fine, just want to point out the scenario and that we might need to document how to run under that configuration when we enable more libraries in Release builds by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me at least document some of this in here for now:
We sync this markdown file with mslearn.
Context: https://github.com/jonathanpeppers/MauiAspireWithTelemetry/tree/peppers Context: dotnet/maui#31058 We are in the process of adding `Metrics` to .NET MAUI to enable `dotnet-counters` such as: > dotnet-counters monitor --dsrouter android --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 `$(AndroidEnableProfiler)` and `$(EnableDiagnostics)` are not `true`, then: * `$(MetricsSupport)` is `false`. * `$(EventSourceSupport)` is `false`. I also refactored other properties that default to `false` in Release mode by checking the `$(Optimize)` property.
e529a1f to
9e6a3e2
Compare
|
/cc @rolfbjarne I guess we will want some of the same defaults on iOS: |
…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`.
|
…icsSupport'. (#23543) 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`.
Context: https://github.com/jonathanpeppers/MauiAspireWithTelemetry/tree/peppers
Context: dotnet/maui#31058
We are in the process of adding
Metricsto .NET MAUI to enabledotnet-counterssuch as:For this to work, you'd unfortunately need to build the app with:
That's way too many properties to mess with!
So, we should make the defaults:
For
Releasemode,$(Optimize)istrue.Only if
$(AndroidEnableProfiler)and$(EnableDiagnostics)are nottrue, then:$(MetricsSupport)isfalse.$(EventSourceSupport)isfalse.I also refactored other properties that default to
falsein Release mode by checking the$(Optimize)property.