summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/PerformanceCounter/AlertEntry.cs
diff options
context:
space:
mode:
authorDrachenkaetzchen <felicia@drachenkatze.org>2020-01-15 16:01:35 +0100
committerDrachenkaetzchen <felicia@drachenkatze.org>2020-01-15 16:01:35 +0100
commit694cca4b21878850ba6131105a0c560fdfbc5f10 (patch)
tree016aadbd247f72e352fc341f3ce944980dc70c90 /src/SMAPI/Framework/PerformanceCounter/AlertEntry.cs
parent280dc911839f8996cddd9804f3f545cc38d20243 (diff)
downloadSMAPI-694cca4b21878850ba6131105a0c560fdfbc5f10.tar.gz
SMAPI-694cca4b21878850ba6131105a0c560fdfbc5f10.tar.bz2
SMAPI-694cca4b21878850ba6131105a0c560fdfbc5f10.zip
Added documentation for all performance counter methods and members. Refactored the naming of several members and methods to reflect their actual intention.
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;
}
}