diff options
Diffstat (limited to 'src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs')
-rw-r--r-- | src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs b/src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs index 95dc11f4..abb29541 100644 --- a/src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs +++ b/src/SMAPI/Framework/PerformanceCounter/PeakEntry.cs @@ -1,20 +1,31 @@ using System; -using System.Collections.Generic; namespace StardewModdingAPI.Framework.PerformanceCounter { + /// <summary>A peak invocation time.</summary> internal struct PeakEntry { + /********* + ** Accessors + *********/ /// <summary>The actual execution time in milliseconds.</summary> - public readonly double ExecutionTimeMilliseconds; + public double ExecutionTimeMilliseconds { get; } - /// <summary>The DateTime when the entry occured.</summary> - public DateTime EventTime; + /// <summary>When the entry occurred.</summary> + public DateTime EventTime { get; } - /// <summary>The context list, which records all sources involved in exceeding the threshold.</summary> - public readonly List<AlertContext> Context; + /// <summary>The sources involved in exceeding the threshold.</summary> + public AlertContext[] Context { get; } - public PeakEntry(double executionTimeMilliseconds, DateTime eventTime, List<AlertContext> context) + + /********* + ** Public methods + *********/ + /// <summary>Construct an instance.</summary> + /// <param name="executionTimeMilliseconds">The actual execution time in milliseconds.</param> + /// <param name="eventTime">When the entry occurred.</param> + /// <param name="context">The sources involved in exceeding the threshold.</param> + public PeakEntry(double executionTimeMilliseconds, DateTime eventTime, AlertContext[] context) { this.ExecutionTimeMilliseconds = executionTimeMilliseconds; this.EventTime = eventTime; |