Lab2: PostgreSQL, Bearer sessions and Redis for grade 4

This commit is contained in:
2026-10-29 23:22:15 +03:00
parent 65003b6119
commit 0406baab3f
49 changed files with 3096 additions and 16 deletions
+11
View File
@@ -0,0 +1,11 @@
{
"date": "2026-10-25",
"command": "python student-tests/run.py",
"clients": 10,
"messages_per_client": 10,
"submitted": 100,
"unique_ids": 100,
"listed": 100,
"failed_requests": 0,
"pass": true
}
+23
View File
@@ -0,0 +1,23 @@
messages=10000
-- first page
Limit (cost=0.29..7.72 rows=50 width=32) (actual time=0.021..0.032 rows=50 loops=1)
Buffers: shared hit=5
-> Index Scan using ix_messages_history on messages (cost=0.29..1486.70 rows=10000 width=32) (actual time=0.021..0.029 rows=50 loops=1)
Index Cond: (chat_id = 'f3c38461-f7ec-49fd-a912-46e9cff8f2b4'::uuid)
Buffers: shared hit=5
Planning:
Buffers: shared hit=104
Planning Time: 0.210 ms
Execution Time: 0.050 ms
-- page after row 5000
Limit (cost=0.29..12.22 rows=50 width=32) (actual time=0.016..0.027 rows=50 loops=1)
Buffers: shared hit=4
-> Index Scan using ix_messages_history on messages (cost=0.29..1200.23 rows=5027 width=32) (actual time=0.015..0.023 rows=50 loops=1)
Index Cond: ((chat_id = 'f3c38461-f7ec-49fd-a912-46e9cff8f2b4'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.005001+00'::timestamp with time zone, 'd063df83-eabe-455a-b0dc-d8e1dfb1364d'::uuid)))
Buffers: shared hit=4
Planning:
Buffers: shared hit=105
Planning Time: 0.276 ms
Execution Time: 0.051 ms
+40
View File
@@ -0,0 +1,40 @@
{
"date": "2026-10-25T17:11:54Z",
"base_url": "http://127.0.0.1:8080",
"race": {
"created": 1,
"conflict": 15
},
"rollback": {
"chats_before": 11,
"chats_after": 11,
"title_rows": 0
},
"explain": {
"messages": 10000
},
"expiry_and_migrations": {
"users_before": 38,
"users_after": 39,
"migration": "001_initial.sql"
},
"redis_restart": {
"pttl_before_ms": 3590337,
"pttl_after_ms": 3588378
},
"dependency_loss": {
"redis_down": {
"live": 200,
"ready": 503,
"anonymous": 401,
"bearer": 503
},
"postgres_down": {
"live": 200,
"ready": 503,
"anonymous": 401,
"bearer": 503
}
},
"messages_after_postgres_restart": 10000
}