summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/PerformanceCounter/AlertEntry.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework/PerformanceCounter/AlertEntry.cs')
-rw-r--r--src/SMAPI/Framework/PerformanceCounter/AlertEntry.cs25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/SMAPI/Framework/PerformanceCounter/AlertEntry.cs b/src/SMAPI/Framework/PerformanceCounter/AlertEntry.cs
index 284af1ce..b87d8642 100644
--- a/src/SMAPI/Framework/PerformanceCounter/AlertEntry.cs
+++ b/src/SMAPI/Framework/PerformanceCounter/AlertEntry.cs
@@ -2,18 +2,31 @@ using System.Collections.Generic;
namespace StardewModdingAPI.Framework.PerformanceCounter
{
+ /// <summary>A single alert entry.</summary>
internal struct AlertEntry
{
- public PerformanceCounterCollection Collection;
- public double ExecutionTimeMilliseconds;
- public double Threshold;
- public List<AlertContext> Context;
+ /// <summary>The collection in which the alert occurred.</summary>
+ public readonly PerformanceCounterCollection Collection;
- public AlertEntry(PerformanceCounterCollection collection, double executionTimeMilliseconds, double threshold, List<AlertContext> context)
+ /// <summary>The actual execution time in milliseconds.</summary>
+ public readonly double ExecutionTimeMilliseconds;
+
+ /// <summary>The configured alert threshold. </summary>
+ public readonly double ThresholdMilliseconds;
+
+ /// <summary>The context list, which records all sources involved in exceeding the threshold.</summary>
+ public readonly List<AlertContext> Context;
+
+ /// <summary>Creates a new alert entry.</summary>
+ /// <param name="collection">The source collection in which the alert occurred.</param>
+ /// <param name="executionTimeMilliseconds">The actual execution time in milliseconds.</param>
+ /// <param name="thresholdMilliseconds">The configured threshold in milliseconds.</param>
+ /// <param name="context">A list of AlertContext to record which sources were involved</param>
+ public AlertEntry(PerformanceCounterCollection collection, double executionTimeMilliseconds, double thresholdMilliseconds, List<AlertContext> context)
{
this.Collection = collection;
this.ExecutionTimeMilliseconds = executionTimeMilliseconds;
- this.Threshold = threshold;
+ this.ThresholdMilliseconds = thresholdMilliseconds;
this.Context = context;
}
}