44 instantiations of DimensionScope
Aspire.Dashboard (4)
Components\Controls\Chart\MetricInstrumentDataCache.cs (2)
58
var mergedDimension = new
DimensionScope
(refreshedDimension.Capacity, refreshedDimension.Attributes);
87
var clone = new
DimensionScope
(dimension.Capacity, dimension.Attributes);
Otlp\Model\MetricValues\DimensionScope.cs (1)
150
var newDimensionScope = new
DimensionScope
(value.Capacity, value.Attributes);
Otlp\Storage\SqliteTelemetryRepository.Metrics.Reads.cs (1)
362
new
DimensionScope
(
Aspire.Dashboard.Components.Tests (5)
Controls\PlotlyChartTests.cs (5)
52
var dimension = new
DimensionScope
(capacity: 100, []);
139
var dimension = new
DimensionScope
(capacity: 100, []);
202
var dimension = new
DimensionScope
(capacity: 100, []);
259
var dimension = new
DimensionScope
(capacity: 100, [KeyValuePair.Create("http.route", "/"), KeyValuePair.Create("http.response.status_code", "200")]);
309
var dimension = new
DimensionScope
(capacity: 100, [KeyValuePair.Create("http.route", "/")]);
Aspire.Dashboard.Tests (35)
ChartDataCalculatorTests.cs (35)
33
var dimension = new
DimensionScope
(capacity: 100, []);
144
var dimension = new
DimensionScope
(capacity: 100, []);
166
var dimension = new
DimensionScope
(capacity: 100, []);
191
var dim1 = new
DimensionScope
(capacity: 100, []);
192
var dim2 = new
DimensionScope
(capacity: 100, []);
220
var stableDimension = new
DimensionScope
(capacity: 100, []);
221
var changingDimension = new
DimensionScope
(capacity: 100, []);
254
var dimension = new
DimensionScope
(capacity: 100, []);
282
var dimension = new
DimensionScope
(capacity: 100, []);
315
var dimension = new
DimensionScope
(capacity: 100, []);
337
var frequentDimension = new
DimensionScope
(capacity: 100, []);
338
var stoppedDimension = new
DimensionScope
(capacity: 100, []);
392
var dimension = new
DimensionScope
(capacity: 100, []);
448
var dimension = new
DimensionScope
(100, []);
475
var stableDimension = new
DimensionScope
(capacity: 100, []);
476
var changingDimension = new
DimensionScope
(capacity: 100, []);
529
var dimension = new
DimensionScope
(capacity: 100, []);
652
var first = new
DimensionScope
(100, []);
653
var second = new
DimensionScope
(100, []);
674
var dimension = new
DimensionScope
(100, []);
710
var dimension = new
DimensionScope
(100, []);
755
var first = new
DimensionScope
(100, []);
756
var second = new
DimensionScope
(100, []);
788
var first = new
DimensionScope
(100, []);
789
var second = new
DimensionScope
(100, []);
808
var dimension = new
DimensionScope
(100, []);
823
var dimension = new
DimensionScope
(100, []);
846
var dimension = new
DimensionScope
(100, []);
868
var dimension = new
DimensionScope
(100, []);
890
var dimension = new
DimensionScope
(capacity: 100, []);
914
var cachedDimension = new
DimensionScope
(capacity: 100, firstAttributes);
918
var refreshedDimension = new
DimensionScope
(capacity: 100, firstAttributes);
922
var newDimension = new
DimensionScope
(capacity: 100, secondAttributes);
947
var cachedDimension = new
DimensionScope
(capacity: 100, attributes);
952
var refreshedDimension = new
DimensionScope
(capacity: 100, attributes);
86 references to DimensionScope
Aspire.Dashboard (30)
Components\Controls\Chart\ChartDataCalculator.cs (9)
25
public ChartData CalculateChartValues(List<
DimensionScope
> dimensions, DateTimeOffset startTime, Func<DateTimeOffset, DateTimeOffset> toLocal, string yLabel)
80
public ChartData CalculateHistogramValues(List<
DimensionScope
> dimensions, DateTimeOffset startTime, Func<DateTimeOffset, DateTimeOffset> toLocal, string yLabel)
159
public List<double?> CalculateCounterIncreaseValues(List<
DimensionScope
> dimensions, DateTimeOffset startTime, OtlpAggregationTemporality temporality)
171
foreach (
var
dimension in dimensions)
225
internal static bool TryCalculatePoint(List<
DimensionScope
> dimensions, DateTimeOffset start, DateTimeOffset end, out double pointValue)
230
foreach (
var
dimension in dimensions)
301
internal static bool TryCalculateHistogramPoints(List<
DimensionScope
> dimensions, DateTimeOffset start, DateTimeOffset end, Dictionary<int, ChartTrace> traces, List<ChartExemplar> exemplars, out bool incompatibleBounds)
319
private static bool TryAggregateHistogram(List<
DimensionScope
> dimensions, DateTimeOffset start, DateTimeOffset end,
330
foreach (
var
dimension in dimensions)
Components\Controls\Chart\MetricInstrumentDataCache.cs (8)
18
foreach (
var
dimension in data.Dimensions)
47
var dimensions = new List<
DimensionScope
>(refreshed.Dimensions.Count);
48
foreach (
var
refreshedDimension in refreshed.Dimensions)
50
var
cachedDimension = cached.Dimensions.FirstOrDefault(dimension => AttributesEqual(dimension.Attributes, refreshedDimension.Attributes));
58
var
mergedDimension = new DimensionScope(refreshedDimension.Capacity, refreshedDimension.Attributes);
85
private static
DimensionScope
CloneDimension(
DimensionScope
dimension, DateTime windowStart)
87
var
clone = new DimensionScope(dimension.Capacity, dimension.Attributes);
Model\InstrumentViewModel.cs (2)
15
public List<
DimensionScope
>? MatchedDimensions { get; private set; }
40
public async Task UpdateDataAsync(OtlpInstrumentSummary instrument, List<
DimensionScope
> matchedDimensions, bool hasOverflow)
Model\TelemetryExportService.cs (4)
528
private static OtlpNumberDataPointJson[] ConvertNumberDataPoints(List<
DimensionScope
> dimensions)
532
foreach (
var
dimension in dimensions)
561
private static OtlpHistogramDataPointJson[] ConvertHistogramDataPoints(List<
DimensionScope
> dimensions)
565
foreach (
var
dimension in dimensions)
Otlp\Model\MetricValues\DimensionScope.cs (3)
148
internal static
DimensionScope
Clone(
DimensionScope
value, DateTime? valuesStart, DateTime? valuesEnd)
150
var
newDimensionScope = new DimensionScope(value.Capacity, value.Attributes);
Otlp\Model\OtlpInstrument.cs (1)
32
public required List<
DimensionScope
> Dimensions { get; init; }
Otlp\Storage\SqliteTelemetryRepository.Metrics.Reads.cs (3)
198
private List<
DimensionScope
> MaterializeMetricDimensions(
289
var
dimension = results[dimensionIndex];
605
private sealed record StoredMetricDimension(long DimensionId,
DimensionScope
Scope);
Aspire.Dashboard.Components.Tests (7)
Controls\PlotlyChartTests.cs (7)
52
var
dimension = new DimensionScope(capacity: 100, []);
139
var
dimension = new DimensionScope(capacity: 100, []);
202
var
dimension = new DimensionScope(capacity: 100, []);
257
DimensionScope
CreateDimension(int value)
259
var
dimension = new DimensionScope(capacity: 100, [KeyValuePair.Create("http.route", "/"), KeyValuePair.Create("http.response.status_code", "200")]);
307
DimensionScope
CreateDimension()
309
var
dimension = new DimensionScope(capacity: 100, [KeyValuePair.Create("http.route", "/")]);
Aspire.Dashboard.Tests (49)
ChartDataCalculatorTests.cs (37)
33
var
dimension = new DimensionScope(capacity: 100, []);
144
var
dimension = new DimensionScope(capacity: 100, []);
166
var
dimension = new DimensionScope(capacity: 100, []);
191
var
dim1 = new DimensionScope(capacity: 100, []);
192
var
dim2 = new DimensionScope(capacity: 100, []);
220
var
stableDimension = new DimensionScope(capacity: 100, []);
221
var
changingDimension = new DimensionScope(capacity: 100, []);
254
var
dimension = new DimensionScope(capacity: 100, []);
282
var
dimension = new DimensionScope(capacity: 100, []);
315
var
dimension = new DimensionScope(capacity: 100, []);
337
var
frequentDimension = new DimensionScope(capacity: 100, []);
338
var
stoppedDimension = new DimensionScope(capacity: 100, []);
392
var
dimension = new DimensionScope(capacity: 100, []);
448
var
dimension = new DimensionScope(100, []);
475
var
stableDimension = new DimensionScope(capacity: 100, []);
476
var
changingDimension = new DimensionScope(capacity: 100, []);
529
var
dimension = new DimensionScope(capacity: 100, []);
652
var
first = new DimensionScope(100, []);
653
var
second = new DimensionScope(100, []);
674
var
dimension = new DimensionScope(100, []);
710
var
dimension = new DimensionScope(100, []);
755
var
first = new DimensionScope(100, []);
756
var
second = new DimensionScope(100, []);
788
var
first = new DimensionScope(100, []);
789
var
second = new DimensionScope(100, []);
803
var dimensions = new List<
DimensionScope
>();
808
var
dimension = new DimensionScope(100, []);
823
var
dimension = new DimensionScope(100, []);
846
var
dimension = new DimensionScope(100, []);
868
var
dimension = new DimensionScope(100, []);
890
var
dimension = new DimensionScope(capacity: 100, []);
914
var
cachedDimension = new DimensionScope(capacity: 100, firstAttributes);
918
var
refreshedDimension = new DimensionScope(capacity: 100, firstAttributes);
922
var
newDimension = new DimensionScope(capacity: 100, secondAttributes);
947
var
cachedDimension = new DimensionScope(capacity: 100, attributes);
952
var
refreshedDimension = new DimensionScope(capacity: 100, attributes);
992
private static OtlpInstrumentData CreateInstrumentData(List<
DimensionScope
> dimensions)
Integration\OtlpHttpJsonTests.cs (1)
779
var
dimension = Assert.Single(instrumentData.Dimensions);
TelemetryRepositoryTests\MetricsTests.cs (10)
406
var
dimensionWithoutAttributes = Assert.Single(instrumentData.Dimensions, dimension => dimension.Attributes.Length == 0);
580
var
dimension = Assert.Single(instrument.Dimensions);
871
var
resource1Test1Dimensions = Assert.Single(resource1Test1Instrument.Dimensions);
916
var
resource2Test1Dimensions = Assert.Single(resource2Test1Instrument.Dimensions);
931
var
resource2Test3Dimensions = Assert.Single(resource2Test3Instrument.Dimensions);
1056
var
resource2Test1Dimensions = Assert.Single(resource2Test1Instrument.Dimensions);
1071
var
resource2Test3Dimensions = Assert.Single(resource2Test3Instrument.Dimensions);
1414
var
dimension = Assert.Single(instrument.Dimensions);
1478
var
dimension = Assert.Single(instrument.Dimensions);
2340
var
initialDimension = Assert.Single(initialInstrument!.Dimensions);
TelemetryRepositoryTests\SqliteTelemetryPersistenceTests.cs (1)
462
var
dimension = Assert.Single(instrument!.Dimensions);