mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-16 05:34:25 +01:00
Add OS thread ID info to the Resource Logger
This commit is contained in:
parent
62e9dc164d
commit
30e3cd1f38
3 changed files with 33 additions and 1 deletions
|
|
@ -30,7 +30,8 @@ internal sealed class ResourceWatcherTable : Table<Record>
|
|||
new LoadStateColumn { Label = "State" },
|
||||
new RefCountColumn { Label = "#Ref" },
|
||||
new DateColumn { Label = "Time" },
|
||||
new Crc64Column { Label = "Crc64" }
|
||||
new Crc64Column { Label = "Crc64" },
|
||||
new OsThreadColumn { Label = "TID" }
|
||||
)
|
||||
{ }
|
||||
|
||||
|
|
@ -453,4 +454,19 @@ internal sealed class ResourceWatcherTable : Table<Record>
|
|||
public override int Compare(Record lhs, Record rhs)
|
||||
=> lhs.RefCount.CompareTo(rhs.RefCount);
|
||||
}
|
||||
|
||||
private sealed class OsThreadColumn : ColumnString<Record>
|
||||
{
|
||||
public override float Width
|
||||
=> 60 * UiHelpers.Scale;
|
||||
|
||||
public override string ToName(Record item)
|
||||
=> item.OsThreadId.ToString();
|
||||
|
||||
public override void DrawColumn(Record item, int _)
|
||||
=> ImGuiUtil.RightAlign(ToName(item));
|
||||
|
||||
public override int Compare(Record lhs, Record rhs)
|
||||
=> lhs.OsThreadId.CompareTo(rhs.OsThreadId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue