Seal Metric class for improved perf (#2461)

This commit is contained in:
Cijo Thomas 2021-10-06 16:28:24 -07:00 committed by GitHub
parent dd6b11bafa
commit 7fc0cbb2ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ using System.Threading;
namespace OpenTelemetry.Metrics
{
internal class AggregatorStore
internal sealed class AggregatorStore
{
internal const int MaxMetricPoints = 2000;
private static readonly ObjectArrayEqualityComparer ObjectArrayComparer = new ObjectArrayEqualityComparer();

View File

@ -20,7 +20,7 @@ using System.Diagnostics.Metrics;
namespace OpenTelemetry.Metrics
{
public class Metric
public sealed class Metric
{
internal static readonly double[] DefaultHistogramBounds = new double[] { 0, 5, 10, 25, 50, 75, 100, 250, 500, 1000 };
private AggregatorStore aggStore;