From f4dd89f97a3269f7998cba944f599beb4bf561c8 Mon Sep 17 00:00:00 2001 From: Szymon Kulec Date: Tue, 7 Nov 2017 10:46:30 +0100 Subject: [PATCH 1/2] Proper obsoletion of UpdateInterval method --- .../FodyWeavers.xml | 4 ++++ .../NServiceBus.Metrics.PerformanceCounters.csproj | 1 + .../PerformanceCountersSettings.cs | 9 +++++++++ 3 files changed, 14 insertions(+) create mode 100644 src/NServiceBus.Metrics.PerformanceCounters/FodyWeavers.xml diff --git a/src/NServiceBus.Metrics.PerformanceCounters/FodyWeavers.xml b/src/NServiceBus.Metrics.PerformanceCounters/FodyWeavers.xml new file mode 100644 index 0000000..4f63d3b --- /dev/null +++ b/src/NServiceBus.Metrics.PerformanceCounters/FodyWeavers.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/NServiceBus.Metrics.PerformanceCounters/NServiceBus.Metrics.PerformanceCounters.csproj b/src/NServiceBus.Metrics.PerformanceCounters/NServiceBus.Metrics.PerformanceCounters.csproj index cbee79b..046f392 100644 --- a/src/NServiceBus.Metrics.PerformanceCounters/NServiceBus.Metrics.PerformanceCounters.csproj +++ b/src/NServiceBus.Metrics.PerformanceCounters/NServiceBus.Metrics.PerformanceCounters.csproj @@ -14,6 +14,7 @@ + diff --git a/src/NServiceBus.Metrics.PerformanceCounters/PerformanceCountersSettings.cs b/src/NServiceBus.Metrics.PerformanceCounters/PerformanceCountersSettings.cs index 0103170..27b5e95 100644 --- a/src/NServiceBus.Metrics.PerformanceCounters/PerformanceCountersSettings.cs +++ b/src/NServiceBus.Metrics.PerformanceCounters/PerformanceCountersSettings.cs @@ -26,5 +26,14 @@ public void EnableSLAPerformanceCounters(TimeSpan sla) endpointConfiguration.GetSettings().Set(SLAMonitoringFeature.EndpointSLAKey, sla); endpointConfiguration.EnableFeature(); } + + /// + /// Sets the update interval. + /// + /// + [ObsoleteEx(Message = "This interval is no longer used for reporting. Counters values are updated as soon as they are reported", RemoveInVersion = "3.0")] + public void UpdateCounterEvery(TimeSpan updateInterval) + { + } } } \ No newline at end of file From 156fb91f83aa2bb859bac78cea649c921ff9fa65 Mon Sep 17 00:00:00 2001 From: Szymon Kulec Date: Tue, 7 Nov 2017 11:33:41 +0100 Subject: [PATCH 2/2] API Approvals --- .../NServiceBus.Metrics.PerformanceCounters.approved.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/NServiceBus.Metrics.PerformanceCounters.Tests/NServiceBus.Metrics.PerformanceCounters.approved.cs b/src/NServiceBus.Metrics.PerformanceCounters.Tests/NServiceBus.Metrics.PerformanceCounters.approved.cs index 52b881b..b11dd60 100644 --- a/src/NServiceBus.Metrics.PerformanceCounters.Tests/NServiceBus.Metrics.PerformanceCounters.approved.cs +++ b/src/NServiceBus.Metrics.PerformanceCounters.Tests/NServiceBus.Metrics.PerformanceCounters.approved.cs @@ -23,5 +23,9 @@ public static NServiceBus.PerformanceCountersSettings EnableWindowsPerformanceCo public class PerformanceCountersSettings { public void EnableSLAPerformanceCounters(System.TimeSpan sla) { } + [System.ObsoleteAttribute("This interval is no longer used for reporting. Counters values are updated as soo" + + "n as they are reported. Will be treated as an error from version 2.0.0. Will be " + + "removed in version 3.0.0.", false)] + public void UpdateCounterEvery(System.TimeSpan updateInterval) { } } } \ No newline at end of file