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.