Skip to content

Commit 6f81775

Browse files
author
zhanglifang@chinatelecom.cn
committed
update go.mod
1 parent feec334 commit 6f81775

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/.idea
2-
/vendor
2+
/vendor
3+
go.sum

cmd/benchmark/connect/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ loop:
8484
defer srv.wg.Done()
8585
_, err := srv.connect(strconv.Itoa(i))
8686
if err != nil {
87-
log.Println("connect error:", err)
87+
log.Println("connect error:", err.Error())
8888
return
8989
}
9090
}(i)

cmd/benchmark/publish/command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (cmd *Command) ParseFlags(args ...string) (Options, error) {
4141
fs.IntVar(&options.Qos, "qos", 1, "qos")
4242
fs.StringVar(&options.Topic, "topic", "topic_name", "topic name")
4343
fs.IntVar(&options.ConnectionInterval, "ci", 100, "connection interval (ms)")
44-
fs.IntVar(&options.PublishInterval, "i", 100, "publishing interval (ms)")
44+
fs.IntVar(&options.PublishInterval, "i", 1000, "publishing interval (ms)")
4545
fs.IntVar(&options.Count, "c", 1000, "number of clients")
4646
fs.IntVar(&options.Size, "s", 256, "payload size (bytes)")
4747
fs.IntVar(&options.SubCount, "sub", 0, "number of clients which subscribe topic #")

cmd/benchmark/publish/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ loop:
135135
defer srv.wg.Done()
136136
c, err := srv.connect(strconv.Itoa(i))
137137
if err != nil {
138-
log.Println("connect error:", err)
138+
log.Println("connect error:", err.Error())
139139
return
140140
}
141141
srv.publish(ctx, c)

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ require (
1111
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
1212
github.com/modern-go/reflect2 v1.0.1 // indirect
1313
github.com/ugorji/go/codec v0.0.0-20181209151446-772ced7fd4c2 // indirect
14+
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 // indirect
1415
gopkg.in/go-playground/validator.v8 v8.18.2 // indirect
1516
gopkg.in/yaml.v2 v2.2.2
1617
)

0 commit comments

Comments
 (0)