Version: 2020.3

AsyncReadManagerSummaryMetrics

class in Unity.IO.LowLevel.Unsafe

매뉴얼로 전환

설명

A summary of the metrics collected for AsyncReadManager read operations.

Get a summary of the current metrics by calling AsyncReadManagerMetrics.GetCurrentSummaryMetrics. This function summarizes all metrics recorded since you started metrics collection or last cleared your metrics data. Get a summary of an existing set of AsyncReadManagerRequestMetric records by calling AsyncReadManagerMetrics.GetSummaryOfMetrics. You can get these records by calling AsyncReadManagerMetrics.GetMetrics. In both cases, you can filter the data with AsyncReadManagerMetricsFilters in order to focus the summary on the particular categories of data you want to analyze. See Also: AsyncReadManagerMetrics.

using Unity.IO.LowLevel.Unsafe;
using UnityEngine;

public class GetMetricsSummary : MonoBehaviour { #if ENABLE_PROFILER && UNITY_2020_2_OR_NEWER AsyncReadManagerMetricsFilters m_Filter; AsyncReadManagerSummaryMetrics m_Summary; public void Start() { // Create a filter for texture file reads that have been completed m_Filter = new AsyncReadManagerMetricsFilters(); m_Filter.SetStateFilter(ProcessingState.Completed); }

public void Update() { m_Summary = AsyncReadManagerMetrics.GetCurrentSummaryMetrics(m_Filter, AsyncReadManagerMetrics.Flags.ClearOnRead); Debug.Log($"Last frame bandwidth: {m_Summary.AverageBandwidthMBPerSecond} MB/s."); }

#endif }

변수

AverageBandwidthMBPerSecondThe mean rate of reading of data (bandwidth), in Mbps, for read request metrics included in the summary calculation.
AverageReadSizeInBytesThe mean size of data read, in bytes, for read request metrics included in the summary calculation.
AverageReadTimeMicrosecondsThe mean time taken for reading (excluding queue time), in microseconds, for read request metrics included in the summary calculation.
AverageThroughputMBPerSecondThe mean rate of request throughput, in Mbps, for read request metrics included in the summary calculation.
AverageTotalRequestTimeMicrosecondsThe mean time taken from request to completion, in microseconds, for completed read request metrics included in the summary calculation.
AverageWaitTimeMicrosecondsThe mean time taken from request to the start of reading, in microseconds, for read request metrics included in the summary calculation.
LongestReadAssetTypeThe asset type ID for the longest read included in the summary calculation.
LongestReadSubsystemThe Subsystem tag for the longest read included in the summary calculation.
LongestReadTimeMicrosecondsThe longest read time (not including time in queue) included in the summary calculation in microseconds.
LongestWaitAssetTypeThe asset type ID for the longest wait time included in the summary calculation.
LongestWaitSubsystemThe Subsystem tag for the longest wait time included in the summary calculation.
LongestWaitTimeMicrosecondsThe longest time spent waiting of metrics included in the summary calculation, in microseconds.
NumberOfAsyncReadsThe total number of Async reads in the metrics included in the summary calculation.
NumberOfCachedReadsThe total number of cached reads (so read time was zero) in the metrics included in the summary calculation.
NumberOfCanceledRequestsThe total number of canceled requests in the metrics included in the summary calculation.
NumberOfCompletedRequestsThe total number of completed requests in the metrics included in the summary calculation.
NumberOfFailedRequestsThe total number of failed requests in the metrics included in the summary calculation.
NumberOfInProgressRequestsThe total number of in progress requests in the metrics included in the summary calculation.
NumberOfSyncReadsThe total number of Sync reads in the metrics included in the summary calculation.
NumberOfWaitingRequestsThe total number of waiting requests in the metrics included in the summary calculation.
TotalBytesReadThe total number of bytes read in the metrics included in the summary calculation.
TotalNumberOfRequestsThe total number of read requests included in the summary calculation.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961