···3939config :my_app, MyApp.Repo,
4040 database: "path/to/my/database.db",
4141```
4242+4343+## Benchmarks
4444+4545+We have some benchmarks comparing it against the `MySQL` and `Postgres` adapters.
4646+4747+You can read more about those at [bench/README.md](bench/README.md).
+16-3
bench/README.md
···11# Ecto Benchmarks
2233+## Results
44+55+| Benchmark | Description |
66+| --------- | ------------ |
77+| [load](results/load.md) | tracks performance of loading "raw" data into ecto structures |
88+| [to_sql](results/to_sql.md) | tracks performance of parsing `Ecto.Query` structures into "raw" SQL query strings |
99+| [insert](results/insert.md) | tracks performance of inserting changesets and structs in the database with `Repo.insert!/1` function |
1010+1111+For reference, these results were run with a Sabrent Rocket Q 1TB NVMe SSD.
1212+1313+## Running the benchmarks
1414+315Ecto has a benchmark suite to track performance of sensitive operations. Benchmarks
416are run using the [Benchee](https://github.com/PragTob/benchee) library and
517need PostgreSQL and MySQL up and running.
···2840You can also run a benchmark individually by giving the path to the benchmark
2941script instead of `bench/bench_helper.exs`.
30423131-# Docker
3232-I had Postgres already installed and running locally, but needed to get MySQL up and running. The easiest way to do this is with this command:
4343+### Docker
4444+The easiest way to setup mysql and postgresql for the benchmarks is via Docker. Run the following commands to get an instance of each running.
33453446```
3535-docker run -p 3306:3306 --name mysql_server -e MYSQL_ALLOW_EMPTY_PASSWORD=yes mysql:5.7
4747+docker run -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes mysql:5.7
4848+docker run -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres:13.2
3649```