|
2 | 2 |
|
3 | 3 | > Rust Async Resource Pool
|
4 | 4 |
|
5 |
| -[](https://doc.rust-lang.org/edition-guide/rust-2021/index.html) |
6 |
| -[](https://tokio.rs/) |
7 |
| -[](https://github.com/Astro36/qp/actions) |
8 |
| -[](./LICENSE) |
| 5 | +[](https://crates.io/crates/qp) |
| 6 | +[](https://docs.rs/qp) |
| 7 | +[](https://doc.rust-lang.org/edition-guide/rust-2021/index.html) |
| 8 | +[](https://blog.rust-lang.org/2021/10/21/Rust-1.56.0.html) |
| 9 | +[](https://github.com/Astro36/qp/actions/workflows/qp.yml) |
| 10 | +[](https://crates.io/crates/qp) |
| 11 | +[](./LICENSE) |
9 | 12 |
|
10 | 13 | ## Usage
|
11 | 14 |
|
| 15 | +### DBCP |
| 16 | + |
| 17 | +| Database | Backend | Adapter | Version | |
| 18 | +| ------------ | ---------------- | ------------- | ---------------------- | |
| 19 | +| [PostgreSQL] | [tokio-postgres] | [qp-postgres] | ![qp-postgres-version] | |
| 20 | + |
| 21 | +[PostgreSQL]: https://www.postgresql.org/ |
| 22 | +[tokio-postgres]: https://crates.io/crates/tokio-postgres |
| 23 | +[qp-postgres]: https://crates.io/crates/qp-postgres |
| 24 | +[qp-postgres-version]: https://img.shields.io/crates/v/qp-postgres?style=for-the-badge |
| 25 | + |
12 | 26 | ### Example
|
13 | 27 |
|
14 | 28 | ```rust
|
@@ -68,6 +82,29 @@ async fn main() {
|
68 | 82 | }
|
69 | 83 | ```
|
70 | 84 |
|
| 85 | +## Alternatives |
| 86 | + |
| 87 | +### Performance Comparison |
| 88 | + |
| 89 | +| [bb8] | [deadpool] | |
| 90 | +| ------------ | ----------------- | |
| 91 | +| ![bb8-bench] | ![deadpool-bench] | |
| 92 | + |
| 93 | +| [mobc] | [qp] | |
| 94 | +| ------------- | ----------- | |
| 95 | +| ![mobc-bench] | ![qp-bench] | |
| 96 | + |
| 97 | +[bb8]: https://crates.io/crates/bb8 |
| 98 | +[deadpool]: https://crates.io/crates/deadpool |
| 99 | +[mobc]: https://crates.io/crates/mobc |
| 100 | +[qp]: https://crates.io/crates/qp |
| 101 | +[bb8-bench]: https://astro36.github.io/qp/core/bb8/pool=16%20worker=64/report/pdf.svg |
| 102 | +[deadpool-bench]: https://astro36.github.io/qp/core/deadpool/pool=16%20worker=64/report/pdf.svg |
| 103 | +[mobc-bench]: https://astro36.github.io/qp/core/mobc/pool=16%20worker=64/report/pdf.svg |
| 104 | +[qp-bench]: https://astro36.github.io/qp/core/qp/pool=16%20worker=64/report/pdf.svg |
| 105 | + |
| 106 | +For more information, see [Quick Pool Benchmark](./qp-bench/README.md). |
| 107 | + |
71 | 108 | ## License
|
72 | 109 |
|
73 | 110 | ```text
|
|
0 commit comments