Skip to content

Commit

Permalink
Removed unused histogram conversion from remote engine
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Rabenhorst <[email protected]>
  • Loading branch information
rabenhorst committed May 23, 2023
1 parent d532218 commit 59de772
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions pkg/query/remote_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/pkg/errors"
"github.com/prometheus/prometheus/model/histogram"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser"
Expand Down Expand Up @@ -248,17 +247,9 @@ func (r *remoteQuery) Exec(ctx context.Context) *promql.Result {
})
}
for _, hp := range ts.Histograms {
var fh *histogram.FloatHistogram

if hp.IsFloatHistogram() {
fh = prompb.FloatHistogramProtoToFloatHistogram(hp)
} else {
fh = prompb.HistogramProtoToFloatHistogram(hp)
}

series.Histograms = append(series.Histograms, promql.HPoint{
T: hp.Timestamp,
H: fh,
H: prompb.FloatHistogramProtoToFloatHistogram(hp),
})
}
result = append(result, series)
Expand Down

0 comments on commit 59de772

Please sign in to comment.