Sample application for typeorm peformance
$ docker-compose up -d
$ yarn dbinit
initialize tables and create data
...
Done in 11.81s.
$ docker-compose exec postgres psql -h localhost -U root test
psql (12.7)
test=# \d
List of relations
Schema | Name | Type | Owner
--------+----------------------------+----------+-------
public | attach | table | root
public | attach_id_seq | sequence | root
public | category | table | root
public | category4 | table | root
public | category4_id_seq | sequence | root
public | category_id_seq | sequence | root
public | comment | table | root
public | comment_id_seq | sequence | root
public | post1 | table | root
public | post1_categories_category | table | root
public | post1_id_seq | sequence | root
public | post2 | table | root
public | post2_categories_category | table | root
public | post2_id_seq | sequence | root
public | post3 | table | root
public | post3_categories_category | table | root
public | post3_id_seq | sequence | root
public | post4 | table | root
public | post4_categories_category4 | table | root
public | post4_id_seq | sequence | root
public | user | table | root
public | user_id_seq | sequence | root
(22 rows)
$ yarn test --testNamePattern RelationId
Results
$ yarn memoryProfile
Debugger listening on ws://127.0.0.1:9229/d47fd7ee-d7a6-418b-a329-66de1b4466a6
...
$ env DEBUG=true yarn test --testNamePattern "Distinct"
$ yarn test --testNamePattern "Bulk create 1000 articles 100 times"
$ bash tests/bulk/psql.sh