Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
Signed-off-by: Kosuke Morimoto <kou.morimoto@gmail.com>
  • Loading branch information
kmrmt committed Jul 6, 2020
1 parent 354f33e commit 90952ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pkg/tools/cli/loadtest/service/insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func objectVectorProvider(dataset assets.Dataset) (func() interface{}, int) {
func objectVectorsProvider(dataset assets.Dataset, n int) (func() interface{}, int) {
provider, s := objectVectorProvider(dataset)
size := s / n
if s % n != 0 {
if s%n != 0 {
size = size + 1
}
return func() (ret interface{}) {
Expand Down Expand Up @@ -138,7 +138,7 @@ func (l *loader) newInsert() (f loadFunc, err error) {
return f, nil
}

func (l *loader) newStreamInsert() (f loadFunc, err error) {
func (l *loader) newStreamInsert() (f loadFunc, err error) {
l.batchSize = 1
switch l.service {
case config.Agent:
Expand All @@ -156,4 +156,4 @@ func (l *loader) newStreamInsert() (f loadFunc, err error) {
return nil, err
}
return f, nil
}
}
2 changes: 1 addition & 1 deletion pkg/tools/cli/loadtest/service/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func (l *loader) Do(ctx context.Context) <-chan error {
finalize(err)
return p.Signal(syscall.SIGKILL) // TODO: #403
}
log.Infof("result:%s\t%d\t%d\t%f", l.service.String(), l.concurrency, l.batchSize, vps(int(pgCnt) * l.batchSize, start, end))
log.Infof("result:%s\t%d\t%d\t%f", l.service.String(), l.concurrency, l.batchSize, vps(int(pgCnt)*l.batchSize, start, end))

return p.Signal(syscall.SIGTERM) // TODO: #403
}))
Expand Down
4 changes: 1 addition & 3 deletions pkg/tools/cli/loadtest/service/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ func searchRequestProvider(dataset assets.Dataset) (func() interface{}, int, err
}, size, nil
}



func (l *loader) newSearch() (loadFunc, error) {
switch l.service {
case config.Agent:
Expand Down Expand Up @@ -76,4 +74,4 @@ func (l *loader) newStreamSearch() (loadFunc, error) {
default:
return nil, errors.Errorf("undefined service: %s", l.service.String())
}
}
}

0 comments on commit 90952ac

Please sign in to comment.