From 694cca4b21878850ba6131105a0c560fdfbc5f10 Mon Sep 17 00:00:00 2001 From: Drachenkaetzchen Date: Wed, 15 Jan 2020 16:01:35 +0100 Subject: Added documentation for all performance counter methods and members. Refactored the naming of several members and methods to reflect their actual intention. --- .../Framework/PerformanceCounter/AlertEntry.cs | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'src/SMAPI/Framework/PerformanceCounter/AlertEntry.cs') 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 { + /// A single alert entry. internal struct AlertEntry { - public PerformanceCounterCollection Collection; - public double ExecutionTimeMilliseconds; - public double Threshold; - public List Context; + /// The collection in which the alert occurred. + public readonly PerformanceCounterCollection Collection; - public AlertEntry(PerformanceCounterCollection collection, double executionTimeMilliseconds, double threshold, List context) + /// The actual execution time in milliseconds. + public readonly double ExecutionTimeMilliseconds; + + /// The configured alert threshold. + public readonly double ThresholdMilliseconds; + + /// The context list, which records all sources involved in exceeding the threshold. + public readonly List Context; + + /// Creates a new alert entry. + /// The source collection in which the alert occurred. + /// The actual execution time in milliseconds. + /// The configured threshold in milliseconds. + /// A list of AlertContext to record which sources were involved + public AlertEntry(PerformanceCounterCollection collection, double executionTimeMilliseconds, double thresholdMilliseconds, List context) { this.Collection = collection; this.ExecutionTimeMilliseconds = executionTimeMilliseconds; - this.Threshold = threshold; + this.ThresholdMilliseconds = thresholdMilliseconds; this.Context = context; } } -- cgit