Skip to content

Commit

Permalink
Fix SA1101 warnings at DurableTaskMetricsProvider (#2993)
Browse files Browse the repository at this point in the history
  • Loading branch information
nytian authored Dec 7, 2024
1 parent 5bb1869 commit 6b47ed0
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#if !FUNCTIONS_V1
Expand Down Expand Up @@ -59,13 +59,13 @@ public virtual async Task<DurableTaskTriggerMetrics> GetMetricsAsync()

if (this.heartbeat != null)
{
metrics.PartitionCount = heartbeat.PartitionCount;
metrics.ControlQueueLengths = JsonConvert.SerializeObject(heartbeat.ControlQueueLengths);
metrics.ControlQueueLatencies = JsonConvert.SerializeObject(heartbeat.ControlQueueLatencies);
metrics.WorkItemQueueLength = heartbeat.WorkItemQueueLength;
if (heartbeat.WorkItemQueueLatency > TimeSpan.Zero)
metrics.PartitionCount = this.heartbeat.PartitionCount;
metrics.ControlQueueLengths = JsonConvert.SerializeObject(this.heartbeat.ControlQueueLengths);
metrics.ControlQueueLatencies = JsonConvert.SerializeObject(this.heartbeat.ControlQueueLatencies);
metrics.WorkItemQueueLength = this.heartbeat.WorkItemQueueLength;
if (this.heartbeat.WorkItemQueueLatency > TimeSpan.Zero)
{
metrics.WorkItemQueueLatency = heartbeat.WorkItemQueueLatency.ToString();
metrics.WorkItemQueueLatency = this.heartbeat.WorkItemQueueLatency.ToString();
}
}

Expand All @@ -92,4 +92,4 @@ internal DisconnectedPerformanceMonitor GetPerformanceMonitor()
}
}
}
#endif
#endif

0 comments on commit 6b47ed0

Please sign in to comment.