mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-02 08:31:11 -08:00
Also, don't make a mergeSeriesSet if there is only one SeriesSet.
This commit is contained in:
parent
48e39068bd
commit
749781edf3
|
@ -303,6 +303,10 @@ type mergeSeriesSet struct {
|
|||
// NewMergeSeriesSet returns a new series set that merges (deduplicates)
|
||||
// series returned by the input series sets when iterating.
|
||||
func NewMergeSeriesSet(sets []SeriesSet) SeriesSet {
|
||||
if len(sets) == 1 {
|
||||
return sets[0]
|
||||
}
|
||||
|
||||
// Sets need to be pre-advanced, so we can introspect the label of the
|
||||
// series under the cursor.
|
||||
var h seriesSetHeap
|
||||
|
|
Loading…
Reference in a new issue