Skip to content

Commit

Permalink
metrics: remove dependency on golang.org/exp (ethereum#29314)
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Dec 10, 2024
1 parent 1c16ea1 commit 1a36c3a
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ require (
github.com/mattn/go-isatty v0.0.17
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible
github.com/urfave/cli/v2 v2.27.5
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
gopkg.in/natefinch/lumberjack.v2 v2.2.1
)

Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ=
golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down
3 changes: 1 addition & 2 deletions metrics/sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package metrics
import (
"math"
"math/rand"
"slices"
"sync"
"time"

"golang.org/x/exp/slices"
)

const rescaleThreshold = time.Hour
Expand Down
3 changes: 1 addition & 2 deletions metrics/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package metrics
import (
"fmt"
"io"
"slices"
"strings"
"time"

"golang.org/x/exp/slices"
)

// Write sorts writes each metric in the given registry periodically to the
Expand Down
3 changes: 1 addition & 2 deletions metrics/writer_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package metrics

import (
"slices"
"testing"

"golang.org/x/exp/slices"
)

func TestMetricsSorting(t *testing.T) {
Expand Down

0 comments on commit 1a36c3a

Please sign in to comment.