StopProfile() { var time = System.DateTime.Now; this.Stop = time; this.Elapsed = time - this.Start; TimingProfileUtilities.RegisterProfile(this); Log.DebugMessage("Profile '{0}': stop {1}", this.Profile.ToString(), time.ToString(DateTimeFormat)); }
Display() { Log.Info("\nBuildAMation Statistics"); Log.Info("Memory Usage"); Log.Info("Peak working set size : {0:N2}MB", BytesToMegaBytes(System.Diagnostics.Process.GetCurrentProcess().PeakWorkingSet64)); Log.Info("Peak virtual size : {0:N2}MB", BytesToMegaBytes(System.Diagnostics.Process.GetCurrentProcess().PeakVirtualMemorySize64)); Log.Info("GC total memory : {0:N2}MB (after GC, {1:N2}MB)", BytesToMegaBytes(System.GC.GetTotalMemory(false)), BytesToMegaBytes(System.GC.GetTotalMemory(true))); Log.Info("\nObject counts"); Log.Info("Tokenized strings : {0} ({1} unshared)", TokenizedString.Count, TokenizedString.UnsharedCount); TokenizedString.DumpCache(); Log.Info("Modules : {0}", Module.Count); TimingProfileUtilities.DumpProfiles(); }
StopProfile() { this.stopWatch.Stop(); TimingProfileUtilities.RegisterProfile(this); }