-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[workloads] Add telemetry for mobile and wasm workloads (#90208)
This change adds CLI telemetry for common mobile and wasm scenarios. Total app size is another element we plan on tracking and that will be added in a follow up. Fixes #88844
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
46 changes: 46 additions & 0 deletions
46
...no/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadTelemetry.targets
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. --> | ||
<Project> | ||
<Target Name="_WorkloadTelemetry" | ||
Condition="'$(_MonoWorkloadTargetsMobile)' == 'true' and '$(TargetsCurrent)' == 'true'" | ||
AfterTargets="Publish" | ||
DependsOnTargets="_WorkloadGatherTelemetryData"> | ||
|
||
<ItemGroup> | ||
<WorkloadPublishProperties Include="TargetPlatformIdentifier" Value="$(TargetPlatformIdentifier)" /> | ||
<WorkloadPublishProperties Include="RuntimeIdentifier" Value="$(RuntimeIdentifier)" /> | ||
<WorkloadPublishProperties Include="BlazorWasm" Value="$(_WorkloadUsesBlazorWasm)" /> | ||
<WorkloadPublishProperties Include="WasmSDK" Value="$(_WorkloadUsesWasmSDK)" /> | ||
<WorkloadPublishProperties Include="UsesMaui" Value="$(UseMaui)" /> | ||
<WorkloadPublishProperties Include="UsesMobileSDKOnly" Value="$(_WorkloadUsesMobileSDKOnly)" /> | ||
<WorkloadPublishProperties Include="UsesOtherMobileSDK" Value="$(_WorkloadUsesOther)" /> | ||
<WorkloadPublishProperties Include="MonoAOT" Value="$(_WorkloadUsesMonoAOT)" /> | ||
<WorkloadPublishProperties Include="NativeAOT" Value="$(_WorkloadUsesNativeAOT)" /> | ||
<WorkloadPublishProperties Include="Interp" Value="$(_WorkloadUsesInterpreter)" /> | ||
<WorkloadPublishProperties Include="LibraryMode" Value="$(_WorkloadUsesLibraryMode)" /> | ||
<WorkloadPublishProperties Include="HybridGlobalization" Value="$(HybridGlobalization)" /> | ||
<WorkloadPublishProperties Include="ResolvedRuntimePack" Value="$(_MonoWorkloadRuntimePackPackageVersion)" /> | ||
</ItemGroup> | ||
|
||
<AllowEmptyTelemetry EventName="WorkloadPublishProperties" EventData="@(WorkloadPublishProperties)" /> | ||
</Target> | ||
|
||
<Target Name="_WorkloadGatherTelemetryData"> | ||
<PropertyGroup> | ||
<_WorkloadUsesBlazorWasm>$(UsingMicrosoftNETSdkBlazorWebAssembly)</_WorkloadUsesBlazorWasm> | ||
<_WorkloadUsesWasmSDK>$(UsingMicrosoftNETSdkWebAssembly)</_WorkloadUsesWasmSDK> | ||
<_WorkloadUsesMonoAOT>$(RunAOTCompilation)</_WorkloadUsesMonoAOT> | ||
<_WorkloadUsesMonoAOT Condition="'$(RunAOTCompilation)' == '' and '$(PublishAot)' != 'true' and ('$(TargetPlatformIdentifier)' == 'maccatalyst' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'tvos')">$(_RunAotCompiler)</_WorkloadUsesMonoAOT> | ||
<_WorkloadUsesNativeAOT>$(PublishAot)</_WorkloadUsesNativeAOT> | ||
<_WorkloadUsesInterpreter>$(MonoForceInterpreter)</_WorkloadUsesInterpreter> | ||
<_WorkloadUsesInterpreter Condition="'$(_WorkloadUsesInterpreter)' == '' and '$(UseInterpreter)' == 'true'">true</_WorkloadUsesInterpreter> | ||
<_WorkloadUsesInterpreter Condition="'$(_WorkloadUsesInterpreter)' == '' and '$(RunAOTCompilation)' != 'true' and ('$(_WorkloadUsesBlazorWasm)' == 'true' or '$(_WorkloadUsesWasmSDK)' == 'true')">true</_WorkloadUsesInterpreter> | ||
<_WorkloadUsesLibraryMode Condition="'$(NativeLib)' != '' and ('$(_WorkloadUsesMonoAOT)' == 'true' or '$(_WorkloadUsesNativeAOT)' == 'true')">true</_WorkloadUsesLibraryMode> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<_WorkloadUsesOther Condition="'$([System.IO.Path]::GetFileName(%(ReferencePath.Identity)).ToLower())' == 'avalonia.dll'">true</_WorkloadUsesOther> | ||
<_WorkloadUsesOther Condition="'$([System.IO.Path]::GetFileName(%(ReferencePath.Identity)).ToLower())' == 'uno.dll'">true</_WorkloadUsesOther> | ||
<_WorkloadUsesMobileSDKOnly Condition="'$(RuntimeIdentifier)' != 'browser-wasm' and '$(UseMaui)' != 'true' and '$(_WorkloadUsesOther)' != 'true'">true</_WorkloadUsesMobileSDKOnly> | ||
</PropertyGroup> | ||
</Target> | ||
</Project> |