mirror of https://github.com/VinGarcia/ksql.git
Fix benchmarks to stop using deprecated constructor
parent
e4c2151fad
commit
6c90673bef
1
Makefile
1
Makefile
|
@ -16,6 +16,7 @@ bench:
|
|||
lint: setup
|
||||
@$(GOBIN)/golint -set_exit_status -min_confidence 0.9 $(path) $(args)
|
||||
@go vet $(path) $(args)
|
||||
@make -C benchmarks
|
||||
@echo "Golint & Go Vet found no problems on your code!"
|
||||
|
||||
mock: setup
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
GOBIN=$(shell go env GOPATH)/bin
|
||||
|
||||
lint:
|
||||
@$(GOBIN)/golint -set_exit_status -min_confidence 0.9 ./...
|
||||
@go vet ./...
|
|
@ -31,9 +31,12 @@ func BenchmarkInsert(b *testing.B) {
|
|||
}
|
||||
|
||||
b.Run("ksql/sql-adapter", func(b *testing.B) {
|
||||
ksqlDB, err := ksql.New(driver, connStr, ksql.Config{
|
||||
MaxOpenConns: 1,
|
||||
})
|
||||
db, err := sql.Open(driver, connStr)
|
||||
if err != nil {
|
||||
b.Fatalf("error connecting to database: %s", err)
|
||||
}
|
||||
db.SetMaxOpenConns(1)
|
||||
ksqlDB, err := ksql.NewWithAdapter(ksql.NewSQLAdapter(db), driver)
|
||||
if err != nil {
|
||||
b.Fatalf("error creating ksql client: %s", err)
|
||||
}
|
||||
|
@ -284,9 +287,12 @@ func BenchmarkQuery(b *testing.B) {
|
|||
}
|
||||
|
||||
b.Run("ksql/sql-adapter", func(b *testing.B) {
|
||||
ksqlDB, err := ksql.New(driver, connStr, ksql.Config{
|
||||
MaxOpenConns: 1,
|
||||
})
|
||||
db, err := sql.Open(driver, connStr)
|
||||
if err != nil {
|
||||
b.Fatalf("error connecting to database: %s", err)
|
||||
}
|
||||
db.SetMaxOpenConns(1)
|
||||
ksqlDB, err := ksql.NewWithAdapter(ksql.NewSQLAdapter(db), driver)
|
||||
if err != nil {
|
||||
b.Fatalf("error creating ksql client: %s", err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue