From 910b4a2c4361c429b09bd35fa52d51b24cc17bc2 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 26 Jan 2020 19:52:31 -0500 Subject: tweak namespace --- .../Framework/PerformanceMonitoring/AlertEntry.cs | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/SMAPI/Framework/PerformanceMonitoring/AlertEntry.cs (limited to 'src/SMAPI/Framework/PerformanceMonitoring/AlertEntry.cs') diff --git a/src/SMAPI/Framework/PerformanceMonitoring/AlertEntry.cs b/src/SMAPI/Framework/PerformanceMonitoring/AlertEntry.cs new file mode 100644 index 00000000..f5b80189 --- /dev/null +++ b/src/SMAPI/Framework/PerformanceMonitoring/AlertEntry.cs @@ -0,0 +1,38 @@ +namespace StardewModdingAPI.Framework.PerformanceMonitoring +{ + /// A single alert entry. + internal 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; + } + } +} -- cgit