Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make batch sizes configurable #4149

Merged
merged 22 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add batch-size for integration
  • Loading branch information
kropidlowsky committed Mar 13, 2024
commit 5092b596578a60b5b9a8aa62c5a732c997f83a42
3 changes: 3 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ tasks:
-postgresql-url='postgres://username@127.0.0.1:5432/ferretdb?search_path='
-compat-url='mongodb://username:password@127.0.0.1:47018/?tls=true&tlsCertificateKeyFile=../build/certs/client.pem&tlsCaFile=../build/certs/rootCA-cert.pem&replicaSet=rs0'
-disable-pushdown={{.DISABLE_PUSHDOWN}}
-batch-size=100

test-integration-sqlite:
desc: "Run integration tests for `sqlite` backend"
Expand All @@ -244,6 +245,7 @@ tasks:
-target-tls
-compat-url='mongodb://username:password@127.0.0.1:47018/?tls=true&tlsCertificateKeyFile=../build/certs/client.pem&tlsCaFile=../build/certs/rootCA-cert.pem&replicaSet=rs0'
-disable-pushdown={{.DISABLE_PUSHDOWN}}
-batch-size=1000

test-integration-mysql:
desc: "Run integration tests for `mysql` handler"
Expand Down Expand Up @@ -364,6 +366,7 @@ tasks:
--handler=pg
--postgresql-url='postgres://username@127.0.0.1:5432/ferretdb?search_path='
--test-records-dir=tmp/records
--test-batch-size=100

run-sqlite:
desc: "Run FerretDB with `sqlite` backend"
Expand Down
1 change: 1 addition & 0 deletions integration/setup/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ func setupListener(tb testtb.TB, ctx context.Context, logger *zap.Logger) string
CappedCleanupPercentage: 20,
CappedCleanupInterval: 0,
EnableNewAuth: true,
BatchSize: *batchSizeF,
},
}
h, closeBackend, err := registry.NewHandler(handler, handlerOpts)
Expand Down
2 changes: 2 additions & 0 deletions integration/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ var (
mysqlURLF = flag.String("mysql-url", "", "in-process FerretDB: MySQL URL for 'mysql' handler.")
hanaURLF = flag.String("hana-url", "", "in-process FerretDB: Hana URL for 'hana' handler.")

batchSizeF = flag.Int("batch-size", 100, "number of maximum size of query parameters")

compatURLF = flag.String("compat-url", "", "compat system's (MongoDB) URL for compatibility tests; if empty, they are skipped")

benchDocsF = flag.Int("bench-docs", 1000, "benchmarks: number of documents to generate per iteration")
Expand Down