Skip to content
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

feat: Added tracing instrumentation into Hot Reload #19754

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carldebilly
Copy link
Member

@carldebilly carldebilly commented Mar 28, 2025

Feature

This PR introduces tracing instrumentation into the hot reload workflow, enabling ETW-based event logging to aid performance analysis with PerfView.

  • Integrated tracing events into hot reload operations and in the VS add-on.
  • Implemented a new EventTracingProvider for ETW event logging under the name Uno.HotReload.TracingProvider

Note

DRAFT: Still improving it and needs some docs.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@carldebilly carldebilly requested a review from Copilot March 28, 2025 20:07
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces tracing instrumentation into the hot reload workflow, enabling ETW-based event logging to aid performance analysis with PerfView.

  • Integrated tracing events into the hot reload and update file workflows in the VS remote control entry point.
  • Added tracing calls in the hot reload processor to log reload events.
  • Implemented a new EventTracingProvider for ETW event logging.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
src/Uno.UI.RemoteControl.VS/EntryPoint.cs Added tracing calls around force hot reload and file update operations.
src/Uno.UI.RemoteControl.Server.Processors/HotReload/ServerHotReloadProcessor.cs Inserted a tracing event for hot reload events to log event source and type.
src/Uno.UI.RemoteControl.Messaging/EventTracingProvider.cs Introduced a new ETW tracing provider for logging hot reload events.
Files not reviewed (1)
  • src/Uno.UI.RemoteControl.Server.Processors/Uno.UI.RemoteControl.Server.Processors.csproj: Language not supported
Comments suppressed due to low confidence (2)

src/Uno.UI.RemoteControl.VS/EntryPoint.cs:545

  • [nitpick] The variable name 'success' is generic. Consider renaming it to 'hotReloadSucceeded' to improve clarity.
var success = false;

src/Uno.UI.RemoteControl.VS/EntryPoint.cs:581

  • [nitpick] The variable name 'success' is generic. Consider renaming it to 'updateFileSucceeded' to clearly indicate its purpose in the file update workflow.
var success = false;

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19754/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19754/index.html

@nventive-devops
Copy link
Contributor

The build 158876 found UI Test snapshots differences: android-28-net8: 22, android-28-net8-Snap: 36, ios: 7, ios-Snap: 50, skia-gtk-screenshots: 63, skia-linux-screenshots: 64, skia-windows-screenshots: 64, wasm: 113, wasm-automated-net9.0-UWP-Default-automated: 9, wasm-automated-net9.0-UWP-RuntimeTests-0: 0, wasm-automated-net9.0-UWP-RuntimeTests-1: 0, wasm-automated-net9.0-UWP-RuntimeTests-2: 0, wasm-automated-net9.0-WinUI-Benchmarks-automated: 0, wasm-automated-net9.0-WinUI-RuntimeTests-0: 0, wasm-automated-net9.0-WinUI-RuntimeTests-1: 0, wasm-automated-net9.0-WinUI-RuntimeTests-2: 0

