From 84973ce5727ad20fe8b8ba4f89e59c8b754f799e Mon Sep 17 00:00:00 2001 From: Drachenkaetzchen Date: Wed, 15 Jan 2020 19:08:50 +0100 Subject: Added peak execution time over the last 60 seconds --- .../Framework/PerformanceCounter/PeakEntry.cs | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs (limited to 'src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs') diff --git a/src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs b/src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs new file mode 100644 index 00000000..95dc11f4 --- /dev/null +++ b/src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +namespace StardewModdingAPI.Framework.PerformanceCounter +{ + internal struct PeakEntry + { + /// The actual execution time in milliseconds. + public readonly double ExecutionTimeMilliseconds; + + /// The DateTime when the entry occured. + public DateTime EventTime; + + /// The context list, which records all sources involved in exceeding the threshold. + public readonly List Context; + + public PeakEntry(double executionTimeMilliseconds, DateTime eventTime, List context) + { + this.ExecutionTimeMilliseconds = executionTimeMilliseconds; + this.EventTime = eventTime; + this.Context = context; + } + } +} -- cgit