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"
|
"time"
|
||||||
|
|
||||||
"github.com/uptrace/go-clickhouse/ch"
|
"github.com/uptrace/go-clickhouse/ch"
|
||||||
"github.com/uptrace/go-clickhouse/chdebug"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const query = `
|
const query = `
|
||||||
@ -40,11 +39,10 @@ func benchmark(ctx context.Context, db *ch.DB) error {
|
|||||||
func main() {
|
func main() {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
db := ch.Connect(ch.WithDatabase("test"))
|
db := ch.Connect(
|
||||||
db.AddQueryHook(chdebug.NewQueryHook(
|
ch.WithDatabase("test"),
|
||||||
chdebug.WithEnabled(false),
|
ch.WithCompression(false),
|
||||||
chdebug.FromEnv(""),
|
)
|
||||||
))
|
|
||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
if err := benchmark(ctx, db); err != nil {
|
if err := benchmark(ctx, db); err != nil {
|
||||||
|
@ -6,7 +6,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/uptrace/go-clickhouse/ch"
|
"github.com/uptrace/go-clickhouse/ch"
|
||||||
"github.com/uptrace/go-clickhouse/chdebug"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Model struct {
|
type Model struct {
|
||||||
@ -35,11 +34,10 @@ func benchmark(ctx context.Context, db *ch.DB) error {
|
|||||||
func main() {
|
func main() {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
db := ch.Connect(ch.WithDatabase("test"))
|
db := ch.Connect(
|
||||||
db.AddQueryHook(chdebug.NewQueryHook(
|
ch.WithDatabase("test"),
|
||||||
chdebug.WithEnabled(false),
|
ch.WithCompression(false),
|
||||||
chdebug.FromEnv(""),
|
)
|
||||||
))
|
|
||||||
|
|
||||||
if err := db.ResetModel(ctx, (*Model)(nil)); err != nil {
|
if err := db.ResetModel(ctx, (*Model)(nil)); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user