Version: 2020.1
言語: 日本語

HierarchyFrameDataView

class in UnityEditor.Profiling

/

継承:Profiling.FrameDataView

マニュアルに切り替える

説明

Provides access to the Profiler data for a specific frame and thread.

Use HierarchyFrameDataView to retrieve Profiler samples structured as a hierarchy.
This is used in the Hierachy mode of the CPU Usage Profiler, for example.

The HierarchyFrameDataView aggregates the data with time and memory information. Each hierarchy item includes accumulated data of its children.

using System;
using System.Collections.Generic;
using UnityEditor.Profiling;
using UnityEditorInternal;

public class Example { List<int> parentsCacheList = new List<int>(); List<int> childrenCacheList = new List<int>();

public void ProcessFrameData(int frame) { using (var frameData = ProfilerDriver.GetHierarchyFrameDataView(frame, 0, HierarchyFrameDataView.ViewModes.Default, HierarchyFrameDataView.columnGcMemory, false)) { int rootId = frameData.GetRootItemID(); frameData.GetItemDescendantsThatHaveChildren(rootId, parentsCacheList); foreach (int parentId in parentsCacheList) { frameData.GetItemChildren(parentId, childrenCacheList); // Process further records } } } }

Static 変数

columnCallsThe Calls column.
columnDontSortThe column identifier that indicates whether sorting is disabled.
columnGcMemoryThe GC Allocation column.
columnNameThe Profiler Sample Name column.
columnObjectNameThe Object Name column.
columnSelfPercentThe percentage of the time CPU spends in a call itself.
columnSelfTimeThe amount of the time CPU spends in a call itself. The amount of time is expressed in milliseconds.
columnStartTimeThe start time of a call in milliseconds.
columnTotalPercentThe percentage of time the CPU spends in a call hierarchy.
columnTotalTimeThe amount of time the CPU spends in a call hierarchy. The amount of time is expressed in milliseconds.
columnWarningCountThe amount of samples that are inside a code execution path that is suboptimal for performance.
invalidSampleIdIndex of the invalid item.

変数

sortColumnThe column identifier that defines the sort column.
sortColumnAscendingWhether the sorting order is ascending, true, or descending, false.
viewModeThe view mode which defines how data is aggregated.

Public 関数

GetItemAncestorsRetrieves a list of hierarchy item ancestors.
GetItemCallstackGets the callstack associated with the specified hierarchy item.
GetItemCategoryIndexGets Profiler marker category for the specific marker identifier.
GetItemChildrenRetrieves a list of hierarchy item children.
GetItemColumnDataReturns string representation of hierarchy item value associated with the column.
GetItemColumnDataAsDoubleReturns double representation of hierarchy item value associated with the column.
GetItemColumnDataAsFloatReturns float representation of hierarchy item value associated with the column.
GetItemColumnDataAsSingleReturns float representation of hierarchy item value associated with the column.
GetItemDepthReturns hierarchy level of the item.
GetItemDescendantsThatHaveChildrenUse to retrieve a list of a hierarchy item descendants which have other children.
GetItemInstanceIDReturns InstanceID of the UnityEngine.Object associated with the sample.
GetItemMarkerFlagsUse to retrieve a marker usage flags.
GetItemMarkerIDReturns Profiler marker which uniquely identifies sample name.
GetItemMarkerIDPathUse to retrieve a list of a marker identifiers of all hierarchy item parents.
GetItemMergedSampleCallstackGets the callstack associated with the specified hierarchy item.
GetItemMergedSamplesColumnDataUse to retrieve a values of merged samples of a hierarchy item.
GetItemMergedSamplesColumnDataAsFloatsRetrieves the merged samples for a specific hierarchy item. Merged samples are returned as a list of floats through the outValues param.
GetItemMergedSamplesCountReturn merged samples count represented by the hierarchy item.
GetItemMergedSamplesInstanceIDRetrieves the instanceID of the merged samples corresponding to a hierarchy item.
GetItemMetadataReturns string representation of hierarchy item metadata value.
GetItemMetadataAsFloatReturns float representation of hierarchy item metadata value.
GetItemMetadataAsLongReturns long representation of hierarchy item metadata value.
GetItemMetadataCountReturns metadata count associated with hierarchy item.
GetItemNameGets the sample name associated with the item.
GetItemPathRetrieves the hierarchy item path as a string. Each level is delimited by forward slashes ('/').
GetRootItemIDGets the identifier for the root tree item.
HasItemChildrenChecks whether the tree item has children.
ResolveItemCallstackGets the callstack associated with the specified hierarchy item.
ResolveItemMergedSampleCallstackGets the callstack associated with a specific item sample.
SortSorts the hierarchy view.

継承メンバー

Static 変数

invalidMarkerIdIdentifier of the invalid marker.

変数

frameFpsThe current frames per second (FPS) for the frame.
frameGpuTimeMsThe amount of GPU frame time in milliseconds.
frameGpuTimeNsThe amount of GPU frame time in nanoseconds.
frameIndexThe frame index for the FrameDataView.
frameStartTimeMsThe start time of CPU frame in milliseconds.
frameStartTimeNsThe start time of CPU frame in nanoseconds.
frameTimeMsThe amount of CPU frame time in milliseconds.
frameTimeNsThe amount of CPU frame time in nanoseconds.
maxDepthMaximum child samples levels in the thread data.
sampleCountThe amount of samples in the frame for the thread.
threadGroupNameThe name of the group that the thread belongs to.
threadIdPersistent identifier associated with the thread.
threadIndexThe index of the thread in the current frame.
threadNameName of the thread.
validTrue after the frame data for the thread is processed and ready for retrieval.

Public 関数

GetCounterValueAsDoubleGets the last value of a counter marker in the frame as a double data type'.
GetCounterValueAsFloatGets the last value of a counter marker in the frame as a float data type'.
GetCounterValueAsIntGets the last value of a counter marker in the frame as an int data type'.
GetCounterValueAsLongGets the last value of a counter marker in the frame as a long data type.
GetCounterValuePtrGets unsafe pointer to the last value of a counter marker in the frame.
GetFrameMetaDataRetrieves metadata associated with the frame.
GetFrameMetaDataCountGets the total number of metadata chunks for each id and tag pair in the frame.
GetMarkerCategoryIndexGets Profiler marker category for the specific marker identifier.
GetMarkerFlagsGets Profiler marker flags for the specific marker identifier.
GetMarkerIdGet Profiler marker identifier for a specific name.
GetMarkerNameGets Profiler marker name for the specific marker identifier.
GetMarkersGets all available markers for the current profiling session.
HasCounterValueReturns true for a marker that includes a counter in the active frame.
ResolveMethodInfoReturns method name and location information for the specified method address.