Skip to content

Commit

Permalink
fix invalid data length (#146)
Browse files Browse the repository at this point in the history
* fix invalid data length

* update nebula-go

* update nebula-go
  • Loading branch information
czpmango authored Dec 10, 2021
1 parent fcd6f2d commit 828ceea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ require (
github.com/c-bata/go-prompt v0.2.6
github.com/jedib0t/go-pretty/v6 v6.0.5
github.com/jievince/liner v1.2.3
github.com/vesoft-inc/nebula-go/v2 v2.6.0
github.com/vesoft-inc/nebula-go/v2 v2.5.2-0.20211210024917-9461e07cdca2
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/vesoft-inc/nebula-go/v2 v2.6.0 h1:yS5JH8eNjXtHSZXDRcNihdYaW9FyjOsrpG5iIMkIFBs=
github.com/vesoft-inc/nebula-go/v2 v2.6.0/go.mod h1:fehDUs97/mpmxXi9WezhznX0Dg7hmQRUoOWgDZv9zG0=
github.com/vesoft-inc/nebula-go/v2 v2.5.2-0.20211210024917-9461e07cdca2 h1:ivN82oSpM/kNCZVdzoCSj1IT4ZDW7Xi2juhAZvh7eF8=
github.com/vesoft-inc/nebula-go/v2 v2.5.2-0.20211210024917-9461e07cdca2/go.mod h1:fehDUs97/mpmxXi9WezhznX0Dg7hmQRUoOWgDZv9zG0=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ func loop(c cli.Cli) error {
continue
}
// Server side command
var t1 int32 = 0
var t2 int32 = 0
var t1 int64 = 0
var t2 int64 = 0
for i := 0; i < g_repeats; i++ {
start := time.Now()
res, err := session.Execute(line)
Expand All @@ -267,14 +267,14 @@ func loop(c cli.Cli) error {
t1 += res.GetLatency()
if c.Output() {
duration := printResultSet(res, start)
t2 += int32(duration / 1000)
t2 += int64(duration / 1000)
fmt.Println(time.Now().In(time.Local).Format(time.RFC1123))
fmt.Println()
}
c.SetSpace(res.GetSpaceName())
}
if g_repeats > 1 {
fmt.Printf("Executed %v times, (total time spent %d/%d us), (average time spent %d/%d us)\n", g_repeats, t1, t2, t1/int32(g_repeats), t2/int32(g_repeats))
fmt.Printf("Executed %v times, (total time spent %d/%d us), (average time spent %d/%d us)\n", g_repeats, t1, t2, t1/int64(g_repeats), t2/int64(g_repeats))
fmt.Println()
}
g_repeats = 1
Expand Down

0 comments on commit 828ceea

Please sign in to comment.