airbyte-integrations/connectors/source-postgres/README.md
To run performance tests in commandline:
./gradlew :airbyte-integrations:connectors:source-postgres:performanceTest [--cpulimit=cpulimit/<limit>] [--memorylimit=memorylimit/<limit>]
In pull request:
/test-performance connector=connectors/source-postgres [--cpulimit=cpulimit/<limit>] [--memorylimit=memorylimit/<limit>]
cpulimit: Limit the number of CPUs. The minimum is 2. E.g. --cpulimit=cpulimit/2.memorylimit: Limit the size of the memory. Must include the unit at the end (e.g. MB, GB). The minimum size is 6MB. E.g. --memorylimit=memorylimit/4GB.ResourceRequirements.java.In order to create a database with a certain number of tables, and a certain number of records in each of them, you need to follow a few simple steps.
cd airbyte-integrations/connectors/source-postgres
psql -h <host> -d <db-name> -U <username> -p <port> -a -q -f src/test-performance/sql/1-create-copy-tables-procedure.sql
psql -h <host> -d <db-name> -U <username> -p <port> -a -q -f src/test-performance/sql/2-create-insert-rows-to-table-procedure.sql
psql -h <host> -d <db-name> -U <username> -p <port> -a -q -f src/test-performance/sql/3-run-script.sql