mirror of
https://github.com/uptrace/go-clickhouse.git
synced 2025-06-08 23:26:11 +02:00
chore: disable compression in benchmarks
This commit is contained in:
parent
1983f91110
commit
c84dc481ac
@ -6,7 +6,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/uptrace/go-clickhouse/ch"
|
||||
"github.com/uptrace/go-clickhouse/chdebug"
|
||||
)
|
||||
|
||||
const query = `
|
||||
@ -40,11 +39,10 @@ func benchmark(ctx context.Context, db *ch.DB) error {
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
db := ch.Connect(ch.WithDatabase("test"))
|
||||
db.AddQueryHook(chdebug.NewQueryHook(
|
||||
chdebug.WithEnabled(false),
|
||||
chdebug.FromEnv(""),
|
||||
))
|
||||
db := ch.Connect(
|
||||
ch.WithDatabase("test"),
|
||||
ch.WithCompression(false),
|
||||
)
|
||||
|
||||
start := time.Now()
|
||||
if err := benchmark(ctx, db); err != nil {
|
||||
|
@ -6,7 +6,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/uptrace/go-clickhouse/ch"
|
||||
"github.com/uptrace/go-clickhouse/chdebug"
|
||||
)
|
||||
|
||||
type Model struct {
|
||||
@ -35,11 +34,10 @@ func benchmark(ctx context.Context, db *ch.DB) error {
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
db := ch.Connect(ch.WithDatabase("test"))
|
||||
db.AddQueryHook(chdebug.NewQueryHook(
|
||||
chdebug.WithEnabled(false),
|
||||
chdebug.FromEnv(""),
|
||||
))
|
||||
db := ch.Connect(
|
||||
ch.WithDatabase("test"),
|
||||
ch.WithCompression(false),
|
||||
)
|
||||
|
||||
if err := db.ResetModel(ctx, (*Model)(nil)); err != nil {
|
||||
panic(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user