Skip to content

Commit

Permalink
Allow Profiling in Release for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ottermandias committed Feb 4, 2023
1 parent f29bdee commit ea66bd2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion OtterGui
1 change: 1 addition & 0 deletions Penumbra/Penumbra.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

<PropertyGroup>
<MSBuildWarningsAsMessages>$(MSBuildWarningsAsMessages);MSB3277</MSBuildWarningsAsMessages>
<DefineConstants>PROFILING;</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand Down
11 changes: 7 additions & 4 deletions Penumbra/UI/ConfigWindow.DebugTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,20 @@ private void DrawDebugTabGeneral()
PrintValue( "Web Server Enabled", ( _window._penumbra.WebServer != null ).ToString() );
}

[Conditional( "DEBUG" )]
private static void DrawPerformanceTab()
{
ImGui.NewLine();
if( !ImGui.CollapsingHeader( "Performance" ) )
if( ImGui.CollapsingHeader( "Performance" ) )
{
return;
}

Penumbra.StartTimer.Draw( "##startTimer", TimingExtensions.ToName );
ImGui.NewLine();
using( var start = TreeNode( "Startup Performance", ImGuiTreeNodeFlags.DefaultOpen ) )
{
Penumbra.StartTimer.Draw( "##startTimer", TimingExtensions.ToName );
ImGui.NewLine();
}

Penumbra.Performance.Draw( "##performance", "Enable Runtime Performance Tracking", TimingExtensions.ToName );
}

Expand Down
1 change: 1 addition & 0 deletions Penumbra/UI/ConfigWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public ConfigWindow( Penumbra penumbra )
{
_penumbra = penumbra;
_settingsTab = new SettingsTab( this );

_selector = new ModFileSystemSelector( _penumbra.ModFileSystem );
_modPanel = new ModPanel( this );
_selector.SelectionChanged += _modPanel.OnSelectionChange;
Expand Down

0 comments on commit ea66bd2

Please sign in to comment.