Files
YooAsset/Assets/YooAsset/Runtime/DiagnosticSystem/DiagnosticReport/DiagnosticOperationInfo.cs
2026-02-03 11:58:37 +08:00

63 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections;
using System.Collections.Generic;
namespace YooAsset
{
/// <summary>
/// 描述异步操作的运行时诊断信息
/// </summary>
[Serializable]
internal struct DiagnosticOperationInfo : IComparer<DiagnosticOperationInfo>, IComparable<DiagnosticOperationInfo>
{
/// <summary>
/// 异步操作的名称
/// </summary>
public string OperationName;
/// <summary>
/// 异步操作的说明
/// </summary>
public string OperationDesc;
/// <summary>
/// 异步操作的优先级
/// </summary>
public uint Priority;
/// <summary>
/// 开始的时间
/// </summary>
public string StartTime;
/// <summary>
/// 处理耗时(单位:毫秒)
/// </summary>
public long ElapsedMilliseconds;
/// <summary>
/// 异步操作的执行进度
/// </summary>
public float Progress;
/// <summary>
/// 异步操作的执行状态
/// </summary>
public string Status;
/// <summary>
/// 子任务列表
/// TODO序列化深度限制为10层
/// </summary>
public List<DiagnosticOperationInfo> Children;
public int CompareTo(DiagnosticOperationInfo other)
{
return Compare(this, other);
}
public int Compare(DiagnosticOperationInfo a, DiagnosticOperationInfo b)
{
return string.CompareOrdinal(a.OperationName, b.OperationName);
}
}
}