Browse Source

Merge pull request #8528 from gyuho/ctx

tools/benchmark: replace 'golang.org/x/net/context' with 'context'
Gyu-Ho Lee 8 years ago
parent
commit
ba89bbb47d

+ 1 - 1
tools/benchmark/cmd/lease.go

@@ -15,6 +15,7 @@
 package cmd
 
 import (
+	"context"
 	"fmt"
 	"time"
 
@@ -22,7 +23,6 @@ import (
 	"github.com/coreos/etcd/pkg/report"
 
 	"github.com/spf13/cobra"
-	"golang.org/x/net/context"
 	"gopkg.in/cheggaaa/pb.v1"
 )
 

+ 1 - 1
tools/benchmark/cmd/put.go

@@ -15,6 +15,7 @@
 package cmd
 
 import (
+	"context"
 	"encoding/binary"
 	"fmt"
 	"math"
@@ -26,7 +27,6 @@ import (
 	"github.com/coreos/etcd/pkg/report"
 
 	"github.com/spf13/cobra"
-	"golang.org/x/net/context"
 	"golang.org/x/time/rate"
 	"gopkg.in/cheggaaa/pb.v1"
 )

+ 1 - 1
tools/benchmark/cmd/range.go

@@ -15,6 +15,7 @@
 package cmd
 
 import (
+	"context"
 	"fmt"
 	"math"
 	"os"
@@ -24,7 +25,6 @@ import (
 	"github.com/coreos/etcd/pkg/report"
 
 	"github.com/spf13/cobra"
-	"golang.org/x/net/context"
 	"golang.org/x/time/rate"
 	"gopkg.in/cheggaaa/pb.v1"
 )

+ 1 - 1
tools/benchmark/cmd/stm.go

@@ -15,6 +15,7 @@
 package cmd
 
 import (
+	"context"
 	"encoding/binary"
 	"fmt"
 	"math"
@@ -28,7 +29,6 @@ import (
 	"github.com/coreos/etcd/pkg/report"
 
 	"github.com/spf13/cobra"
-	"golang.org/x/net/context"
 	"golang.org/x/time/rate"
 	"gopkg.in/cheggaaa/pb.v1"
 )

+ 1 - 1
tools/benchmark/cmd/txn_put.go

@@ -15,6 +15,7 @@
 package cmd
 
 import (
+	"context"
 	"encoding/binary"
 	"fmt"
 	"math"
@@ -25,7 +26,6 @@ import (
 	"github.com/coreos/etcd/pkg/report"
 
 	"github.com/spf13/cobra"
-	"golang.org/x/net/context"
 	"golang.org/x/time/rate"
 	"gopkg.in/cheggaaa/pb.v1"
 )

+ 1 - 1
tools/benchmark/cmd/util.go

@@ -15,6 +15,7 @@
 package cmd
 
 import (
+	"context"
 	"crypto/rand"
 	"fmt"
 	"log"
@@ -23,7 +24,6 @@ import (
 
 	"github.com/coreos/etcd/clientv3"
 	"github.com/coreos/etcd/pkg/report"
-	"golang.org/x/net/context"
 )
 
 var (

+ 1 - 1
tools/benchmark/cmd/watch_get.go

@@ -15,6 +15,7 @@
 package cmd
 
 import (
+	"context"
 	"fmt"
 	"sync"
 	"time"
@@ -23,7 +24,6 @@ import (
 	"github.com/coreos/etcd/pkg/report"
 
 	"github.com/spf13/cobra"
-	"golang.org/x/net/context"
 	"gopkg.in/cheggaaa/pb.v1"
 )
 

+ 3 - 3
tools/benchmark/cmd/watch_latency.go

@@ -15,6 +15,7 @@
 package cmd
 
 import (
+	"context"
 	"fmt"
 	"os"
 	"sync"
@@ -24,7 +25,6 @@ import (
 	"github.com/coreos/etcd/pkg/report"
 
 	"github.com/spf13/cobra"
-	"golang.org/x/net/context"
 	"golang.org/x/time/rate"
 	"gopkg.in/cheggaaa/pb.v1"
 )
@@ -33,8 +33,8 @@ import (
 var watchLatencyCmd = &cobra.Command{
 	Use:   "watch-latency",
 	Short: "Benchmark watch latency",
-	Long: `Benchmarks the latency for watches by measuring 
-	the latency between writing to a key and receiving the 
+	Long: `Benchmarks the latency for watches by measuring
+	the latency between writing to a key and receiving the
 	associated watch response.`,
 	Run: watchLatencyFunc,
 }