ЛР 2: завершить трек 2 на оценку 5
Lab2 application / application (pull_request) Canceled after 0s

This commit is contained in:
2026-10-28 15:41:38 +03:00
parent 834876c938
commit 9f0bb97b09
96 changed files with 109054 additions and 1959 deletions
@@ -0,0 +1,40 @@
{
"scope": "observed automated scenarios, not an automatic grade or manual report/CI review",
"results": [
{
"suite": "business-boundaries",
"status": "PASS",
"observation": {
"json_cases": 174
},
"duration_seconds": 4.4283
},
{
"suite": "business-cursors",
"status": "PASS",
"observation": {
"message_items": 7,
"chat_list": {
"items": 7,
"page_limit": 2,
"foreign_cursors_rejected": 3,
"changed_limit": [
1,
100
]
}
},
"duration_seconds": 3.1466
},
{
"suite": "read-after-write",
"status": "PASS",
"observation": {
"writers": 10,
"messages": 100,
"concurrency": 4
},
"duration_seconds": 7.5526
}
]
}
@@ -0,0 +1,32 @@
# HTTP latency matrix
Preliminary closed-loop measurements, not selected application budgets.
| Operation | Clients | n | Errors | Successful RPS | p50 ms | p95 ms | p99 ms |
|---|---:|---:|---:|---:|---:|---:|---:|
| registration | 1 | 6 | 0 | 2.74 | 301.80 | 725.21 | 725.21 |
| login | 1 | 6 | 0 | 7.10 | 125.81 | 173.51 | 173.51 |
| me | 1 | 6 | 0 | 478.51 | 1.98 | 2.43 | 2.43 |
| create_chat | 1 | 6 | 0 | 397.04 | 2.24 | 3.41 | 3.41 |
| send_message | 1 | 6 | 0 | 326.10 | 2.64 | 3.80 | 3.80 |
| history_first | 1 | 6 | 0 | 258.42 | 3.76 | 4.46 | 4.46 |
| history_deep | 1 | 6 | 0 | 231.49 | 3.95 | 5.33 | 5.33 |
| logout | 1 | 6 | 0 | 0.96 | 1033.60 | 1141.33 | 1141.33 |
| registration | 5 | 30 | 0 | 7.21 | 593.69 | 1124.32 | 1248.61 |
| login | 5 | 30 | 0 | 6.13 | 706.27 | 1385.43 | 1463.05 |
| me | 5 | 30 | 0 | 1279.44 | 3.15 | 5.46 | 5.60 |
| create_chat | 5 | 30 | 0 | 441.97 | 5.85 | 37.76 | 37.84 |
| send_message | 5 | 30 | 0 | 863.69 | 4.37 | 8.71 | 8.87 |
| history_first | 5 | 30 | 0 | 476.83 | 7.07 | 26.16 | 26.22 |
| history_deep | 5 | 30 | 0 | 543.70 | 8.09 | 11.84 | 12.25 |
| logout | 5 | 30 | 0 | 4.90 | 1029.49 | 1049.40 | 1050.12 |
| registration | 10 | 60 | 0 | 3.02 | 2272.89 | 5556.08 | 7157.90 |
| login | 10 | 60 | 0 | 2.25 | 3563.76 | 7404.62 | 8596.96 |
| me | 10 | 60 | 0 | 290.00 | 12.22 | 80.18 | 85.43 |
| create_chat | 10 | 60 | 0 | 881.58 | 9.53 | 16.01 | 20.79 |
| send_message | 10 | 60 | 0 | 788.48 | 7.53 | 29.59 | 31.52 |
| history_first | 10 | 60 | 0 | 367.22 | 20.62 | 45.96 | 51.02 |
| history_deep | 10 | 60 | 0 | 307.29 | 22.29 | 63.99 | 77.49 |
| logout | 10 | 60 | 0 | 10.00 | 976.81 | 1039.06 | 1039.21 |
Full conditions, warmup/error timings and CPU/RAM samples: results.json. HTTP times are not SQL times. Small n does not support stable tail estimates.
@@ -0,0 +1,10 @@
{"action": "restart-cache", "project": "lab2-test-71174ad0fefa", "before": {"redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:24:07.119127258Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}, "after": {"redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:25:33.445825923Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}}
{"action": "restart-cache", "project": "lab2-test-71174ad0fefa", "before": {"redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:25:33.445825923Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}, "after": {"redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:25:36.804924299Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}}
{"action": "restart", "project": "lab2-test-71174ad0fefa", "before": {"api": {"id": "bc8a4b116b9d05292a3127e6d55bae47685fc10c24e05cf7609c5e6fc7d24920", "started_at": "2026-10-28T11:24:13.545071261Z", "running": true, "volumes": []}, "postgres": {"id": "c615907f2834982a0695c0d9a61f35b923b6470041d4124bbeafb9a8e26e070e", "started_at": "2026-10-28T11:24:07.129252466Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_postgres_data"]}, "redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:25:36.804924299Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}, "after": {"api": {"id": "bc8a4b116b9d05292a3127e6d55bae47685fc10c24e05cf7609c5e6fc7d24920", "started_at": "2026-10-28T11:27:45.094507512Z", "running": true, "volumes": []}, "postgres": {"id": "c615907f2834982a0695c0d9a61f35b923b6470041d4124bbeafb9a8e26e070e", "started_at": "2026-10-28T11:27:44.80633772Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_postgres_data"]}, "redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:27:44.748977136Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}}
{"action": "restart", "project": "lab2-test-71174ad0fefa", "before": {"api": {"id": "bc8a4b116b9d05292a3127e6d55bae47685fc10c24e05cf7609c5e6fc7d24920", "started_at": "2026-10-28T11:27:45.094507512Z", "running": true, "volumes": []}, "postgres": {"id": "c615907f2834982a0695c0d9a61f35b923b6470041d4124bbeafb9a8e26e070e", "started_at": "2026-10-28T11:27:44.80633772Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_postgres_data"]}, "redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:27:44.748977136Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}, "after": {"api": {"id": "bc8a4b116b9d05292a3127e6d55bae47685fc10c24e05cf7609c5e6fc7d24920", "started_at": "2026-10-28T11:27:52.241914792Z", "running": true, "volumes": []}, "postgres": {"id": "c615907f2834982a0695c0d9a61f35b923b6470041d4124bbeafb9a8e26e070e", "started_at": "2026-10-28T11:27:51.521980959Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_postgres_data"]}, "redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:27:51.35071525Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}}
{"action": "restart", "project": "lab2-test-71174ad0fefa", "before": {"api": {"id": "bc8a4b116b9d05292a3127e6d55bae47685fc10c24e05cf7609c5e6fc7d24920", "started_at": "2026-10-28T11:27:52.241914792Z", "running": true, "volumes": []}, "postgres": {"id": "c615907f2834982a0695c0d9a61f35b923b6470041d4124bbeafb9a8e26e070e", "started_at": "2026-10-28T11:27:51.521980959Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_postgres_data"]}, "redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:27:51.35071525Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}, "after": {"api": {"id": "bc8a4b116b9d05292a3127e6d55bae47685fc10c24e05cf7609c5e6fc7d24920", "started_at": "2026-10-28T11:31:38.416207425Z", "running": true, "volumes": []}, "postgres": {"id": "c615907f2834982a0695c0d9a61f35b923b6470041d4124bbeafb9a8e26e070e", "started_at": "2026-10-28T11:31:37.796610633Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_postgres_data"]}, "redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:31:37.146262716Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}}
{"action": "restart", "project": "lab2-test-71174ad0fefa", "before": {"api": {"id": "bc8a4b116b9d05292a3127e6d55bae47685fc10c24e05cf7609c5e6fc7d24920", "started_at": "2026-10-28T11:31:38.416207425Z", "running": true, "volumes": []}, "postgres": {"id": "c615907f2834982a0695c0d9a61f35b923b6470041d4124bbeafb9a8e26e070e", "started_at": "2026-10-28T11:31:37.796610633Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_postgres_data"]}, "redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:31:37.146262716Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}, "after": {"api": {"id": "bc8a4b116b9d05292a3127e6d55bae47685fc10c24e05cf7609c5e6fc7d24920", "started_at": "2026-10-28T11:31:43.204912927Z", "running": true, "volumes": []}, "postgres": {"id": "c615907f2834982a0695c0d9a61f35b923b6470041d4124bbeafb9a8e26e070e", "started_at": "2026-10-28T11:31:42.795308052Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_postgres_data"]}, "redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:31:42.877580844Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}}
{"action": "stop-db", "project": "lab2-test-71174ad0fefa", "before": {"postgres": {"id": "c615907f2834982a0695c0d9a61f35b923b6470041d4124bbeafb9a8e26e070e", "started_at": "2026-10-28T11:31:42.795308052Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_postgres_data"]}}, "after": {"postgres": {"id": "c615907f2834982a0695c0d9a61f35b923b6470041d4124bbeafb9a8e26e070e", "started_at": "2026-10-28T11:31:42.795308052Z", "running": false, "volumes": ["lab2-test-71174ad0fefa_postgres_data"]}}}
{"action": "start-db", "project": "lab2-test-71174ad0fefa", "before": {"postgres": {"id": "c615907f2834982a0695c0d9a61f35b923b6470041d4124bbeafb9a8e26e070e", "started_at": "2026-10-28T11:31:42.795308052Z", "running": false, "volumes": ["lab2-test-71174ad0fefa_postgres_data"]}}, "after": {"postgres": {"id": "c615907f2834982a0695c0d9a61f35b923b6470041d4124bbeafb9a8e26e070e", "started_at": "2026-10-28T11:31:51.499678584Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_postgres_data"]}}}
{"action": "stop-cache", "project": "lab2-test-71174ad0fefa", "before": {"redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:31:42.877580844Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}, "after": {"redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:31:42.877580844Z", "running": false, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}}
{"action": "start-cache", "project": "lab2-test-71174ad0fefa", "before": {"redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:31:42.877580844Z", "running": false, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}, "after": {"redis": {"id": "f7b07e02d8680ad9cac6d80fd2177e58726c35b48268e0c5ff71b37164ba0b2c", "started_at": "2026-10-28T11:32:01.581486713Z", "running": true, "volumes": ["lab2-test-71174ad0fefa_redis_data"]}}}
@@ -0,0 +1,189 @@
{
"scope": "observed automated scenarios, not an automatic grade or manual report/CI review",
"results": [
{
"suite": "sql-plan",
"status": "PASS",
"observation": {
"actual_rows": 10000,
"chat_distribution_percent": [
70,
20,
6,
3,
1
],
"chat_message_counts": [
7000,
2000,
600,
300,
100
],
"deep_page": {
"explain": {
"Execution Time": 0.033,
"Plan": {
"Actual Loops": 1,
"Actual Rows": 51,
"Actual Startup Time": 0.009,
"Actual Total Time": 0.021,
"Async Capable": false,
"Disabled": false,
"Local Dirtied Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Written Blocks": 0,
"Node Type": "Limit",
"Parallel Aware": false,
"Plan Rows": 51,
"Plan Width": 72,
"Plans": [
{
"Actual Loops": 1,
"Actual Rows": 51,
"Actual Startup Time": 0.009,
"Actual Total Time": 0.015,
"Alias": "messages",
"Async Capable": false,
"Disabled": false,
"Index Cond": "((chat_id = 'de389991-85b0-489c-abd0-b03c8f4a2844'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:08.001+00'::timestamp with time zone, 'a44b6c42-f6cb-400b-9c1f-c2fb94124a88'::uuid)))",
"Index Name": "idx_messages_chat_created_id",
"Index Searches": 1,
"Local Dirtied Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Written Blocks": 0,
"Node Type": "Index Scan",
"Parallel Aware": false,
"Parent Relationship": "Outer",
"Plan Rows": 1399,
"Plan Width": 72,
"Relation Name": "messages",
"Rows Removed by Index Recheck": 0,
"Scan Direction": "Forward",
"Shared Dirtied Blocks": 0,
"Shared Hit Blocks": 4,
"Shared Read Blocks": 0,
"Shared Written Blocks": 0,
"Startup Cost": 0.29,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Total Cost": 532.15
}
],
"Shared Dirtied Blocks": 0,
"Shared Hit Blocks": 4,
"Shared Read Blocks": 0,
"Shared Written Blocks": 0,
"Startup Cost": 0.29,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Total Cost": 19.67
},
"Planning": {
"Local Dirtied Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Written Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Hit Blocks": 0,
"Shared Read Blocks": 0,
"Shared Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.042,
"Triggers": []
},
"max_visited_rows": 51
},
"first_page": {
"explain": {
"Execution Time": 0.029,
"Plan": {
"Actual Loops": 1,
"Actual Rows": 51,
"Actual Startup Time": 0.006,
"Actual Total Time": 0.018,
"Async Capable": false,
"Disabled": false,
"Local Dirtied Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Written Blocks": 0,
"Node Type": "Limit",
"Parallel Aware": false,
"Plan Rows": 51,
"Plan Width": 72,
"Plans": [
{
"Actual Loops": 1,
"Actual Rows": 51,
"Actual Startup Time": 0.005,
"Actual Total Time": 0.013,
"Alias": "messages",
"Async Capable": false,
"Disabled": false,
"Index Cond": "(chat_id = 'de389991-85b0-489c-abd0-b03c8f4a2844'::uuid)",
"Index Name": "idx_messages_chat_created_id",
"Index Searches": 1,
"Local Dirtied Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Written Blocks": 0,
"Node Type": "Index Scan",
"Parallel Aware": false,
"Parent Relationship": "Outer",
"Plan Rows": 7000,
"Plan Width": 72,
"Relation Name": "messages",
"Rows Removed by Index Recheck": 0,
"Scan Direction": "Forward",
"Shared Dirtied Blocks": 0,
"Shared Hit Blocks": 4,
"Shared Read Blocks": 0,
"Shared Written Blocks": 0,
"Startup Cost": 0.29,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Total Cost": 838.45
}
],
"Shared Dirtied Blocks": 0,
"Shared Hit Blocks": 4,
"Shared Read Blocks": 0,
"Shared Written Blocks": 0,
"Startup Cost": 0.29,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Total Cost": 6.39
},
"Planning": {
"Local Dirtied Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Written Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Hit Blocks": 0,
"Shared Read Blocks": 0,
"Shared Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.047,
"Triggers": []
},
"max_visited_rows": 51
},
"go_version": "go1.27.1",
"mode": "plan",
"postgres_version": "18.6 (Debian 18.6-1.pgdg13+2)",
"rows": 10000,
"scan_budget_rows": 1000,
"schema": "lab2_test_8baa4931a28b47619d54a056535e7deb"
},
"duration_seconds": 4.3681
}
]
}
@@ -0,0 +1,107 @@
{
"project": "lab2-test-71174ad0fefa",
"status": "FAIL",
"results": [
{
"check": "contracts",
"status": "PASS",
"seconds": 1.362
},
{
"check": "harness",
"status": "PASS",
"seconds": 0.096
},
{
"check": "lab2-harness",
"status": "PASS",
"seconds": 0.244
},
{
"check": "compose-up",
"status": "PASS",
"seconds": 32.491
},
{
"check": "go-race-build",
"status": "PASS",
"seconds": 6.385
},
{
"check": "go-race",
"status": "FAIL",
"detail": "CheckFailure"
},
{
"check": "go-build",
"status": "PASS",
"seconds": 6.621
},
{
"check": "go-vet",
"status": "PASS",
"seconds": 1.178
},
{
"check": "teacher-smoke",
"status": "PASS",
"seconds": 3.734
},
{
"check": "auth-normal",
"status": "PASS",
"seconds": 19.218
},
{
"check": "business",
"status": "PASS",
"seconds": 15.602
},
{
"check": "sql-plan-10000",
"status": "PASS",
"seconds": 4.698
},
{
"check": "latency-matrix",
"status": "FAIL",
"detail": "CheckFailure"
},
{
"check": "teacher-persistence",
"status": "PASS",
"seconds": 12.174
},
{
"check": "auth-persistence",
"status": "PASS",
"seconds": 4.738
},
{
"check": "postgres-outage",
"status": "PASS",
"seconds": 8.233
},
{
"check": "redis-outage",
"status": "PASS",
"seconds": 10.43
},
{
"check": "short-ttl-api",
"status": "PASS",
"seconds": 1.097
},
{
"check": "auth-expiry",
"status": "PASS",
"seconds": 3.162
},
{
"check": "cleanup",
"status": "PASS",
"seconds": 1.729
}
],
"redis_fixture": "critical session store; explicit REDIS_ADDR=redis:6379 in test override"
}