Skip to content

Commit 289ca0a

Browse files
committed
fix lint
Signed-off-by: Alec Holmes <[email protected]>
1 parent 632c311 commit 289ca0a

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

Diff for: benchmarks/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
These benchmarks are designed to run off the integration test suite, and provide detailed profiling artifacts generated with pprof.
44

55
## Prerequisites
6-
- [Go 1.16+](https://golang.org/dl/)
6+
- [Go 1.17+](https://golang.org/dl/)
77
- [Graphviz](https://graphviz.org/download/)
88
- [pprof](https://github.com/google/pprof)
99
- [Docker](https://www.docker.com/)

Diff for: benchmarks/client/main.go

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import (
66
"runtime"
77
"time"
88

9-
"github.com/envoyproxy/go-control-plane/benchmarks/client/xds"
109
"github.com/urfave/cli/v2"
10+
11+
"github.com/envoyproxy/go-control-plane/benchmarks/client/xds"
1112
)
1213

1314
func main() {

Diff for: benchmarks/client/xds/xds.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"time"
55

66
"google.golang.org/grpc"
7+
"google.golang.org/grpc/credentials/insecure"
78
)
89

910
// Sess holds a grpc connection as well as config options to use during the simulation
@@ -19,7 +20,7 @@ func NewSession(url string, opts ...Option) (*Sess, error) {
1920
o(&options)
2021
}
2122

22-
conn, err := grpc.Dial(url, grpc.WithBlock(), grpc.WithInsecure())
23+
conn, err := grpc.Dial(url, grpc.WithBlock(), grpc.WithTransportCredentials(insecure.NewCredentials()))
2324
if err != nil {
2425
return nil, err
2526
}
@@ -30,16 +31,16 @@ func NewSession(url string, opts ...Option) (*Sess, error) {
3031
}, nil
3132
}
3233

33-
// Simulate will start an xDS stream which provides simulatest clients communicating with an xDS server
34+
// Simulate will start an xDS stream which provides simulated clients communicating with an xDS server
3435
func (s *Sess) Simulate(target time.Duration) error {
3536
// Create a loop that will continually do work until the elapsed time as passed
3637
for timeout := time.After(target); ; {
3738
select {
3839
case <-timeout:
3940
return nil
4041
default:
42+
// TODO(alec): implement me
4143
// Do some work
42-
4344
}
4445
}
4546
}

Diff for: pkg/test/main/main.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ import (
3636
)
3737

3838
const (
39-
PPROF_CPU int = iota
40-
PPROF_HEAP
41-
PPROF_MUTEX
42-
PPROF_BLOCK
43-
PPROF_GOROUTINE
39+
PprofCPU int = iota
40+
PprofHEAP
41+
PprofMUTEX
42+
PprofBLOCK
43+
PprofGOROUTINE
4444
)
4545

4646
var (
@@ -171,15 +171,15 @@ func main() {
171171

172172
if debug {
173173
switch pprofMode {
174-
case PPROF_CPU:
174+
case PprofCPU:
175175
defer profile.Start(profile.CPUProfile, profile.ProfilePath("."), profile.NoShutdownHook).Stop()
176-
case PPROF_HEAP:
176+
case PprofHEAP:
177177
defer profile.Start(profile.MemProfile, profile.ProfilePath(".")).Stop()
178-
case PPROF_MUTEX:
178+
case PprofMUTEX:
179179
defer profile.Start(profile.MutexProfile, profile.ProfilePath(".")).Stop()
180-
case PPROF_BLOCK:
180+
case PprofBLOCK:
181181
defer profile.Start(profile.BlockProfile, profile.ProfilePath(".")).Stop()
182-
case PPROF_GOROUTINE:
182+
case PprofGOROUTINE:
183183
defer profile.Start(profile.GoroutineProfile, profile.ProfilePath(".")).Stop()
184184
}
185185
}

0 commit comments

Comments
 (0)