SEventsTree

Profiler events tree. Contains a tree of profiler event for the selected graph bar.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

TaskGraph

Header

/Engine/Source/Developer/TaskGraph/Public/SEventsTree.h

Include

#include "SEventsTree.h"

Syntax

class SEventsTree : public SCompoundWidget

Remarks

Profiler events tree. Contains a tree of profiler event for the selected graph bar.

Variables

Name Description

Protected variable

bool

 

bSuppressSelectionChangedEvent

Suppresses SelectionChanged delegate to avoid event loops between graph visualizer and events tree

Protected variable

EVisualizerTime...

 

DurationUnits

Currently selected time units

Protected variable

TSharedPtr< STr...

 

EventsListView

A pointer to the ListView of profiler events

Protected variable

FString

 

FilterText

Events filter text

Protected variable

FOnEventSelecti...

 

OnEventSelectionChangedDelegate

Delegate used to notify when event selection changes

Protected variable

TSharedPtr< FVi...

 

ProfileData

Original profiler data

Protected variable

TArray< TShared...

 

SelectedEvents

List of events for the currently selected thread

Protected variable

TArray< TShared...

 

SelectedEventsView

List of events for the currently selected thread

Protected variable

TSharedPtr< FVi...

 

SelectedThread

Currently selected events for this tree

Protected variable

FName

 

SortByColumn

Specify which column to sort with

Protected variable

EColumnSortMode...

 

SortMode

Currently selected sorting mode

Protected variable

EVisualizerView...

 

ViewMode

Currently selected view mode

Protected variable

TMap< TSharedPt...

 

ViewToEventsMap

Maps the events generated using currently selected view and sorting modes to the source events tree

Functions

Name Description

Protected function Const

bool

 

CheckDurationUnits

(
    EVisualizerTimeUnits::Type InUnits
)

Gets the currently selected time units

Protected function Const

bool

 

CheckViewMode

(
    EVisualizerViewMode::Type InMode
)

Given a view mode checks if it's the currently selected one

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Construct the widget

Protected function

int32

 

CountEvents

Recursively counts all events in the tree

Protected function

void

 

CreateSelectedEventsView()

Given the selected events from the bar graph creates a copy of the selection applying the current view and sorting mode

Protected function

TSharedPtr< ...

 

CreateSelectedEventsViewRecursively

(
    TSharedPtr< FVisualizerEvent > Sour...
)

Helper function for creating a copy of the selected events in a hierarchy

Protected function

void

 

CreateSelectedEventsViewRecursivelyAndFlatten

(
    TSharedPtr< FVisualizerEvent > Sour...
)

Helper function for creating a copy of the selected events and flattening the hierarchy

Protected function

void

 

CreateSelectedEventsViewRecursivelyCoalesced

Helper function for creating a copy of the selected events combining leaves with the same name

Protected function

void

 

CreateSelectedEventsViewRecursivelyFlatCoalesced

Helper function for creating a copy of the selected events combining leaves with the same name and flattening the hierarchy

Protected function Const

bool

 

FilterEvent

(
    TSharedPtr< FVisualizerEvent > InEv...
)

Checks if event name passes current filter

Protected function

EColumnSortM...

 

GetColumnSortMode

(
    const FName ColumnId
)

Protected function Const

FText

 

GetDurationColumnTitle()

Gets the currently selected time units text

Protected function Const

double

 

GetEventDuration

(
    double InDurationMs
)

Converts ms to currently selected time units.

Public function Const

FString

 

GetTabTitle()

Gets a label for this events tree tab

Public function

void

 

HandleBarEventSelectionChanged

(
    int32 Thread,
    TSharedPtr< FVisualizerEvent > Sele...
)

Function called when the user selects an event bar in the graph

Public function

void

 

HandleBarGraphExpansionChanged

(
    TSharedPtr< FVisualizerEvent > Sele...
)

Function called when the currently expanded bar graph changes

Public function

void

 

HandleBarGraphSelectionChanged

(
    TSharedPtr< FVisualizerEvent > Sele...
)

Function called when the currently selected bar graph changes

Protected function

void

 

OnColumnSortModeChanged

(
    const EColumnSortPriority::Type Sor...,
    const FName& ColumnId,
    const EColumnSortMode::Type InSortM...
)

Handles column sorting mode change

Protected function

void

 

OnEventSelectionChanged

(
    TSharedPtr< FVisualizerEvent > Sele...,
    ESelectInfo::Type SelectInfo
)

Function called when the currently selected event in the list of thread events changes

Protected function

void

 

OnFilterTextChanged

(
    const FText& InFilterText
)

Called by the editable text control when the filter text is changed by the user

Protected function

void

 

OnFilterTextCommitted

(
    const FText& InFilterText,
    ETextCommit::Type CommitInfo
)

Called by the editable text control when a user presses enter or commits their text change

Protected function

TSharedRef< ...

 

OnGenerateWidgetForEventsList

(
    TSharedPtr< FVisualizerEvent > InIt...,
    const TSharedRef< STableViewBase > ...
)

Generates SEventItem widgets for the events tree

Protected function

void

 

OnGetChildrenForEventsList

(
    TSharedPtr< FVisualizerEvent > InIt...,
    TArray< TSharedPtr< FVisualizerEven...
)

Given a profiler event, generates children for it

Protected function

bool

 

RestoreEventSelection

Restores event selection after changes to the tree

Protected function

void

 

SetDurationUnits

(
    EVisualizerTimeUnits::Type InUnits
)

Sets 'Duration' column time units

Protected function

void

 

SetViewMode

(
    EVisualizerViewMode::Type InMode
)

Sets the current view mode

Protected function

void

 

SortEventsList()

Sorts the selected events tree

Protected function

void

 

SortEventsList

Recursively sorts the selected events tree

Classes

Name

Description

Public struct

FArguments

Typedefs

Name

Description

FOnEventSelectionChanged

Delegate used when the selection changes

Constants

Name

Description

NAME_DurationColumn

Name of 'Duration' column

NAME_NameColumn

Name of 'Name' column

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss