forked from mtusi2026/mtusi2026lab2
feat: add 4 and 5 track 2
This commit is contained in:
@@ -0,0 +1,176 @@
|
||||
# План истории на 10 000 сообщений
|
||||
|
||||
Дата сбора: `2026-10-01T17:33:15.537043+00:00`.
|
||||
|
||||
Команды выполняются в корне репозитория, Linux/WSL. Контекст Compose: `COMPOSE_PROJECT_NAME=messenger-evidence-final-20261001-02`, `COMPOSE_FILE=compose.yaml:src/experiments/evidence/compose.override.yaml`. Параметры стенда и запуск: [07-compose-secrets.md](07-compose-secrets.md).
|
||||
|
||||
### Выполненная команда
|
||||
|
||||
```sh
|
||||
make test-backend
|
||||
```
|
||||
|
||||
Фрагмент фактического вывода полного запуска [08-code-checks.md](08-code-checks.md); тесты не запускались выборочно.
|
||||
|
||||
```text
|
||||
=== RUN TestHistoryQueryPlanAtTenThousandMessages
|
||||
=== RUN TestHistoryQueryPlanAtTenThousandMessages/first
|
||||
grade4_test.go:281: first page EXPLAIN (ANALYZE, BUFFERS): [
|
||||
{
|
||||
"Plan": {
|
||||
"Node Type": "Limit",
|
||||
"Parallel Aware": false,
|
||||
"Async Capable": false,
|
||||
"Startup Cost": 0.29,
|
||||
"Total Cost": 4.29,
|
||||
"Plan Rows": 51,
|
||||
"Plan Width": 69,
|
||||
"Actual Startup Time": 0.020,
|
||||
"Actual Total Time": 0.029,
|
||||
"Actual Rows": 51,
|
||||
"Actual Loops": 1,
|
||||
"Shared Hit Blocks": 3,
|
||||
"Shared Read Blocks": 0,
|
||||
"Shared Dirtied Blocks": 0,
|
||||
"Shared Written Blocks": 0,
|
||||
"Local Hit Blocks": 0,
|
||||
"Local Read Blocks": 0,
|
||||
"Local Dirtied Blocks": 0,
|
||||
"Local Written Blocks": 0,
|
||||
"Temp Read Blocks": 0,
|
||||
"Temp Written Blocks": 0,
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Index Scan",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": false,
|
||||
"Async Capable": false,
|
||||
"Scan Direction": "Forward",
|
||||
"Index Name": "messages_history_idx",
|
||||
"Relation Name": "messages",
|
||||
"Alias": "messages",
|
||||
"Startup Cost": 0.29,
|
||||
"Total Cost": 784.70,
|
||||
"Plan Rows": 9999,
|
||||
"Plan Width": 69,
|
||||
"Actual Startup Time": 0.019,
|
||||
"Actual Total Time": 0.024,
|
||||
"Actual Rows": 51,
|
||||
"Actual Loops": 1,
|
||||
"Index Cond": "((chat_id = '469ccc02-1f52-49a1-bfac-3a030e303a89'::uuid) AND (ROW(created_at, id) > ROW('0001-01-01 00:00:00+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
|
||||
"Rows Removed by Index Recheck": 0,
|
||||
"Shared Hit Blocks": 3,
|
||||
"Shared Read Blocks": 0,
|
||||
"Shared Dirtied Blocks": 0,
|
||||
"Shared Written Blocks": 0,
|
||||
"Local Hit Blocks": 0,
|
||||
"Local Read Blocks": 0,
|
||||
"Local Dirtied Blocks": 0,
|
||||
"Local Written Blocks": 0,
|
||||
"Temp Read Blocks": 0,
|
||||
"Temp Written Blocks": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"Planning": {
|
||||
"Shared Hit Blocks": 6,
|
||||
"Shared Read Blocks": 0,
|
||||
"Shared Dirtied Blocks": 0,
|
||||
"Shared Written Blocks": 0,
|
||||
"Local Hit Blocks": 0,
|
||||
"Local Read Blocks": 0,
|
||||
"Local Dirtied Blocks": 0,
|
||||
"Local Written Blocks": 0,
|
||||
"Temp Read Blocks": 0,
|
||||
"Temp Written Blocks": 0
|
||||
},
|
||||
"Planning Time": 0.095,
|
||||
"Triggers": [
|
||||
],
|
||||
"Execution Time": 0.065
|
||||
}
|
||||
]
|
||||
=== RUN TestHistoryQueryPlanAtTenThousandMessages/late
|
||||
grade4_test.go:281: late page EXPLAIN (ANALYZE, BUFFERS): [
|
||||
{
|
||||
"Plan": {
|
||||
"Node Type": "Limit",
|
||||
"Parallel Aware": false,
|
||||
"Async Capable": false,
|
||||
"Startup Cost": 0.29,
|
||||
"Total Cost": 14.48,
|
||||
"Plan Rows": 51,
|
||||
"Plan Width": 69,
|
||||
"Actual Startup Time": 0.014,
|
||||
"Actual Total Time": 0.022,
|
||||
"Actual Rows": 51,
|
||||
"Actual Loops": 1,
|
||||
"Shared Hit Blocks": 3,
|
||||
"Shared Read Blocks": 0,
|
||||
"Shared Dirtied Blocks": 0,
|
||||
"Shared Written Blocks": 0,
|
||||
"Local Hit Blocks": 0,
|
||||
"Local Read Blocks": 0,
|
||||
"Local Dirtied Blocks": 0,
|
||||
"Local Written Blocks": 0,
|
||||
"Temp Read Blocks": 0,
|
||||
"Temp Written Blocks": 0,
|
||||
"Plans": [
|
||||
{
|
||||
"Node Type": "Index Scan",
|
||||
"Parent Relationship": "Outer",
|
||||
"Parallel Aware": false,
|
||||
"Async Capable": false,
|
||||
"Scan Direction": "Forward",
|
||||
"Index Name": "messages_history_idx",
|
||||
"Relation Name": "messages",
|
||||
"Alias": "messages",
|
||||
"Startup Cost": 0.29,
|
||||
"Total Cost": 278.27,
|
||||
"Plan Rows": 999,
|
||||
"Plan Width": 69,
|
||||
"Actual Startup Time": 0.013,
|
||||
"Actual Total Time": 0.019,
|
||||
"Actual Rows": 51,
|
||||
"Actual Loops": 1,
|
||||
"Index Cond": "((chat_id = '469ccc02-1f52-49a1-bfac-3a030e303a89'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.009001+00'::timestamp with time zone, '11292e18-2dac-4a73-b29f-13fa5ea58f92'::uuid)))",
|
||||
"Rows Removed by Index Recheck": 0,
|
||||
"Shared Hit Blocks": 3,
|
||||
"Shared Read Blocks": 0,
|
||||
"Shared Dirtied Blocks": 0,
|
||||
"Shared Written Blocks": 0,
|
||||
"Local Hit Blocks": 0,
|
||||
"Local Read Blocks": 0,
|
||||
"Local Dirtied Blocks": 0,
|
||||
"Local Written Blocks": 0,
|
||||
"Temp Read Blocks": 0,
|
||||
"Temp Written Blocks": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"Planning": {
|
||||
"Shared Hit Blocks": 0,
|
||||
"Shared Read Blocks": 0,
|
||||
"Shared Dirtied Blocks": 0,
|
||||
"Shared Written Blocks": 0,
|
||||
"Local Hit Blocks": 0,
|
||||
"Local Read Blocks": 0,
|
||||
"Local Dirtied Blocks": 0,
|
||||
"Local Written Blocks": 0,
|
||||
"Temp Read Blocks": 0,
|
||||
"Temp Written Blocks": 0
|
||||
},
|
||||
"Planning Time": 0.046,
|
||||
"Triggers": [
|
||||
],
|
||||
"Execution Time": 0.034
|
||||
}
|
||||
]
|
||||
--- PASS: TestHistoryQueryPlanAtTenThousandMessages (0.82s)
|
||||
--- PASS: TestHistoryQueryPlanAtTenThousandMessages/first (0.00s)
|
||||
--- PASS: TestHistoryQueryPlanAtTenThousandMessages/late (0.00s)
|
||||
```
|
||||
|
||||
Код завершения полного запуска: `0`.
|
||||
|
||||
Файл: [src/backend/tests/grade4_test.go](../../src/backend/tests/grade4_test.go).
|
||||
Reference in New Issue
Block a user