diff options
author | Drachenkaetzchen <felicia@drachenkatze.org> | 2020-01-15 19:08:50 +0100 |
---|---|---|
committer | Drachenkaetzchen <felicia@drachenkatze.org> | 2020-01-15 19:08:50 +0100 |
commit | 84973ce5727ad20fe8b8ba4f89e59c8b754f799e (patch) | |
tree | 90c7f55d3a42ec73afdf86cebd8ae980ec3c1c4d /src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs | |
parent | 238b5db4f7f2f05e8967cc5eda761733d4bf35b4 (diff) | |
download | SMAPI-84973ce5727ad20fe8b8ba4f89e59c8b754f799e.tar.gz SMAPI-84973ce5727ad20fe8b8ba4f89e59c8b754f799e.tar.bz2 SMAPI-84973ce5727ad20fe8b8ba4f89e59c8b754f799e.zip |
Added peak execution time over the last 60 seconds
Diffstat (limited to 'src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs')
-rw-r--r-- | src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs | 24 |
1 files changed, 24 insertions, 0 deletions
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 + { + /// <summary>The actual execution time in milliseconds.</summary> + public readonly double ExecutionTimeMilliseconds; + + /// <summary>The DateTime when the entry occured.</summary> + public DateTime EventTime; + + /// <summary>The context list, which records all sources involved in exceeding the threshold.</summary> + public readonly List<AlertContext> Context; + + public PeakEntry(double executionTimeMilliseconds, DateTime eventTime, List<AlertContext> context) + { + this.ExecutionTimeMilliseconds = executionTimeMilliseconds; + this.EventTime = eventTime; + this.Context = context; + } + } +} |