summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/PerformanceMonitoring/AlertEntry.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-01 16:21:35 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-01 16:21:35 -0500
commitc8d627cdf2ae3126584ec2500877ff19987db17f (patch)
tree2cc6f604df00027239476acf3a74ae6bb0761323 /src/SMAPI/Framework/PerformanceMonitoring/AlertEntry.cs
parentf976b5c0f095a881fc20f6ce5dcf5a50ebb2b5da (diff)
parent17a9193fd28c527dcba40360702adb277736cc45 (diff)
downloadSMAPI-c8d627cdf2ae3126584ec2500877ff19987db17f.tar.gz
SMAPI-c8d627cdf2ae3126584ec2500877ff19987db17f.tar.bz2
SMAPI-c8d627cdf2ae3126584ec2500877ff19987db17f.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/PerformanceMonitoring/AlertEntry.cs')
-rw-r--r--src/SMAPI/Framework/PerformanceMonitoring/AlertEntry.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/PerformanceMonitoring/AlertEntry.cs b/src/SMAPI/Framework/PerformanceMonitoring/AlertEntry.cs
new file mode 100644
index 00000000..f5b80189
--- /dev/null
+++ b/src/SMAPI/Framework/PerformanceMonitoring/AlertEntry.cs
@@ -0,0 +1,38 @@
+namespace StardewModdingAPI.Framework.PerformanceMonitoring
+{
+ /// <summary>A single alert entry.</summary>
+ internal struct AlertEntry
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The collection in which the alert occurred.</summary>
+ public PerformanceCounterCollection Collection { get; }
+
+ /// <summary>The actual execution time in milliseconds.</summary>
+ public double ExecutionTimeMilliseconds { get; }
+
+ /// <summary>The configured alert threshold in milliseconds.</summary>
+ public double ThresholdMilliseconds { get; }
+
+ /// <summary>The sources involved in exceeding the threshold.</summary>
+ public AlertContext[] Context { get; }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="collection">The collection in which the alert occurred.</param>
+ /// <param name="executionTimeMilliseconds">The actual execution time in milliseconds.</param>
+ /// <param name="thresholdMilliseconds">The configured alert threshold in milliseconds.</param>
+ /// <param name="context">The sources involved in exceeding the threshold.</param>
+ public AlertEntry(PerformanceCounterCollection collection, double executionTimeMilliseconds, double thresholdMilliseconds, AlertContext[] context)
+ {
+ this.Collection = collection;
+ this.ExecutionTimeMilliseconds = executionTimeMilliseconds;
+ this.ThresholdMilliseconds = thresholdMilliseconds;
+ this.Context = context;
+ }
+ }
+}