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 {
52
52
let help : String
53
53
}
54
54
55
- private enum BucketType : Sendable , Hashable {
55
+ private enum HistogramBuckets : Sendable , Hashable {
56
56
case duration( [ Duration ] )
57
57
case value( [ Double ] )
58
58
}
@@ -66,17 +66,12 @@ public final class PrometheusCollectorRegistry: Sendable {
66
66
/// metric. See also https://github.com/prometheus/OpenMetrics/issues/197.
67
67
private struct MetricGroup < Metric: Sendable & AnyObject > : Sendable {
68
68
var metricsByLabelSets : [ LabelsKey : MetricWithHelp < Metric > ]
69
- let buckets : BucketType ? // Store buckets for histogram types
69
+ let buckets : HistogramBuckets ?
70
70
71
- init ( metricsByLabelSets: [ LabelsKey : MetricWithHelp < Metric > ] = [ : ] , buckets: BucketType ) {
71
+ init ( metricsByLabelSets: [ LabelsKey : MetricWithHelp < Metric > ] = [ : ] , buckets: HistogramBuckets ? = nil ) {
72
72
self . metricsByLabelSets = metricsByLabelSets
73
73
self . buckets = buckets
74
74
}
75
-
76
- init ( metricsByLabelSets: [ LabelsKey : MetricWithHelp < Metric > ] = [ : ] ) {
77
- self . metricsByLabelSets = metricsByLabelSets
78
- self . buckets = nil
79
- }
80
75
}
81
76
82
77
private enum Metric {
You can’t perform that action at this time.
0 commit comments