summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs
diff options
context:
space:
mode:
authorDrachenkaetzchen <felicia@drachenkatze.org>2020-01-15 19:08:50 +0100
committerDrachenkaetzchen <felicia@drachenkatze.org>2020-01-15 19:08:50 +0100
commit84973ce5727ad20fe8b8ba4f89e59c8b754f799e (patch)
tree90c7f55d3a42ec73afdf86cebd8ae980ec3c1c4d /src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs
parent238b5db4f7f2f05e8967cc5eda761733d4bf35b4 (diff)
downloadSMAPI-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.cs24
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;
+ }
+ }
+}