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

Adding telemetry for XLayout types #169

Merged
merged 7 commits into from
Jan 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion dev/Repeater/NonVirtualizingLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@
#include "ItemsRepeater.common.h"
#include "Layout.h"
#include "NonVirtualizingLayout.h"
#include "RuntimeProfiler.h"

CppWinRTActivatableClassWithBasicFactory(NonVirtualizingLayout)

NonVirtualizingLayout::NonVirtualizingLayout()
{
__RP_Marker_ClassById(RuntimeProfiler::ProfId_NonVirtualizingLayout);
}

#pragma region INonVirtualizingLayoutOverrides

void NonVirtualizingLayout::InitializeForContextCore(winrt::LayoutContext const& context)
Expand All @@ -31,4 +37,4 @@ winrt::Size NonVirtualizingLayout::ArrangeOverride(winrt::LayoutContext const& c
throw winrt::hresult_not_implemented();
}

#pragma endregion
#pragma endregion
2 changes: 2 additions & 0 deletions dev/Repeater/NonVirtualizingLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class NonVirtualizingLayout :
public winrt::implementation::NonVirtualizingLayoutT<NonVirtualizingLayout, Layout>
{
public:
NonVirtualizingLayout();

#pragma region INonVirtualizingLayoutOverrides
virtual void InitializeForContextCore(winrt::LayoutContext const& context);
virtual void UninitializeForContextCore(winrt::LayoutContext const& context);
Expand Down
6 changes: 6 additions & 0 deletions dev/Repeater/StackLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@
#include "StackLayoutState.h"
#include "StackLayout.h"
#include "StackLayoutFactory.h"
#include "RuntimeProfiler.h"

#pragma region IFlowLayout

StackLayout::StackLayout()
{
__RP_Marker_ClassById(RuntimeProfiler::ProfId_StackLayout);
}

winrt::Orientation StackLayout::Orientation()
{
return auto_unbox(GetValue(s_orientationProperty));
Expand Down
1 change: 1 addition & 0 deletions dev/Repeater/StackLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class StackLayout :
public OrientationBasedMeasures
{
public:
StackLayout();

#pragma region IStackLayout
winrt::Orientation Orientation();
Expand Down
6 changes: 6 additions & 0 deletions dev/Repeater/UniformGridLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
#include "UniformGridLayoutState.h"
#include "UniformGridLayout.h"
#include "UniformGridLayoutFactory.h"
#include "RuntimeProfiler.h"

#pragma region IGridLayout

UniformGridLayout::UniformGridLayout()
{
__RP_Marker_ClassById(RuntimeProfiler::ProfId_UniformGridLayout);
}

winrt::Orientation UniformGridLayout::Orientation()
{
return auto_unbox(GetValue(s_orientationProperty));
Expand Down
2 changes: 2 additions & 0 deletions dev/Repeater/UniformGridLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class UniformGridLayout :
public OrientationBasedMeasures
{
public:
UniformGridLayout();

#pragma region IGridLayout
winrt::Orientation Orientation();
void Orientation(winrt::Orientation const& value);
Expand Down
6 changes: 6 additions & 0 deletions dev/Repeater/VirtualizingLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@
#include <common.h>
#include "ItemsRepeater.common.h"
#include "VirtualizingLayout.h"
#include "RuntimeProfiler.h"

CppWinRTActivatableClassWithBasicFactory(VirtualizingLayout)

VirtualizingLayout::VirtualizingLayout()
{
__RP_Marker_ClassById(RuntimeProfiler::ProfId_VirtualizingLayout);
}

#pragma region IVirtualizingLayoutOverrides


Expand Down
1 change: 1 addition & 0 deletions dev/Repeater/VirtualizingLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class VirtualizingLayout :
public winrt::implementation::VirtualizingLayoutT<VirtualizingLayout, Layout>
{
public:
VirtualizingLayout();
FrankJWong marked this conversation as resolved.
Show resolved Hide resolved

#pragma region IVirtualizingLayoutOverrides
virtual void InitializeForContextCore(winrt::VirtualizingLayoutContext const& context);
Expand Down
4 changes: 4 additions & 0 deletions dev/Telemetry/RuntimeProfiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ namespace RuntimeProfiler
ProfId_RadioButtons,
ProfId_RadioMenuFlyoutItem,
ProfId_ItemsRepeater,
ProfId_NonVirtualizingLayout,
ProfId_StackLayout,
ProfId_UniformGridLayout,
ProfId_VirtualizingLayout,
ProfId_Size
} ProfilerClassId;

Expand Down