diff --git a/SpineViewer/Controls/SpineListView.cs b/SpineViewer/Controls/SpineListView.cs index 1492adf..6cfb4b1 100644 --- a/SpineViewer/Controls/SpineListView.cs +++ b/SpineViewer/Controls/SpineListView.cs @@ -66,6 +66,8 @@ namespace SpineViewer.Controls Program.Logger.Error("Failed to load {} {}", dialog.SkelPath, dialog.AtlasPath); MessageBox.Show(ex.ToString(), "骨骼加载失败", MessageBoxButtons.OK, MessageBoxIcon.Error); } + + Program.Logger.Info($"Current memory usage: {Program.Process.WorkingSet64:N0} Bytes"); } /// @@ -138,6 +140,8 @@ namespace SpineViewer.Controls { Program.Logger.Info("{} skel loaded successfully", success); } + + Program.Logger.Info($"Current memory usage: {Program.Process.WorkingSet64:N0} Bytes"); } private void listView_SelectedIndexChanged(object sender, EventArgs e) diff --git a/SpineViewer/Program.cs b/SpineViewer/Program.cs index b511699..2437ece 100644 --- a/SpineViewer/Program.cs +++ b/SpineViewer/Program.cs @@ -1,9 +1,11 @@ using NLog; +using System.Diagnostics; namespace SpineViewer { internal static class Program { + public static readonly Process Process = Process.GetCurrentProcess(); public static readonly Logger Logger = LogManager.GetCurrentClassLogger(); ///