Yuri Astrakhan
6d02416720
Improve PG performance by 28% (!!!) ( #703 )
...
A very long overdue PostgreSQL querying performance optimization that
should have used cached queries, but ... somehow didn't.
Also, this PR adds two new `just` tasks: `run-release` and `bench-http`
I used [oha](https://github.com/hatoo/oha ) for its visual appeal. All
tests were using keep-alive, which I think is relatively accurate
because clients make many tile requests on the same connection. As a
target, I used the same non-empty small tile to reduce the PostgreSQL
indexing load.
❯ just run-release
❯ just bench-http
`bench-http` runs this command:
```
oha -z 120s http://localhost:3000/function_zxy_query/18/235085/122323
```
<pre>
| before the change | after the change |
|----------------------------------|----------------------------------|
| Summary: | Summary: |
| Success rate: 1.0000 | Success rate: 1.0000 |
| Total: 120.0004 secs | Total: 120.0002 secs |
| Slowest: 0.1339 secs | Slowest: 0.3505 secs |
| Fastest: 0.0015 secs | Fastest: 0.0012 secs |
| Average: 0.0076 secs | Average: 0.0055 secs |
| Requests/sec: 6583.6946 | Requests/sec: 9073.5398 |
| | |
| Total data: 113.02 MiB | Total data: 155.76 MiB |
| Size/request: 150 B | Size/request: 150 B |
| Size/sec: 964.41 KiB | Size/sec: 1.30 MiB |
| | |
| Response time histogram: | Response time histogram: |
| 0.002 [1] | 0.001 [1] |
| 0.015 [785706] ■■■■■■■■■■■■■ | 0.036 [1088825] ■■■■■■■■■■■■■ |
| 0.028 [4225] | 0.071 [0] |
| 0.041 [111] | 0.106 [0] |
| 0.054 [2] | 0.141 [0] |
| 0.068 [0] | 0.176 [0] |
| 0.081 [0] | 0.211 [0] |
| 0.094 [0] | 0.246 [0] |
| 0.107 [0] | 0.281 [0] |
| 0.121 [0] | 0.316 [0] |
| 0.134 [1] | 0.350 [1] |
| | |
| Latency distribution: | Latency distribution: |
| 10% in 0.0057 secs | 10% in 0.0039 secs |
| 25% in 0.0064 secs | 25% in 0.0045 secs |
| 50% in 0.0073 secs | 50% in 0.0053 secs |
| 75% in 0.0084 secs | 75% in 0.0063 secs |
| 90% in 0.0098 secs | 90% in 0.0074 secs |
| 95% in 0.0107 secs | 95% in 0.0082 secs |
| 99% in 0.0135 secs | 99% in 0.0102 secs |
</pre>
Fixes #678
2023-06-04 15:02:00 -04:00
Yuri Astrakhan
adab3bca95
Fix mdbook compile target
2023-06-04 14:11:44 -04:00
Yuri Astrakhan
300b08b5b0
cleanup installation docs
2023-06-04 00:12:24 -04:00
Yuri Astrakhan
b147c27380
Move Martin crate to its own subdir ( #699 )
...
This cleans up the code a bit, making all crates to be on the same
level.
2023-06-04 02:50:55 +00:00
Yuri Astrakhan
2cdd373044
Refactor mbtiles lib, mbtiles tool tests & CI ( #702 )
...
* Broke up martin-mbtiles into multiple files
* Made all mbtiles functions take a `SqliteExecutor` -- this way they
can be used with any SQLX connection structs - either a pool connection
or an individual non-pooled connection.
* Simplified mbtiles bin a bit - I realized there is really no need to
pretty print the output for the single value retrieval. Easier to just
dump it to console as is.
* Bump martin-mbtiles to v0.2.0
* Minor fixes in tools docs, cargo.toml, and justfile
* MBTiles tool Integration tests and release publishing
Major thanks to the
[stackoverflow](https://stackoverflow.com/questions/76394665/how-to-pass-sqlx-connection-a-mut-trait-as-a-fn-parameter-in-rust/76395111 )
quick reply by @cafce25 on how to use generic sql executor!
2023-06-04 00:54:50 +02:00
rstanciu
78e67c3ad2
Add mbtiles meta-get
utility ( #701 )
...
* Add functionality to retrieve a metadata value in an mbtiles file by
key; simple implementation for one of the items in #667
* Also, disable TTY in docker-up `just` target
2023-06-03 00:40:22 +00:00
Yuri Astrakhan
290a7c18fa
readme cleanups
2023-06-02 17:00:19 -04:00
Yuri Astrakhan
81bb9582ed
Cleaning up mdbook ( #697 )
...
A lot of book content cleanup, making it a bit shorter and "logical"
(whatever that even means)
To try, run `just mdbook`
2023-06-02 01:16:41 -04:00
Yuri Astrakhan
5d87b086fe
improving readme/docs
2023-06-01 16:15:05 -04:00
baishikele
27f54e2ee1
adjust book style ( #691 )
2023-05-30 19:13:40 -04:00
baishikele
56dde81cfe
Create mdbook documentation ( #681 )
...
Copy readme into multiple book files
Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
2023-05-29 02:06:35 +00:00