Skip to content

Commit db8f0e7

Browse files
authored
Rename variable name to MetricPoints (#2468)
1 parent c3cef63 commit db8f0e7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/OpenTelemetry/Metrics/AggregatorStore.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ internal sealed class AggregatorStore
3636

3737
private readonly AggregationTemporality temporality;
3838
private readonly bool outputDelta;
39-
private readonly MetricPoint[] metrics;
39+
private readonly MetricPoint[] metricPoints;
4040
private readonly AggregationType aggType;
4141
private readonly double[] histogramBounds;
4242
private readonly UpdateLongDelegate updateLongCallback;
@@ -52,7 +52,7 @@ internal AggregatorStore(
5252
double[] histogramBounds,
5353
string[] tagKeysInteresting = null)
5454
{
55-
this.metrics = new MetricPoint[MaxMetricPoints];
55+
this.metricPoints = new MetricPoint[MaxMetricPoints];
5656
this.aggType = aggType;
5757
this.temporality = temporality;
5858
this.outputDelta = temporality == AggregationTemporality.Delta ? true : false;
@@ -98,7 +98,7 @@ internal void SnapShot()
9898

9999
for (int i = 0; i <= indexSnapShot; i++)
100100
{
101-
ref var metricPoint = ref this.metrics[i];
101+
ref var metricPoint = ref this.metricPoints[i];
102102
if (metricPoint.StartTime == default)
103103
{
104104
continue;
@@ -122,7 +122,7 @@ internal void SnapShot()
122122
internal BatchMetricPoint GetMetricPoints()
123123
{
124124
var indexSnapShot = Math.Min(this.metricPointIndex, MaxMetricPoints - 1);
125-
return new BatchMetricPoint(this.metrics, indexSnapShot + 1, this.startTimeExclusive, this.endTimeInclusive);
125+
return new BatchMetricPoint(this.metricPoints, indexSnapShot + 1, this.startTimeExclusive, this.endTimeInclusive);
126126
}
127127

128128
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -135,7 +135,7 @@ private void InitializeZeroTagPointIfNotInitialized()
135135
if (!this.zeroTagMetricPointInitialized)
136136
{
137137
var dt = DateTimeOffset.UtcNow;
138-
this.metrics[0] = new MetricPoint(this.aggType, dt, null, null, this.histogramBounds);
138+
this.metricPoints[0] = new MetricPoint(this.aggType, dt, null, null, this.histogramBounds);
139139
this.zeroTagMetricPointInitialized = true;
140140
}
141141
}
@@ -202,7 +202,7 @@ private int LookupAggregatorStore(string[] tagKey, object[] tagValue, int length
202202
var seqVal = new object[length];
203203
tagValue.CopyTo(seqVal, 0);
204204

205-
ref var metricPoint = ref this.metrics[aggregatorIndex];
205+
ref var metricPoint = ref this.metricPoints[aggregatorIndex];
206206
var dt = DateTimeOffset.UtcNow;
207207
metricPoint = new MetricPoint(this.aggType, dt, seqKey, seqVal, this.histogramBounds);
208208

@@ -228,7 +228,7 @@ private void UpdateLong(long value, ReadOnlySpan<KeyValuePair<string, object>> t
228228
return;
229229
}
230230

231-
this.metrics[index].Update(value);
231+
this.metricPoints[index].Update(value);
232232
}
233233
catch (Exception)
234234
{
@@ -247,7 +247,7 @@ private void UpdateLongCustomTags(long value, ReadOnlySpan<KeyValuePair<string,
247247
return;
248248
}
249249

250-
this.metrics[index].Update(value);
250+
this.metricPoints[index].Update(value);
251251
}
252252
catch (Exception)
253253
{
@@ -266,7 +266,7 @@ private void UpdateDouble(double value, ReadOnlySpan<KeyValuePair<string, object
266266
return;
267267
}
268268

269-
this.metrics[index].Update(value);
269+
this.metricPoints[index].Update(value);
270270
}
271271
catch (Exception)
272272
{
@@ -285,7 +285,7 @@ private void UpdateDoubleCustomTags(double value, ReadOnlySpan<KeyValuePair<stri
285285
return;
286286
}
287287

288-
this.metrics[index].Update(value);
288+
this.metricPoints[index].Update(value);
289289
}
290290
catch (Exception)
291291
{

0 commit comments

Comments
 (0)