Skip to content

Commit

Permalink
group prometheus imports
Browse files Browse the repository at this point in the history
Signed-off-by: SungJin1212 <[email protected]>
  • Loading branch information
SungJin1212 committed Jan 15, 2025
1 parent f99e6db commit f60cb6c
Show file tree
Hide file tree
Showing 40 changed files with 56 additions and 24 deletions.
1 change: 1 addition & 0 deletions engine/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"time"

"github.com/efficientgo/core/testutil"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/promqltest"
Expand Down
6 changes: 3 additions & 3 deletions engine/distributed.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"context"
"time"

"github.com/thanos-io/promql-engine/api"
"github.com/thanos-io/promql-engine/logicalplan"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/storage"

"github.com/thanos-io/promql-engine/api"
"github.com/thanos-io/promql-engine/logicalplan"
)

type remoteEngine struct {
Expand Down
1 change: 1 addition & 0 deletions engine/distributed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

"github.com/efficientgo/core/errors"
"github.com/efficientgo/core/testutil"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/storage"
Expand Down
1 change: 1 addition & 0 deletions engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

"github.com/efficientgo/core/errors"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/common/promslog"
Expand Down
3 changes: 2 additions & 1 deletion engine/enginefuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ import (
"github.com/efficientgo/core/errors"
"github.com/efficientgo/core/testutil"
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/require"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/promql/promqltest"
"github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/util/teststorage"
"github.com/stretchr/testify/require"

"github.com/thanos-io/promql-engine/api"
"github.com/thanos-io/promql-engine/engine"
Expand Down
5 changes: 3 additions & 2 deletions engine/existing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import (
"testing"
"time"

"github.com/thanos-io/promql-engine/engine"

"github.com/efficientgo/core/testutil"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/promql/promqltest"

"github.com/thanos-io/promql-engine/engine"
)

func TestRangeQuery(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion engine/explain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ import (
"time"

"github.com/efficientgo/core/testutil"
"github.com/stretchr/testify/require"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/promqltest"
"github.com/prometheus/prometheus/storage"
"github.com/stretchr/testify/require"

"github.com/thanos-io/promql-engine/engine"
)
Expand Down
1 change: 1 addition & 0 deletions engine/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"math"

"github.com/facette/natsort"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser"
Expand Down
1 change: 1 addition & 0 deletions engine/user_defined_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"time"

"github.com/efficientgo/core/testutil"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/promqltest"
Expand Down
3 changes: 2 additions & 1 deletion execution/aggregate/accumulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import (
"math"

"github.com/efficientgo/core/errors"
"gonum.org/v1/gonum/floats"

"github.com/prometheus/prometheus/model/histogram"
"github.com/prometheus/prometheus/promql/parser/posrange"
"github.com/prometheus/prometheus/util/annotations"
"gonum.org/v1/gonum/floats"

"github.com/thanos-io/promql-engine/execution/warnings"
)
Expand Down
4 changes: 2 additions & 2 deletions execution/aggregate/hashaggregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"time"

"github.com/efficientgo/core/errors"
"github.com/prometheus/prometheus/promql/parser/posrange"
"github.com/prometheus/prometheus/util/annotations"
"golang.org/x/exp/slices"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/promql/parser/posrange"
"github.com/prometheus/prometheus/util/annotations"

"github.com/thanos-io/promql-engine/execution/model"
"github.com/thanos-io/promql-engine/execution/parse"
Expand Down
4 changes: 2 additions & 2 deletions execution/aggregate/khashaggregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
"time"

"github.com/efficientgo/core/errors"
"github.com/prometheus/prometheus/promql/parser/posrange"
"github.com/prometheus/prometheus/util/annotations"
"golang.org/x/exp/slices"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/promql/parser/posrange"
"github.com/prometheus/prometheus/util/annotations"

"github.com/thanos-io/promql-engine/execution/model"
"github.com/thanos-io/promql-engine/execution/warnings"
Expand Down
1 change: 1 addition & 0 deletions execution/aggregate/scalar_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"sort"

"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/model/histogram"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser"
Expand Down
1 change: 1 addition & 0 deletions execution/aggregate/vector_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"math"

"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/model/histogram"
"github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/promql/parser/posrange"
Expand Down
4 changes: 2 additions & 2 deletions execution/binary/vector.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import (

"github.com/cespare/xxhash/v2"
"github.com/efficientgo/core/errors"
"github.com/prometheus/prometheus/promql/parser/posrange"
"github.com/prometheus/prometheus/util/annotations"
"github.com/zhangyunhao116/umap"
"golang.org/x/exp/slices"

"github.com/prometheus/prometheus/model/histogram"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/promql/parser/posrange"
"github.com/prometheus/prometheus/util/annotations"

"github.com/thanos-io/promql-engine/execution/model"
"github.com/thanos-io/promql-engine/execution/warnings"
Expand Down
1 change: 1 addition & 0 deletions execution/exchange/coalesce.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"time"

"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/model/labels"

"github.com/thanos-io/promql-engine/execution/model"
Expand Down
4 changes: 2 additions & 2 deletions execution/exchange/concurrent.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"sync"
"time"

"github.com/prometheus/prometheus/model/labels"

"github.com/thanos-io/promql-engine/execution/model"
"github.com/thanos-io/promql-engine/query"

"github.com/prometheus/prometheus/model/labels"
)

type maybeStepVector struct {
Expand Down
1 change: 1 addition & 0 deletions execution/exchange/dedup.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"time"

"github.com/cespare/xxhash/v2"

"github.com/prometheus/prometheus/model/histogram"
"github.com/prometheus/prometheus/model/labels"

Expand Down
1 change: 1 addition & 0 deletions execution/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"time"

"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser"
promstorage "github.com/prometheus/prometheus/storage"
Expand Down
1 change: 1 addition & 0 deletions execution/function/histogram.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

"github.com/cespare/xxhash/v2"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser/posrange"
"github.com/prometheus/prometheus/util/annotations"
Expand Down
1 change: 1 addition & 0 deletions execution/function/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"time"

"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser"

Expand Down
1 change: 1 addition & 0 deletions execution/function/relabel.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"time"

"github.com/efficientgo/core/errors"

prommodel "github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/labels"

Expand Down
1 change: 1 addition & 0 deletions execution/parse/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"

"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/promql/parser"
)

Expand Down
1 change: 1 addition & 0 deletions execution/parse/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"

"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/promql/parser"
)

Expand Down
1 change: 1 addition & 0 deletions execution/step_invariant/step_invariant.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"time"

"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/model/labels"

"github.com/thanos-io/promql-engine/execution/model"
Expand Down
3 changes: 2 additions & 1 deletion execution/unary/unary.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (
"sync"
"time"

"gonum.org/v1/gonum/floats"

"github.com/prometheus/prometheus/model/histogram"
"github.com/prometheus/prometheus/model/labels"
"gonum.org/v1/gonum/floats"

"github.com/thanos-io/promql-engine/execution/model"
"github.com/thanos-io/promql-engine/query"
Expand Down
1 change: 1 addition & 0 deletions extlabels/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package extlabels

import (
"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/model/labels"
)

Expand Down
1 change: 1 addition & 0 deletions logicalplan/codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/cortexproject/promqlsmith"
"github.com/efficientgo/core/testutil"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser"

Expand Down
1 change: 1 addition & 0 deletions logicalplan/distribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/util/annotations"
Expand Down
1 change: 1 addition & 0 deletions logicalplan/distribute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"time"

"github.com/efficientgo/core/testutil"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser"

Expand Down
1 change: 1 addition & 0 deletions logicalplan/exprutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package logicalplan

import (
"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/promql/parser"
)

Expand Down
2 changes: 1 addition & 1 deletion logicalplan/passthrough_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/efficientgo/core/testutil"
"github.com/prometheus/prometheus/model/labels"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser"

"github.com/thanos-io/promql-engine/api"
Expand Down
3 changes: 1 addition & 2 deletions logicalplan/propagate_selectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import (
"sort"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/util/annotations"

"github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/util/annotations"

"github.com/thanos-io/promql-engine/query"
)
Expand Down
1 change: 1 addition & 0 deletions logicalplan/set_batch_size_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"testing"

"github.com/efficientgo/core/testutil"

"github.com/prometheus/prometheus/promql/parser"

"github.com/thanos-io/promql-engine/query"
Expand Down
1 change: 1 addition & 0 deletions ringbuffer/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"math"

"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/model/histogram"
"github.com/prometheus/prometheus/util/annotations"

Expand Down
3 changes: 2 additions & 1 deletion storage/prometheus/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ package prometheus_test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/prometheus/prometheus/model/labels"
promstg "github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/tsdb/chunkenc"
"github.com/stretchr/testify/require"

storage "github.com/thanos-io/promql-engine/storage/prometheus"
)
Expand Down
1 change: 1 addition & 0 deletions storage/prometheus/matrix_selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/model/histogram"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/value"
Expand Down
1 change: 1 addition & 0 deletions storage/prometheus/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"strings"

"github.com/cespare/xxhash/v2"

"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/storage"
)
Expand Down
1 change: 1 addition & 0 deletions storage/prometheus/scanners.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"math"

"github.com/efficientgo/core/errors"

"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser/posrange"
"github.com/prometheus/prometheus/storage"
Expand Down
Loading

0 comments on commit f60cb6c

Please sign in to comment.