bench: трек 2 — планы запросов, стоимость записи, backup/restore со сверкой

plans.py: 121 120 сообщений (60k/15k/2k/80), 3 индекса x keyset/OFFSET x 3 размера
чата, pgbench в отдельном контейнере; WAL на вставку детерминированно.
backup_restore.py: pg_dump живой БД во время записи через API, восстановление в
новый контейнер и volume, сверка MD5 по чатам, API на восстановленной БД.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alexey Bodanyuk
2026-10-12 20:08:13 +03:00
co-authored by Claude Opus 5.5
parent a8c6af8c7d
commit eb92e8e91e
21 changed files with 1256 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
variant,repeat,tps,transactions,failed,p50_ms,p95_ms,p99_ms,mean_ms
no_index,1,2055.1,20532,0,3.43,6.677,10.312,3.882
no_index,2,1953.5,19529,0,3.547,7.139,12.24,4.082
no_index,3,2001.8,20012,0,3.487,6.848,10.324,3.983
no_index,4,1572.9,15729,0,4.303,9.726,16.331,5.067
no_index,5,1539.6,15382,0,4.367,9.093,16.95,5.178
keyset_index,1,1002.2,10036,0,5.796,19.448,26.224,7.955
keyset_index,2,1222.9,12222,0,6.34,10.159,14.613,6.529
keyset_index,3,1629.0,16281,0,4.33,8.497,12.283,4.896
keyset_index,4,1629.7,16291,0,4.393,8.13,12.979,4.896
keyset_index,5,1577.4,15763,0,4.732,8.336,11.991,5.058
keyset_plus_sender,1,937.7,9387,0,6.629,17.527,30.246,8.507
keyset_plus_sender,2,895.6,8954,0,6.249,22.727,33.156,8.916
keyset_plus_sender,3,1606.9,16067,0,4.58,8.243,11.774,4.965
keyset_plus_sender,4,1441.4,14415,0,5.61,8.542,11.815,5.535
keyset_plus_sender,5,1223.3,12264,0,6.29,9.296,13.881,6.526
1 variant repeat tps transactions failed p50_ms p95_ms p99_ms mean_ms
2 no_index 1 2055.1 20532 0 3.43 6.677 10.312 3.882
3 no_index 2 1953.5 19529 0 3.547 7.139 12.24 4.082
4 no_index 3 2001.8 20012 0 3.487 6.848 10.324 3.983
5 no_index 4 1572.9 15729 0 4.303 9.726 16.331 5.067
6 no_index 5 1539.6 15382 0 4.367 9.093 16.95 5.178
7 keyset_index 1 1002.2 10036 0 5.796 19.448 26.224 7.955
8 keyset_index 2 1222.9 12222 0 6.34 10.159 14.613 6.529
9 keyset_index 3 1629.0 16281 0 4.33 8.497 12.283 4.896
10 keyset_index 4 1629.7 16291 0 4.393 8.13 12.979 4.896
11 keyset_index 5 1577.4 15763 0 4.732 8.336 11.991 5.058
12 keyset_plus_sender 1 937.7 9387 0 6.629 17.527 30.246 8.507
13 keyset_plus_sender 2 895.6 8954 0 6.249 22.727 33.156 8.916
14 keyset_plus_sender 3 1606.9 16067 0 4.58 8.243 11.774 4.965
15 keyset_plus_sender 4 1441.4 14415 0 5.61 8.542 11.815 5.535
16 keyset_plus_sender 5 1223.3 12264 0 6.29 9.296 13.881 6.526