Details
  • android-28-net8: 22 changed over 829

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • Detereminate_ProgressRing_Validation25_[#FF0000_#008000_#FF0000_#FF0000]_Progress-Ring-Value-25
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • SelectionOnLoad_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsInitialLoadSelected
    • SelectionTest_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsPage
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • WebView_NavigateToAnchor_Initial
    • WebView_NavigateToAnchor_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation
    • Detereminate_ProgressRing_Validation50_[#FF0000_#008000_#008000_#FF0000]_Progress-Ring-Value-50
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • When_SingleSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • Detereminate_ProgressRing_Validation75_[#FF0000_#008000_#008000_#008000]_Progress-Ring-Value-75
    • When_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_Parent_PointerMoved_After_drag_on_non-scrolling_ScrollViewer
    • When_Parent_PointerMoved_After_drag_on_ScrollViewer_-_touch
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • UpDownEnabledTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • UpDownTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
  • android-28-net8-Snap: 36 changed over 1067

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Border_Border_CornerRadius_Clipping_UITests_Windows_UI_Xaml_Controls_BorderTests_Border_CornerRadius_Clipping
    • RatingControl_UITests_Microsoft_UI_Xaml_Controls_RatingControlTests_RatingControlPage_UITests_Microsoft_UI_Xaml_Controls_RatingControlTests_RatingControlPage
    • Scrolling_MUXControlsTestApp_ScrollViewKeyboardAndGamepadNavigationPage_MUXControlsTestApp_ScrollViewKeyboardAndGamepadNavigationPage
    • Border_OnepxThicknessandRadius_Uno_UI_Samples_UITests_BorderTestsControl_OnepxThicknessandRadius
    • ListView_ListViewSelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • Border_Border_CornerRadius_BorderThickness_UITests_Windows_UI_Xaml_Controls_BorderTests_Border_CornerRadius_BorderThickness
    • Border_OnepxThicknessandRadiusAndTextBlock_Uno_UI_Samples_UITests_BorderTestsControl_OnepxThicknessandRadiusAndTextBlock
    • Brushes_Uno_UI_Samples_UITests_ImageBrushTestControl_Ellipse_Uno_UI_Samples_UITests_ImageBrushTestControl_Ellipse
    • MUX_NumberBox_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • TeachingTip_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipPage_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipPage
    • MUX_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPage_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPage
    • NavigationView_MUXControlsTestApp_NavigationViewCustomThemeResourcesPage_MUXControlsTestApp_NavigationViewCustomThemeResourcesPage
    • WebView_WebView2_JavascriptInvoke_SamplesApp_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_JavascriptInvoke
    • NavigationView_MUXControlsTestApp_NavigationViewRS4Page_MUXControlsTestApp_NavigationViewRS4Page
    • Pickers_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • Gesture_Recognizer_Pointer_Events_test_bench_UITests_Shared_Windows_UI_Input_GestureRecognizer_PointersEvents
    • Buttons_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsPage_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsPage
    • ListView_ListViewLarge_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewLarge
    • ListView_ListView_With_ListViews_Count_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_Measure
    • NavigationView_MUXControlsTestApp_NavigationViewTopNavOnlyPage_MUXControlsTestApp_NavigationViewTopNavOnlyPage
  • ios: 7 changed over 267

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • When_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • TextBox_UpdatedBinding_On_OneWay_Mode_UITests_Windows_UI_Xaml_Controls_TextBox_TextBox_Bindings
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • Validate_Offscreen_Shapes_UITests_Windows_UI_Xaml_Shapes_Offscreen_Shapes
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
  • ios-Snap: 50 changed over 1058

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes_ImageBrushStretch_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushStretch
    • Brushes_ImageBrushWithRotateTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithRotateTransform
    • Brushes_ImageBrushWithScaleTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithScaleTransform
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected
    • Icons_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Foreground_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Foreground
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Formats_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Formats
    • ListView_ListView_TextBox_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_TextBox
    • NavigationView_MUXControlsTestApp_NavigationViewMenuItemStretchPage_MUXControlsTestApp_NavigationViewMenuItemStretchPage
    • TextBlock_SimpleText_MaxLines_Different_Font_Size_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_SimpleText_MaxLines_Different_Font_Size
    • SwipeControl_MUXControlsTestApp_SwipeControlPage2_MUXControlsTestApp_SwipeControlPage2
    • WebView_UITests_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_NavigationProperties_UITests_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_NavigationProperties
    • Brushes_PanelImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_PanelImageBrush
    • Default_UITests_Windows_UI_Xaml_Controls_TextBox_TextBox_Foreground_Changing_UITests_Windows_UI_Xaml_Controls_TextBox_TextBox_Foreground_Changing
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Equal_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Equal
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Smaller_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Smaller
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Taller_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Taller
    • MediaPlayerElement_Using_ogg_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Ogg_Extension
  • skia-gtk-screenshots: 63 changed over 2240

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ClipboardTests.png
    • CalendarView_Theming.png-dark
    • Gamepad_Enumeration.png-dark
    • ButtonClippingTestsControl.png
    • RepeatButton_Automated.png-dark
    • RepeatButton_Automated.png
    • TextBlock_IsTextSelectionEnabled.png-dark
    • TextBlock_IsTextSelectionEnabled.png
    • ContentPresenter_NativeEmbedding.png-dark
    • CalendarView_Theming.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • UIElement_Layout_Bug2879.png-dark
    • UIElement_Layout_Bug2879.png
    • Popup_Simple.png-dark
    • Popup_Simple.png
    • UIElement_ContextFlyout.png-dark
    • UIElement_ContextFlyout.png
    • CompositionPath.png-dark
    • CompositionPath.png
  • skia-linux-screenshots: 64 changed over 2240

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • Buttons.png-dark
    • Buttons.png
    • BorderImageBrushRelativeTransform.png-dark
    • BorderImageBrushRelativeTransform.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • ImageBrush_StreamSource.png-dark
    • ImageBrush_StreamSource.png
    • ContentPresenter_NativeEmbedding.png-dark
    • ContentPresenter_NativeEmbedding.png
    • Examples.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • Focus_FocusVisual_Properties.png-dark
    • ImageIconPage.png-dark
  • skia-windows-screenshots: 64 changed over 2240

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Focus_FocusVisual_Properties.png-dark
    • BorderImageBrushRelativeTransform.png-dark
    • ClipboardTests.png
    • CompositionPath.png-dark
    • CompositionPath.png
    • Image_UseTargetSize.png-dark
    • Image_UseTargetSize.png
    • ImageBrush_Formats.png-dark
    • ImageBrush_Formats.png
    • ImageBrush_SameWithDelay.png-dark
    • ImageBrush_SameWithDelay.png
    • ClipboardTests.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • CalendarView_Theming.png-dark
    • ButtonClippingTestsControl.png
    • DropDownButtonPage.png-dark
    • BorderImageBrushRelativeTransform.png
    • ImagesInlineInFlipView.png-dark
  • wasm: 113 changed over 1043

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • MUXControlsTestApp.NavigationViewAnimationPage
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Microsoft_UI_Xaml_Controls.InfoBadgeTests.InfoBadgePage
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Shared.Windows_UI_Xaml_Controls.ListView.ListView_With_ListViews_Count_Measure
    • UITests.Windows_UI_Xaml_Controls.LoopingSelectorTests.LoopingSelector_Items
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Shared.Windows_UI_Input.GestureRecognizerTests.Button_Inside_Border
    • UITests.Shared.Windows_UI_Xaml_Media.Transform.List_With_Transformed_Ancestor
    • UITests.Windows_UI_Xaml.FocusTests.Focus_FocusState
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • Uno.UI.Samples.Content.UITests.ButtonTestsControl.Buttons
    • Uno.UI.Samples.Content.UITests.ButtonTestsControl.Button_Enabled_Control_Disabled
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ComboBox.ComboBox_PlaceholderText
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Padding
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • UITests.Shared.Windows_System.LauncherTests
    • UITests.Shared.Windows_UI_Xaml_Controls.NavigationViewTests.NavigationView_TopNavigation
    • UITests.Shared.Windows_UI_Xaml_Media.CompositionTargetTests.CompositionTarget_Rendering
    • UITests.Windows_UI_Xaml_Controls.CheckBoxTests.CheckBox_States
  • wasm-automated-net9.0-UWP-Default-automated: 9 changed over 880

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Default_StrokeThickness_MyEllipse
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • TestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
    • Default_StrokeThickness_MyLine
    • When_Theme_Changed_No_Crash_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • Default_StrokeThickness_MyPath
    • Validate_Offscreen_Shapes_UITests_Windows_UI_Xaml_Shapes_Offscreen_Shapes
    • Default_StrokeThickness_MyPolyline
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
  • wasm-automated-net9.0-UWP-RuntimeTests-0: 0 changed over 1

  • wasm-automated-net9.0-UWP-RuntimeTests-1: 0 changed over 1

  • wasm-automated-net9.0-UWP-RuntimeTests-2: 0 changed over 1

  • wasm-automated-net9.0-WinUI-Benchmarks-automated: 0 changed over 1

  • wasm-automated-net9.0-WinUI-RuntimeTests-0: 0 changed over 1

  • wasm-automated-net9.0-WinUI-RuntimeTests-1: 0 changed over 1

  • wasm-automated-net9.0-WinUI-RuntimeTests-2: 0 changed over 1

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.

3 participants