File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public final class PrometheusCollectorRegistry: Sendable {
5252 let help : String
5353 }
5454
55- private enum BucketType : Sendable , Hashable {
55+ private enum HistogramBuckets : Sendable , Hashable {
5656 case duration( [ Duration ] )
5757 case value( [ Double ] )
5858 }
@@ -66,17 +66,12 @@ public final class PrometheusCollectorRegistry: Sendable {
6666 /// metric. See also https://github.com/prometheus/OpenMetrics/issues/197.
6767 private struct MetricGroup < Metric: Sendable & AnyObject > : Sendable {
6868 var metricsByLabelSets : [ LabelsKey : MetricWithHelp < Metric > ]
69- let buckets : BucketType ? // Store buckets for histogram types
69+ let buckets : HistogramBuckets ?
7070
71- init ( metricsByLabelSets: [ LabelsKey : MetricWithHelp < Metric > ] = [ : ] , buckets: BucketType ) {
71+ init ( metricsByLabelSets: [ LabelsKey : MetricWithHelp < Metric > ] = [ : ] , buckets: HistogramBuckets ? = nil ) {
7272 self . metricsByLabelSets = metricsByLabelSets
7373 self . buckets = buckets
7474 }
75-
76- init ( metricsByLabelSets: [ LabelsKey : MetricWithHelp < Metric > ] = [ : ] ) {
77- self . metricsByLabelSets = metricsByLabelSets
78- self . buckets = nil
79- }
8075 }
8176
8277 private enum Metric {
You can’t perform that action at this time.
0 commit comments