Skip to content

Commit

Permalink
Refactor test metrics to be more intuitive
Browse files Browse the repository at this point in the history
  • Loading branch information
ejsmith committed Sep 27, 2024
1 parent 609ec17 commit a3c8fad
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 92 deletions.
4 changes: 2 additions & 2 deletions src/Foundatio.TestHarness/Jobs/JobQueueTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Foundatio.Jobs;
using Foundatio.Lock;
using Foundatio.Queues;
using Foundatio.Tests.Metrics;
using Foundatio.Tests.Utility;
using Foundatio.Xunit;
using Microsoft.Extensions.Logging;
using Xunit;
Expand Down Expand Up @@ -133,7 +133,7 @@ public virtual async Task CanRunMultipleQueueJobsAsync()
var queues = new List<IQueue<SampleQueueWorkItem>>();
try
{
using var metricsCollector = new DiagnosticsMetricsCollector(FoundatioDiagnostics.Meter.Name, _logger);
using var metrics = new InMemoryMetrics(FoundatioDiagnostics.Meter.Name, _logger);

for (int i = 0; i < jobCount; i++)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Foundatio.TestHarness/Messaging/MessageBusTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Foundatio.AsyncEx;
using Foundatio.Messaging;
using Foundatio.Tests.Extensions;
using Foundatio.Tests.Metrics;
using Foundatio.Tests.Utility;
using Foundatio.Utility;
using Foundatio.Xunit;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -41,7 +41,7 @@ public virtual async Task CanUseMessageOptionsAsync()
if (messageBus == null)
return;

using var metricsCollector = new DiagnosticsMetricsCollector(FoundatioDiagnostics.Meter.Name, _logger);
using var metrics = new InMemoryMetrics(FoundatioDiagnostics.Meter.Name, _logger);

try
{
Expand Down
Loading

0 comments on commit a3c8fad

Please sign in to comment.