namespace StardewModdingAPI.Framework.PerformanceMonitoring
{
/// A single alert entry.
internal readonly struct AlertEntry
{
/*********
** Accessors
*********/
/// The collection in which the alert occurred.
public PerformanceCounterCollection Collection { get; }
/// The actual execution time in milliseconds.
public double ExecutionTimeMilliseconds { get; }
/// The configured alert threshold in milliseconds.
public double ThresholdMilliseconds { get; }
/// The sources involved in exceeding the threshold.
public AlertContext[] Context { get; }
/*********
** Public methods
*********/
/// Construct an instance.
/// The collection in which the alert occurred.
/// The actual execution time in milliseconds.
/// The configured alert threshold in milliseconds.
/// The sources involved in exceeding the threshold.
public AlertEntry(PerformanceCounterCollection collection, double executionTimeMilliseconds, double thresholdMilliseconds, AlertContext[] context)
{
this.Collection = collection;
this.ExecutionTimeMilliseconds = executionTimeMilliseconds;
this.ThresholdMilliseconds = thresholdMilliseconds;
this.Context = context;
}
}
}