mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-23 00:49:18 +01:00
Add performance monitor in debug compilations.
This commit is contained in:
parent
f2997102c7
commit
2f7b6e3d55
18 changed files with 204 additions and 233 deletions
|
|
@ -6,6 +6,7 @@ using ImGuiNET;
|
|||
using OtterGui;
|
||||
using OtterGui.Raii;
|
||||
using Penumbra.UI.Classes;
|
||||
using Penumbra.Util;
|
||||
|
||||
namespace Penumbra.UI;
|
||||
|
||||
|
|
@ -52,10 +53,10 @@ public sealed partial class ConfigWindow : Window, IDisposable
|
|||
|
||||
public override void Draw()
|
||||
{
|
||||
using var performance = Penumbra.Performance.Measure( PerformanceType.UiMainWindow );
|
||||
|
||||
try
|
||||
{
|
||||
TimingManager.StartTimer( TimingType.UiMainWindow );
|
||||
|
||||
if( Penumbra.ImcExceptions.Count > 0 )
|
||||
{
|
||||
DrawProblemWindow( $"There were {Penumbra.ImcExceptions.Count} errors while trying to load IMC files from the game data.\n"
|
||||
|
|
@ -103,7 +104,6 @@ public sealed partial class ConfigWindow : Window, IDisposable
|
|||
{
|
||||
Penumbra.Log.Error( $"Exception thrown during UI Render:\n{e}" );
|
||||
}
|
||||
TimingManager.StopTimer( TimingType.UiMainWindow );
|
||||
}
|
||||
|
||||
private static void DrawProblemWindow( string text, bool withExceptions )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue