forked from mtusi2026/mtusi2026lab6
Перенести реализацию lab5 в skeleton lab6
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
# Architecture of the app binary inside the image
|
||||
# generated: 2026-10-15T19:03:01Z
|
||||
|
||||
## emulated build (--build-arg TARGETARCH=amd64): e_machine 3e = x86-64
|
||||
02 00 3e 00
|
||||
## fixed build (no TARGETARCH default): e_machine b7 = aarch64
|
||||
02 00 b7 00
|
||||
@@ -0,0 +1,3 @@
|
||||
# body limit check — 2026-10-16T14:02:25Z (limit 256 KiB from SERVER_MAX_BODY_BYTES)
|
||||
тело 400 КиБ (сверх лимита): 413
|
||||
тело 100 КиБ (в пределах): в„– 400
|
||||
@@ -0,0 +1,7 @@
|
||||
# Отказ PostgreSQL на пути отправки сообщения — 2026-10-16T14:10:06Z
|
||||
до остановки БД, через LB : 201 (instance=828f6451261b)
|
||||
до остановки БД, напрямую : 201
|
||||
при остановленной БД, напрямую (ожидается 503): 503
|
||||
при остановленной БД, через LB : 503 (instance=828f6451261b)
|
||||
готовность после возврата БД: True
|
||||
после возврата БД, через LB : 201 (instance=828f6451261b)
|
||||
@@ -0,0 +1,5 @@
|
||||
# make test-failover (прогон 1) — 2026-10-16T13:59:43Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 127, "failed_attempts": 0, "first_recovery_seconds": 0.214}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,5 @@
|
||||
# make test-failover (прогон 2) — 2026-10-16T13:59:43Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 100, "failed_attempts": 0, "first_recovery_seconds": 2.237}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,54 @@
|
||||
# student-tests/replica_failover.py — 2026-10-16T13:59:43Z
|
||||
{
|
||||
"before": {
|
||||
"instances": [
|
||||
"52861386fddb",
|
||||
"8587b4251b72"
|
||||
]
|
||||
},
|
||||
"replicas": [
|
||||
{
|
||||
"stopped": "52861386fddb",
|
||||
"stopped_container": "stop-one.sh: stopped api replica(s): mtusi-messenger-lab3-api-5",
|
||||
"hook_returncode": 0,
|
||||
"hook_seconds": 0.151,
|
||||
"hook_error": "",
|
||||
"successful_writes": 91,
|
||||
"successful_rps": 6.06,
|
||||
"failed_attempts": 0,
|
||||
"uncertain_retries": 0,
|
||||
"first_recovery_seconds": 1.659,
|
||||
"instances_after_recovery": [
|
||||
"8587b4251b72"
|
||||
],
|
||||
"messages_in_history": 91,
|
||||
"restored_seconds": 0.201,
|
||||
"instances_restored": [
|
||||
"52861386fddb",
|
||||
"8587b4251b72"
|
||||
]
|
||||
},
|
||||
{
|
||||
"stopped": "8587b4251b72",
|
||||
"stopped_container": "stop-one.sh: stopped api replica(s): mtusi-messenger-lab3-api-6",
|
||||
"hook_returncode": 0,
|
||||
"hook_seconds": 0.154,
|
||||
"hook_error": "",
|
||||
"successful_writes": 100,
|
||||
"successful_rps": 6.66,
|
||||
"failed_attempts": 0,
|
||||
"uncertain_retries": 0,
|
||||
"first_recovery_seconds": 1.656,
|
||||
"instances_after_recovery": [
|
||||
"52861386fddb"
|
||||
],
|
||||
"messages_in_history": 191,
|
||||
"restored_seconds": 0.182,
|
||||
"instances_restored": [
|
||||
"52861386fddb",
|
||||
"8587b4251b72"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
PASS: каждая реплика остановлена по очереди; записи продолжились, дублей и потерь нет
|
||||
@@ -0,0 +1,4 @@
|
||||
# make test-idempotency — 2026-10-16T13:59:43Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 student-tests/idempotency_parallel.py --base-url "http://localhost:8080"
|
||||
{"replay": {"workers": 12, "instances": ["52861386fddb", "8587b4251b72"], "message_id": "01a14502-f747-7fa8-bbad-84fa27f0ce80"}, "conflict": {"workers": 12, "accepted": 1, "conflicts": 11}, "stable_body": {"message_id": "01a14502-f771-7ea3-a03a-4d559e466ac8"}, "key_required": {"status": 400}}
|
||||
PASS: параллельный повтор с одним Idempotency-Key создаёт ровно одно сообщение
|
||||
@@ -0,0 +1,17 @@
|
||||
# Артефакты предыдущих лабораторных (ЛР1 и ЛР2)
|
||||
|
||||
Файлы перенесены сюда из `evidence/`, потому что относятся к **прежним** конфигурациям
|
||||
стенда и не являются доказательствами ЛР3: они сняты в ЛР1/ЛР2 в репозитории
|
||||
`mtusi-messenger` и попали сюда вместе с переносом кода. Часть из них ссылается на
|
||||
образ `mtusi2026lab1-messenger` и на in-memory хранилище, которое удалено ещё в ЛР2,
|
||||
поэтому их нельзя читать как проверки текущего решения.
|
||||
|
||||
- `check.txt`, `quality.txt`, `concurrency.txt`, `docker.txt`, `health.txt`, `restart.txt`, `sigterm.txt` — ЛР1: офлайн-проверка структуры, линт и тесты, конкурентные чтения, запуск контейнера и обработка SIGTERM.
|
||||
- `memory-experiment.*` — ЛР1: сравнение in-memory хранилища и PostgreSQL.
|
||||
- `track1-benchmark/` — ЛР1, трек 1: бенчмарк append-оптимизации in-memory хранилища (скрипт `scripts/track1_benchmark.py` удалён в ЛР3 как осиротевший: он ссылался на удалённый файл хранилища).
|
||||
- `cache/` — ЛР2: эксперименты с кэшем списка чатов, согласованность и поведение при отказе Redis.
|
||||
- `postgres/explain-analyze.txt` — ЛР2: план запроса истории сообщений.
|
||||
|
||||
Доказательства ЛР3 лежат рядом, в `evidence/` (`smoke.txt`, `idempotency.txt`,
|
||||
`persistence.txt`, `failover/`, `lb-readiness.txt`, `rolling-update/`,
|
||||
`stand.txt`, `arch.txt`, `track1/`), и собраны в `REPORT.md`.
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# API cache performance experiment
|
||||
# generated: 2026-10-09T21:41:31Z
|
||||
running trial 1, cache=False, requests=1000
|
||||
{"requests": 1000, "workers": 8, "duration_seconds": 0.455918375053443, "rps": 2193.375074831716, "p50_ms": 3.3378750667907298, "p95_ms": 5.237665958702564, "p99_ms": 7.377958972938359, "trial": 1, "cache_enabled": false}
|
||||
running trial 1, cache=True, requests=1000
|
||||
{"requests": 1000, "workers": 8, "duration_seconds": 0.424924207967706, "rps": 2353.360861182094, "p50_ms": 3.075250016991049, "p95_ms": 5.355541012249887, "p99_ms": 6.619499996304512, "trial": 1, "cache_enabled": true}
|
||||
running trial 2, cache=False, requests=1000
|
||||
{"requests": 1000, "workers": 8, "duration_seconds": 0.5072490000165999, "rps": 1971.4183763147382, "p50_ms": 3.680104040540755, "p95_ms": 6.2174160266295075, "p99_ms": 8.554207975976169, "trial": 2, "cache_enabled": false}
|
||||
running trial 2, cache=True, requests=1000
|
||||
{"requests": 1000, "workers": 8, "duration_seconds": 0.4116047500865534, "rps": 2429.51520795063, "p50_ms": 2.9188335174694657, "p95_ms": 5.480541964061558, "p99_ms": 7.245125016197562, "trial": 2, "cache_enabled": true}
|
||||
{"results": [{"requests": 1000, "workers": 8, "duration_seconds": 0.455918375053443, "rps": 2193.375074831716, "p50_ms": 3.3378750667907298, "p95_ms": 5.237665958702564, "p99_ms": 7.377958972938359, "trial": 1, "cache_enabled": false}, {"requests": 1000, "workers": 8, "duration_seconds": 0.424924207967706, "rps": 2353.360861182094, "p50_ms": 3.075250016991049, "p95_ms": 5.355541012249887, "p99_ms": 6.619499996304512, "trial": 1, "cache_enabled": true}, {"requests": 1000, "workers": 8, "duration_seconds": 0.5072490000165999, "rps": 1971.4183763147382, "p50_ms": 3.680104040540755, "p95_ms": 6.2174160266295075, "p99_ms": 8.554207975976169, "trial": 2, "cache_enabled": false}, {"requests": 1000, "workers": 8, "duration_seconds": 0.4116047500865534, "rps": 2429.51520795063, "p50_ms": 2.9188335174694657, "p95_ms": 5.480541964061558, "p99_ms": 7.245125016197562, "trial": 2, "cache_enabled": true}], "users": 4, "chats": 60, "sessions_cached_in_both_modes": true}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
# Cache consistency evidence (track 1)
|
||||
# generated: 2026-10-09T21:38:43Z
|
||||
# redis: localhost:6379 db=1
|
||||
|
||||
=== RUN TestChatRepositorySuite
|
||||
=== RUN TestChatRepositorySuite/TestBrokenCacheEntryIsDroppedAndRepopulated
|
||||
=== RUN TestChatRepositorySuite/TestCacheUnavailableFallsBackToSource
|
||||
=== RUN TestChatRepositorySuite/TestConcurrentColdReadsAreDeduplicated
|
||||
chat_repository_test.go:226: distributed lock: 100 concurrent cold reads -> 1 source load
|
||||
=== RUN TestChatRepositorySuite/TestConcurrentColdReadsWithoutProtectionStampede
|
||||
chat_repository_test.go:427: stampede demonstration: 100 concurrent reads -> 100 source loads
|
||||
=== RUN TestChatRepositorySuite/TestCreateInvalidatesMemberCaches
|
||||
=== RUN TestChatRepositorySuite/TestDeeperPagesBypassCache
|
||||
=== RUN TestChatRepositorySuite/TestEvictedCacheEntryReloadsFromSource
|
||||
=== RUN TestChatRepositorySuite/TestFirstPageIsCached
|
||||
=== RUN TestChatRepositorySuite/TestLimitIsPartOfCacheKey
|
||||
=== RUN TestChatRepositorySuite/TestMultipleInstancesShareDistributedLock
|
||||
chat_repository_test.go:276: multi-instance distributed lock: 3 instances x 30 reads -> 1 source load
|
||||
=== RUN TestChatRepositorySuite/TestSlowLoaderBeyondCacheBudgetReturnsData
|
||||
=== RUN TestChatRepositorySuite/TestSourceErrorIsNotRetried
|
||||
--- PASS: TestChatRepositorySuite (0.83s)
|
||||
--- PASS: TestChatRepositorySuite/TestBrokenCacheEntryIsDroppedAndRepopulated (0.00s)
|
||||
--- PASS: TestChatRepositorySuite/TestCacheUnavailableFallsBackToSource (0.00s)
|
||||
--- PASS: TestChatRepositorySuite/TestConcurrentColdReadsAreDeduplicated (0.03s)
|
||||
--- PASS: TestChatRepositorySuite/TestConcurrentColdReadsWithoutProtectionStampede (0.02s)
|
||||
--- PASS: TestChatRepositorySuite/TestCreateInvalidatesMemberCaches (0.01s)
|
||||
--- PASS: TestChatRepositorySuite/TestDeeperPagesBypassCache (0.00s)
|
||||
--- PASS: TestChatRepositorySuite/TestEvictedCacheEntryReloadsFromSource (0.00s)
|
||||
--- PASS: TestChatRepositorySuite/TestFirstPageIsCached (0.00s)
|
||||
--- PASS: TestChatRepositorySuite/TestLimitIsPartOfCacheKey (0.00s)
|
||||
--- PASS: TestChatRepositorySuite/TestMultipleInstancesShareDistributedLock (0.05s)
|
||||
--- PASS: TestChatRepositorySuite/TestSlowLoaderBeyondCacheBudgetReturnsData (0.70s)
|
||||
--- PASS: TestChatRepositorySuite/TestSourceErrorIsNotRetried (0.00s)
|
||||
PASS
|
||||
ok mtusi-messenger/internal/storage/redis 1.338s
|
||||
? mtusi-messenger/internal/storage/redis/mocks [no test files]
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
# Cache latency experiment
|
||||
# generated: 2026-10-06T15:53:09Z
|
||||
go version go1.27.1 darwin/arm64
|
||||
Darwin arm64
|
||||
2026/10/06 18:53:10 OK 00001_init.sql (10.27ms)
|
||||
2026/10/06 18:53:10 goose: successfully migrated database to version: 1
|
||||
=== RUN TestCacheLatencyExperiment
|
||||
cache_latency_experiment_test.go:83: baseline: requests=1000 source_loads=1000 p50=317.209µs p95=343.542µs p99=377.625µs
|
||||
cache_latency_experiment_test.go:84: redis cache: requests=1000 source_loads=1 p50=411.791µs p95=527.709µs p99=565.625µs
|
||||
--- PASS: TestCacheLatencyExperiment (0.97s)
|
||||
=== RUN TestCacheLatencyExperiment
|
||||
cache_latency_experiment_test.go:83: baseline: requests=1000 source_loads=1000 p50=271.125µs p95=330.584µs p99=389.209µs
|
||||
cache_latency_experiment_test.go:84: redis cache: requests=1000 source_loads=1 p50=388µs p95=453.959µs p99=512.625µs
|
||||
--- PASS: TestCacheLatencyExperiment (0.86s)
|
||||
=== RUN TestCacheLatencyExperiment
|
||||
cache_latency_experiment_test.go:83: baseline: requests=1000 source_loads=1000 p50=268.541µs p95=318.417µs p99=367.083µs
|
||||
cache_latency_experiment_test.go:84: redis cache: requests=1000 source_loads=1 p50=408.833µs p95=473.125µs p99=541.042µs
|
||||
--- PASS: TestCacheLatencyExperiment (0.88s)
|
||||
PASS
|
||||
ok mtusi-messenger/internal/storage/postgres 3.097s
|
||||
? mtusi-messenger/internal/storage/postgres/internal/sqlcgen [no test files]
|
||||
? mtusi-messenger/internal/storage/postgres/migrations [no test files]
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# Cache performance experiment
|
||||
# generated: 2026-10-09T21:41:14Z
|
||||
go version go1.27.1 darwin/arm64
|
||||
Darwin arm64
|
||||
2026/10/10 00:41:15 OK 00001_init.sql (10.03ms)
|
||||
2026/10/10 00:41:15 OK 00002_user_chat_versions.sql (2.17ms)
|
||||
2026/10/10 00:41:15 goose: successfully migrated database to version: 2
|
||||
=== RUN TestCachePerformanceExperiment
|
||||
cache_performance_experiment_test.go:115: baseline (no cache): requests=10000 concurrency=50 sql=10000 duration=1.528s rps=6542 p50=7.490875ms p95=9.302792ms p99=10.779ms
|
||||
cache_performance_experiment_test.go:116: redis cache (cold): requests=10000 concurrency=50 sql=1 duration=851ms rps=11749 p50=4.192709ms p95=5.318916ms p99=5.905625ms
|
||||
cache_performance_experiment_test.go:117: redis cache (hot): requests=10000 concurrency=50 sql=0 duration=751ms rps=13320 p50=3.670958ms p95=4.644958ms p99=5.21475ms
|
||||
--- PASS: TestCachePerformanceExperiment (3.50s)
|
||||
=== RUN TestCachePerformanceExperiment
|
||||
cache_performance_experiment_test.go:115: baseline (no cache): requests=10000 concurrency=50 sql=10000 duration=1.415s rps=7066 p50=6.901958ms p95=8.697666ms p99=10.560416ms
|
||||
cache_performance_experiment_test.go:116: redis cache (cold): requests=10000 concurrency=50 sql=1 duration=846ms rps=11815 p50=4.033083ms p95=6.0305ms p99=6.963417ms
|
||||
cache_performance_experiment_test.go:117: redis cache (hot): requests=10000 concurrency=50 sql=0 duration=817ms rps=12234 p50=3.999959ms p95=5.060959ms p99=5.802042ms
|
||||
--- PASS: TestCachePerformanceExperiment (3.39s)
|
||||
=== RUN TestCachePerformanceExperiment
|
||||
cache_performance_experiment_test.go:115: baseline (no cache): requests=10000 concurrency=50 sql=10000 duration=1.511s rps=6618 p50=7.302667ms p95=9.420708ms p99=12.437917ms
|
||||
cache_performance_experiment_test.go:116: redis cache (cold): requests=10000 concurrency=50 sql=1 duration=827ms rps=12093 p50=3.984125ms p95=5.655167ms p99=6.8085ms
|
||||
cache_performance_experiment_test.go:117: redis cache (hot): requests=10000 concurrency=50 sql=0 duration=817ms rps=12247 p50=3.946959ms p95=5.363208ms p99=6.508458ms
|
||||
--- PASS: TestCachePerformanceExperiment (3.55s)
|
||||
PASS
|
||||
ok mtusi-messenger/internal/storage/postgres 10.978s
|
||||
? mtusi-messenger/internal/storage/postgres/internal/sqlcgen [no test files]
|
||||
? mtusi-messenger/internal/storage/postgres/migrations [no test files]
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
baseline: 6ms
|
||||
after stop: 476ms
|
||||
stop: n=1 max=476ms p95=476ms budget=2000ms
|
||||
pause parallel: n=30 max=215ms p95=214ms budget=2000ms
|
||||
create during pause: 201
|
||||
after recovery: new chat visible, 5ms
|
||||
lock keys without TTL: 0
|
||||
PASS: redis outage handled within budget
|
||||
@@ -0,0 +1,3 @@
|
||||
$ make check
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
@@ -0,0 +1,2 @@
|
||||
command: docker run + Python ThreadPoolExecutor(10), 100 POST messages
|
||||
{"sent": 100, "read": 100, "unique": 100}
|
||||
@@ -0,0 +1,11 @@
|
||||
$ docker inspect --format ...
|
||||
status=running health=healthy user=10001:10001
|
||||
$ curl -i http://127.0.0.1:8080/health/live
|
||||
HTTP/1.1 200 OK
|
||||
Access-Control-Expose-Headers: X-Request-Id
|
||||
Content-Type: application/json; charset=utf-8
|
||||
X-Request-Id: 3d145e7d-423a-4510-9d6b-6f45b7cf552d
|
||||
Date: Thu, 24 Sep 2026 20:13:14 GMT
|
||||
Content-Length: 15
|
||||
|
||||
{"status":"ok"}
|
||||
@@ -0,0 +1 @@
|
||||
{"status":"ok"}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
@@ -0,0 +1,8 @@
|
||||
$ python3 scripts/memory_experiment.py --image mtusi2026lab1-messenger:arm64 --memory 64m --max-messages 20000 --output evidence/memory-experiment.json --plot evidence/memory-experiment.png
|
||||
memory_limit=64m
|
||||
successful_messages=8610
|
||||
failed_requests=0
|
||||
OOMKilled=true
|
||||
exit_code=137
|
||||
failure_time_seconds=5.9315
|
||||
plot=evidence/memory-experiment.png
|
||||
@@ -0,0 +1,64 @@
|
||||
# EXPLAIN (ANALYZE, BUFFERS)
|
||||
|
||||
## history_first_page
|
||||
|
||||
Limit (cost=0.29..5.40 rows=51 width=73) (actual time=0.007..0.012 rows=51.00 loops=1)
|
||||
Buffers: shared hit=4
|
||||
-> Index Scan using messages_chat_id_created_at_id_idx on messages (cost=0.29..1002.85 rows=10000 width=73) (actual time=0.006..0.009 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '01a0f77e-9381-736f-9a2b-af3b1e1e87fd'::uuid)
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=4
|
||||
Planning:
|
||||
Buffers: shared hit=44
|
||||
Planning Time: 0.147 ms
|
||||
Execution Time: 0.019 ms
|
||||
|
||||
## history_next_page
|
||||
|
||||
Limit (cost=0.29..7.71 rows=51 width=73) (actual time=0.004..0.010 rows=51.00 loops=1)
|
||||
Buffers: shared hit=4
|
||||
-> Index Scan using messages_chat_id_created_at_id_idx on messages (cost=0.29..524.01 rows=3599 width=73) (actual time=0.004..0.008 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = '01a0f77e-9381-736f-9a2b-af3b1e1e87fd'::uuid) AND (ROW(created_at, id) > ROW('2026-10-01 11:44:23.146682+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=4
|
||||
Planning Time: 0.021 ms
|
||||
Execution Time: 0.027 ms
|
||||
|
||||
## chats_list_for_member
|
||||
|
||||
Limit (cost=0.57..446.14 rows=51 width=70) (actual time=0.018..0.081 rows=51.00 loops=1)
|
||||
Buffers: shared hit=309
|
||||
-> Nested Loop (cost=0.57..87375.78 rows=10001 width=70) (actual time=0.018..0.079 rows=51.00 loops=1)
|
||||
Buffers: shared hit=309
|
||||
-> Index Scan using chats_created_at_id_idx on chats c (cost=0.29..554.24 rows=10001 width=38) (actual time=0.004..0.007 rows=51.00 loops=1)
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=3
|
||||
-> Index Only Scan using chat_members_user_id_chat_id_idx on chat_members visible (cost=0.29..0.36 rows=1 width=16) (actual time=0.001..0.001 rows=1.00 loops=51)
|
||||
Index Cond: ((user_id = '01a0f77e-937a-7d1e-aacb-8909b9a65779'::uuid) AND (chat_id = c.id))
|
||||
Heap Fetches: 51
|
||||
Index Searches: 51
|
||||
Buffers: shared hit=153
|
||||
SubPlan 1
|
||||
-> Aggregate (cost=8.31..8.32 rows=1 width=32) (actual time=0.001..0.001 rows=1.00 loops=51)
|
||||
Buffers: shared hit=153
|
||||
-> Index Only Scan using chat_members_pkey on chat_members m (cost=0.29..8.30 rows=1 width=16) (actual time=0.000..0.000 rows=1.00 loops=51)
|
||||
Index Cond: (chat_id = c.id)
|
||||
Heap Fetches: 51
|
||||
Index Searches: 51
|
||||
Buffers: shared hit=153
|
||||
Planning:
|
||||
Buffers: shared hit=95
|
||||
Planning Time: 0.250 ms
|
||||
Execution Time: 0.098 ms
|
||||
|
||||
## user_by_username
|
||||
|
||||
Index Scan using users_username_key on users (cost=0.29..8.30 rows=1 width=42) (actual time=0.005..0.005 rows=1.00 loops=1)
|
||||
Index Cond: (username = 'bulk_5000'::text)
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=3
|
||||
Planning:
|
||||
Buffers: shared hit=43
|
||||
Planning Time: 0.085 ms
|
||||
Execution Time: 0.008 ms
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
$ make check
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
|
||||
$ go vet ./...
|
||||
|
||||
$ make lint
|
||||
/Users/vladislav/Projects/mtusi2026lab1-fork/bin/golangci-lint run -v
|
||||
level=info msg="golangci-lint has version 2.13.2 built with go1.27.0 from (unknown, modified: ?, mod sum: \"h1:bCyq3E4vo9qwzifjpzJqYndEt7Ncva80qkk8G2B4TXU=\") on (unknown)"
|
||||
level=info msg="[config_reader] Config search paths: [./ /Users/vladislav/Projects/mtusi2026lab1-fork /Users/vladislav/Projects /Users/vladislav /Users /]"
|
||||
level=info msg="[config_reader] Used config file .golangci.yml"
|
||||
level=info msg="[config_reader] Module name \"mtusi-messenger\""
|
||||
level=info msg="[goenv] Read go env for 5.97475ms: map[string]string{\"GOCACHE\":\"/Users/vladislav/Library/Caches/go-build\", \"GOROOT\":\"/opt/homebrew/Cellar/go/1.27.1/libexec\"}"
|
||||
level=info msg="[lintersdb] Active 50 linters: [asasalint bodyclose canonicalheader containedctx contextcheck copyloopvar depguard durationcheck errcheck errname errorlint exhaustive exptostd fatcontext forbidigo forcetypeassert gocheckcompilerdirectives gocritic gofumpt goimports gomoddirectives gosec govet ineffassign intrange makezero misspell musttag nilerr nilnil noctx nolintlint perfsprint prealloc reassign recvcheck revive rowserrcheck sloglint sqlclosecheck staticcheck testifylint thelper tparallel unconvert unparam unused usestdlibvars usetesting wastedassign]"
|
||||
level=info msg="[loader] Using build tags: [integration]"
|
||||
level=info msg="[loader] Go packages loading at mode 8767 (compiled_files|files|name|types_sizes|deps|exports_file|imports) took 122.006042ms"
|
||||
level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 4.792166ms"
|
||||
level=info msg="[linters_context/goanalysis] analyzers took 0s with no stages"
|
||||
level=info msg="[runner/exclusion_rules] Skipped 2 issues by rules: [Path: \"_test\\\\.go\", Linters: \"gosec, prealloc, forcetypeassert, unparam\"]"
|
||||
level=info msg="[runner] Issues before processing: 280, after processing: 0"
|
||||
level=info msg="[runner] Processors filtering stat (in/out): exclusion_paths: 280/280, invalid_issue: 280/280, path_absoluter: 280/280, filename_unadjuster: 280/280, generated_file_filter: 280/100, exclusion_rules: 100/0, cgo: 280/280, path_relativity: 280/280"
|
||||
level=info msg="[runner] processing took 607.916µs with stages: generated_file_filter: 420.959µs, exclusion_rules: 86.124µs, path_relativity: 83.917µs, sort_results: 4.458µs, invalid_issue: 4.292µs, cgo: 3.959µs, path_absoluter: 1.417µs, filename_unadjuster: 792ns, max_same_issues: 582ns, nolint_filter: 457ns, fixer: 292ns, exclusion_paths: 167ns, path_prettifier: 125ns, source_code: 125ns, path_shortener: 124ns, uniq_by_line: 42ns, severity-rules: 42ns, max_per_file_from_linter: 42ns, max_from_linter: 0s, diff: 0s"
|
||||
level=info msg="[runner] linters took 422.737625ms with stages: goanalysis_metalinter: 422.101875ms"
|
||||
0 issues.
|
||||
level=info msg="File cache stats: 0 entries of total size 0B"
|
||||
level=info msg="Memory: 7 samples, avg is 87.0MB, max is 111.2MB"
|
||||
level=info msg="Execution took 555.972916ms"
|
||||
|
||||
$ make unit-test
|
||||
go test -race -shuffle=on -count=1 -timeout=5m ./...
|
||||
? mtusi-messenger/cmd/messenger [no test files]
|
||||
ok mtusi-messenger/internal/config 1.838s
|
||||
ok mtusi-messenger/internal/domain 1.498s
|
||||
ok mtusi-messenger/internal/logger 2.150s
|
||||
ok mtusi-messenger/internal/service/chat 2.470s
|
||||
? mtusi-messenger/internal/service/chat/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/message 2.797s
|
||||
? mtusi-messenger/internal/service/message/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/user 3.474s
|
||||
? mtusi-messenger/internal/service/user/mocks [no test files]
|
||||
ok mtusi-messenger/internal/storage/memory 3.159s
|
||||
ok mtusi-messenger/internal/transport/rest 3.863s
|
||||
? mtusi-messenger/internal/transport/rest/oas [no test files]
|
||||
@@ -0,0 +1,10 @@
|
||||
$ docker stop mtusi2026lab1-messenger-lab1
|
||||
$ docker run -d --name mtusi2026lab1-messenger-lab1 -p 127.0.0.1:8080:8080 mtusi2026lab1-messenger:verify
|
||||
$ curl -i -H "X-User-Id: <created-before-restart>" http://127.0.0.1:8080/api/v1/users/me
|
||||
HTTP/1.1 401 Unauthorized
|
||||
Content-Type: application/json; charset=utf-8
|
||||
X-Request-Id: eadf9c21-d861-4c2c-8e76-46f086d27a11
|
||||
Date: Thu, 24 Sep 2026 20:13:02 GMT
|
||||
Content-Length: 110
|
||||
|
||||
{"error":{"code":"unauthorized","message":"Unauthorized","request_id":"eadf9c21-d861-4c2c-8e76-46f086d27a11"}}
|
||||
@@ -0,0 +1,7 @@
|
||||
$ docker kill --signal=TERM mtusi2026lab1-messenger-lab1
|
||||
$ docker wait mtusi2026lab1-messenger-lab1
|
||||
0
|
||||
elapsed_ms=114
|
||||
{"level":"info","time":"2026-09-24T20:14:19.192628563Z","msg":"server started","addr":"0.0.0.0:8080"}
|
||||
{"level":"info","time":"2026-09-24T20:14:20.186231067Z","msg":"shutdown signal received","timeout":"10s"}
|
||||
{"level":"info","time":"2026-09-24T20:14:20.188996621Z","msg":"server stopped"}
|
||||
@@ -0,0 +1,21 @@
|
||||
goos: darwin
|
||||
goarch: arm64
|
||||
pkg: mtusi-messenger/internal/storage/memory
|
||||
cpu: Apple M5 Pro
|
||||
BenchmarkMessageCreate/history=1000-18 3822346 309.5 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=1000-18 3904586 307.6 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=1000-18 3889698 308.1 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=1000-18 3892981 308.2 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=1000-18 3888345 308.3 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=10000-18 3578911 335.4 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=10000-18 3570348 335.9 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=10000-18 3581305 335.0 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=10000-18 3573933 336.0 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=10000-18 3563053 336.4 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=50000-18 3425475 349.8 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=50000-18 3435330 349.1 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=50000-18 3438290 349.3 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=50000-18 3420394 349.8 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=50000-18 3420736 350.1 ns/op 16 B/op 1 allocs/op
|
||||
PASS
|
||||
ok mtusi-messenger/internal/storage/memory 18.237s
|
||||
@@ -0,0 +1,128 @@
|
||||
[
|
||||
{
|
||||
"history": 100,
|
||||
"concurrency": 1,
|
||||
"duration_seconds": 2.002,
|
||||
"successful_requests": 526,
|
||||
"failed_requests": 0,
|
||||
"rps": 262.791,
|
||||
"p50_ms": 3.378,
|
||||
"p95_ms": 4.12,
|
||||
"p99_ms": 16.979,
|
||||
"rss_min_kib": 18880,
|
||||
"rss_max_kib": 22816,
|
||||
"rss_delta_kib": 3936
|
||||
},
|
||||
{
|
||||
"history": 100,
|
||||
"concurrency": 4,
|
||||
"duration_seconds": 2.002,
|
||||
"successful_requests": 1450,
|
||||
"failed_requests": 0,
|
||||
"rps": 724.134,
|
||||
"p50_ms": 4.18,
|
||||
"p95_ms": 16.695,
|
||||
"p99_ms": 21.604,
|
||||
"rss_min_kib": 20512,
|
||||
"rss_max_kib": 24208,
|
||||
"rss_delta_kib": 3696
|
||||
},
|
||||
{
|
||||
"history": 100,
|
||||
"concurrency": 16,
|
||||
"duration_seconds": 2.079,
|
||||
"successful_requests": 2315,
|
||||
"failed_requests": 0,
|
||||
"rps": 1113.309,
|
||||
"p50_ms": 8.563,
|
||||
"p95_ms": 29.584,
|
||||
"p99_ms": 93.023,
|
||||
"rss_min_kib": 18880,
|
||||
"rss_max_kib": 25296,
|
||||
"rss_delta_kib": 6416
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 1,
|
||||
"duration_seconds": 2.007,
|
||||
"successful_requests": 478,
|
||||
"failed_requests": 0,
|
||||
"rps": 238.14,
|
||||
"p50_ms": 3.477,
|
||||
"p95_ms": 10.892,
|
||||
"p99_ms": 20.404,
|
||||
"rss_min_kib": 23120,
|
||||
"rss_max_kib": 23584,
|
||||
"rss_delta_kib": 464
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 4,
|
||||
"duration_seconds": 2.003,
|
||||
"successful_requests": 1380,
|
||||
"failed_requests": 0,
|
||||
"rps": 688.971,
|
||||
"p50_ms": 4.197,
|
||||
"p95_ms": 17.189,
|
||||
"p99_ms": 28.458,
|
||||
"rss_min_kib": 23344,
|
||||
"rss_max_kib": 24592,
|
||||
"rss_delta_kib": 1248
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 16,
|
||||
"duration_seconds": 2.005,
|
||||
"successful_requests": 2298,
|
||||
"failed_requests": 0,
|
||||
"rps": 1146.063,
|
||||
"p50_ms": 8.474,
|
||||
"p95_ms": 29.384,
|
||||
"p99_ms": 92.528,
|
||||
"rss_min_kib": 23232,
|
||||
"rss_max_kib": 26272,
|
||||
"rss_delta_kib": 3040
|
||||
},
|
||||
{
|
||||
"history": 5000,
|
||||
"concurrency": 1,
|
||||
"duration_seconds": 2.001,
|
||||
"successful_requests": 494,
|
||||
"failed_requests": 0,
|
||||
"rps": 246.902,
|
||||
"p50_ms": 3.414,
|
||||
"p95_ms": 10.767,
|
||||
"p99_ms": 18.996,
|
||||
"rss_min_kib": 25248,
|
||||
"rss_max_kib": 25296,
|
||||
"rss_delta_kib": 48
|
||||
},
|
||||
{
|
||||
"history": 5000,
|
||||
"concurrency": 4,
|
||||
"duration_seconds": 2.004,
|
||||
"successful_requests": 1398,
|
||||
"failed_requests": 0,
|
||||
"rps": 697.712,
|
||||
"p50_ms": 4.147,
|
||||
"p95_ms": 17.142,
|
||||
"p99_ms": 26.446,
|
||||
"rss_min_kib": 24816,
|
||||
"rss_max_kib": 25104,
|
||||
"rss_delta_kib": 288
|
||||
},
|
||||
{
|
||||
"history": 5000,
|
||||
"concurrency": 16,
|
||||
"duration_seconds": 2.006,
|
||||
"successful_requests": 2261,
|
||||
"failed_requests": 0,
|
||||
"rps": 1126.862,
|
||||
"p50_ms": 8.635,
|
||||
"p95_ms": 24.133,
|
||||
"p99_ms": 93.225,
|
||||
"rss_min_kib": 25200,
|
||||
"rss_max_kib": 26752,
|
||||
"rss_delta_kib": 1552
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,110 @@
|
||||
[
|
||||
{
|
||||
"history": 100,
|
||||
"concurrency": 1,
|
||||
"rps_before": 262.791,
|
||||
"p95_ms_before": 4.12,
|
||||
"p99_ms_before": 16.979,
|
||||
"rss_max_kib_before": 22816,
|
||||
"rps_after": 265.189,
|
||||
"p95_ms_after": 4.276,
|
||||
"p99_ms_after": 17.123,
|
||||
"rss_max_kib_after": 22736
|
||||
},
|
||||
{
|
||||
"history": 100,
|
||||
"concurrency": 4,
|
||||
"rps_before": 724.134,
|
||||
"p95_ms_before": 16.695,
|
||||
"p99_ms_before": 21.604,
|
||||
"rss_max_kib_before": 24208,
|
||||
"rps_after": 720.55,
|
||||
"p95_ms_after": 16.868,
|
||||
"p99_ms_after": 21.043,
|
||||
"rss_max_kib_after": 24128
|
||||
},
|
||||
{
|
||||
"history": 100,
|
||||
"concurrency": 16,
|
||||
"rps_before": 1113.309,
|
||||
"p95_ms_before": 29.584,
|
||||
"p99_ms_before": 93.023,
|
||||
"rss_max_kib_before": 25296,
|
||||
"rps_after": 1125.923,
|
||||
"p95_ms_after": 29.142,
|
||||
"p99_ms_after": 91.221,
|
||||
"rss_max_kib_after": 25216
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 1,
|
||||
"rps_before": 238.14,
|
||||
"p95_ms_before": 10.892,
|
||||
"p99_ms_before": 20.404,
|
||||
"rss_max_kib_before": 23584,
|
||||
"rps_after": 237.68,
|
||||
"p95_ms_after": 11.279,
|
||||
"p99_ms_after": 19.675,
|
||||
"rss_max_kib_after": 23504
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 4,
|
||||
"rps_before": 688.971,
|
||||
"p95_ms_before": 17.189,
|
||||
"p99_ms_before": 28.458,
|
||||
"rss_max_kib_before": 24592,
|
||||
"rps_after": 667.05,
|
||||
"p95_ms_after": 17.243,
|
||||
"p99_ms_after": 29.938,
|
||||
"rss_max_kib_after": 25280
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 16,
|
||||
"rps_before": 1146.063,
|
||||
"p95_ms_before": 29.384,
|
||||
"p99_ms_before": 92.528,
|
||||
"rss_max_kib_before": 26272,
|
||||
"rps_after": 1102.581,
|
||||
"p95_ms_after": 30.252,
|
||||
"p99_ms_after": 93.912,
|
||||
"rss_max_kib_after": 25200
|
||||
},
|
||||
{
|
||||
"history": 5000,
|
||||
"concurrency": 1,
|
||||
"rps_before": 246.902,
|
||||
"p95_ms_before": 10.767,
|
||||
"p99_ms_before": 18.996,
|
||||
"rss_max_kib_before": 25296,
|
||||
"rps_after": 241.241,
|
||||
"p95_ms_after": 10.897,
|
||||
"p99_ms_after": 18.681,
|
||||
"rss_max_kib_after": 25456
|
||||
},
|
||||
{
|
||||
"history": 5000,
|
||||
"concurrency": 4,
|
||||
"rps_before": 697.712,
|
||||
"p95_ms_before": 17.142,
|
||||
"p99_ms_before": 26.446,
|
||||
"rss_max_kib_before": 25104,
|
||||
"rps_after": 685.839,
|
||||
"p95_ms_after": 17.418,
|
||||
"p99_ms_after": 26.618,
|
||||
"rss_max_kib_after": 25376
|
||||
},
|
||||
{
|
||||
"history": 5000,
|
||||
"concurrency": 16,
|
||||
"rps_before": 1126.862,
|
||||
"p95_ms_before": 24.133,
|
||||
"p99_ms_before": 93.225,
|
||||
"rss_max_kib_before": 26752,
|
||||
"rps_after": 1079.866,
|
||||
"p95_ms_after": 31.525,
|
||||
"p99_ms_after": 94.709,
|
||||
"rss_max_kib_after": 26640
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,211 @@
|
||||
{
|
||||
"mode": "baseline",
|
||||
"command": [
|
||||
"go",
|
||||
"run",
|
||||
"-overlay",
|
||||
"/var/folders/jd/nsgkfx9s75xb84909646j0zm0000gn/T/messenger-track1-58qai1az/overlay.json",
|
||||
"./cmd/messenger"
|
||||
],
|
||||
"go_version": "go version go1.27.1 darwin/arm64",
|
||||
"os_arch": [
|
||||
"darwin",
|
||||
"arm64"
|
||||
],
|
||||
"requests_per_case": 100000,
|
||||
"rss_source": "ps RSS of go run child executable, KiB; sampled every 100 ms",
|
||||
"rows": [
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 1,
|
||||
"duration_seconds": 13.634,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7334.409,
|
||||
"p50_ms": 0.13,
|
||||
"p95_ms": 0.146,
|
||||
"p99_ms": 0.186,
|
||||
"rss_min_kib": 23616,
|
||||
"rss_max_kib": 59968,
|
||||
"rss_delta_kib": 36352
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 4,
|
||||
"duration_seconds": 11.333,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 8823.924,
|
||||
"p50_ms": 0.42,
|
||||
"p95_ms": 0.654,
|
||||
"p99_ms": 0.869,
|
||||
"rss_min_kib": 23424,
|
||||
"rss_max_kib": 58464,
|
||||
"rss_delta_kib": 35040
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 16,
|
||||
"duration_seconds": 13.63,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7336.995,
|
||||
"p50_ms": 2.021,
|
||||
"p95_ms": 3.514,
|
||||
"p99_ms": 4.631,
|
||||
"rss_min_kib": 23520,
|
||||
"rss_max_kib": 66544,
|
||||
"rss_delta_kib": 43024
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 32,
|
||||
"duration_seconds": 13.538,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7386.656,
|
||||
"p50_ms": 4.022,
|
||||
"p95_ms": 7.026,
|
||||
"p99_ms": 8.953,
|
||||
"rss_min_kib": 23856,
|
||||
"rss_max_kib": 65616,
|
||||
"rss_delta_kib": 41760
|
||||
},
|
||||
{
|
||||
"history": 10000,
|
||||
"concurrency": 1,
|
||||
"duration_seconds": 14.008,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7138.887,
|
||||
"p50_ms": 0.13,
|
||||
"p95_ms": 0.149,
|
||||
"p99_ms": 0.21,
|
||||
"rss_min_kib": 25984,
|
||||
"rss_max_kib": 70416,
|
||||
"rss_delta_kib": 44432
|
||||
},
|
||||
{
|
||||
"history": 10000,
|
||||
"concurrency": 4,
|
||||
"duration_seconds": 11.057,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 9043.732,
|
||||
"p50_ms": 0.406,
|
||||
"p95_ms": 0.626,
|
||||
"p99_ms": 0.841,
|
||||
"rss_min_kib": 26272,
|
||||
"rss_max_kib": 67376,
|
||||
"rss_delta_kib": 41104
|
||||
},
|
||||
{
|
||||
"history": 10000,
|
||||
"concurrency": 16,
|
||||
"duration_seconds": 13.436,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7442.895,
|
||||
"p50_ms": 1.977,
|
||||
"p95_ms": 3.485,
|
||||
"p99_ms": 4.703,
|
||||
"rss_min_kib": 26576,
|
||||
"rss_max_kib": 75616,
|
||||
"rss_delta_kib": 49040
|
||||
},
|
||||
{
|
||||
"history": 10000,
|
||||
"concurrency": 32,
|
||||
"duration_seconds": 13.546,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7382.485,
|
||||
"p50_ms": 4.01,
|
||||
"p95_ms": 7.051,
|
||||
"p99_ms": 9.096,
|
||||
"rss_min_kib": 25456,
|
||||
"rss_max_kib": 77792,
|
||||
"rss_delta_kib": 52336
|
||||
},
|
||||
{
|
||||
"history": 50000,
|
||||
"concurrency": 1,
|
||||
"duration_seconds": 13.969,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7158.653,
|
||||
"p50_ms": 0.13,
|
||||
"p95_ms": 0.149,
|
||||
"p99_ms": 0.211,
|
||||
"rss_min_kib": 40080,
|
||||
"rss_max_kib": 81072,
|
||||
"rss_delta_kib": 40992
|
||||
},
|
||||
{
|
||||
"history": 50000,
|
||||
"concurrency": 4,
|
||||
"duration_seconds": 11.014,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 9079.212,
|
||||
"p50_ms": 0.404,
|
||||
"p95_ms": 0.623,
|
||||
"p99_ms": 0.823,
|
||||
"rss_min_kib": 40448,
|
||||
"rss_max_kib": 77088,
|
||||
"rss_delta_kib": 36640
|
||||
},
|
||||
{
|
||||
"history": 50000,
|
||||
"concurrency": 16,
|
||||
"duration_seconds": 13.479,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7419.068,
|
||||
"p50_ms": 1.99,
|
||||
"p95_ms": 3.471,
|
||||
"p99_ms": 4.694,
|
||||
"rss_min_kib": 42336,
|
||||
"rss_max_kib": 79552,
|
||||
"rss_delta_kib": 37216
|
||||
},
|
||||
{
|
||||
"history": 50000,
|
||||
"concurrency": 32,
|
||||
"duration_seconds": 13.464,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7427.333,
|
||||
"p50_ms": 3.99,
|
||||
"p95_ms": 7.049,
|
||||
"p99_ms": 9.007,
|
||||
"rss_min_kib": 40336,
|
||||
"rss_max_kib": 89552,
|
||||
"rss_delta_kib": 49216
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,266 @@
|
||||
[
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 1,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"duration_seconds_before": 13.634,
|
||||
"duration_seconds_after": 13.919,
|
||||
"successful_requests_before": 100000,
|
||||
"successful_requests_after": 100000,
|
||||
"failed_requests_before": 0,
|
||||
"failed_requests_after": 0,
|
||||
"rps_before": 7334.409,
|
||||
"rps_after": 7184.594,
|
||||
"p50_ms_before": 0.13,
|
||||
"p50_ms_after": 0.129,
|
||||
"p95_ms_before": 0.146,
|
||||
"p95_ms_after": 0.15,
|
||||
"p99_ms_before": 0.186,
|
||||
"p99_ms_after": 0.231,
|
||||
"rss_max_kib_before": 59968,
|
||||
"rss_max_kib_after": 62048
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 4,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"duration_seconds_before": 11.333,
|
||||
"duration_seconds_after": 11.115,
|
||||
"successful_requests_before": 100000,
|
||||
"successful_requests_after": 100000,
|
||||
"failed_requests_before": 0,
|
||||
"failed_requests_after": 0,
|
||||
"rps_before": 8823.924,
|
||||
"rps_after": 8996.523,
|
||||
"p50_ms_before": 0.42,
|
||||
"p50_ms_after": 0.407,
|
||||
"p95_ms_before": 0.654,
|
||||
"p95_ms_after": 0.632,
|
||||
"p99_ms_before": 0.869,
|
||||
"p99_ms_after": 0.867,
|
||||
"rss_max_kib_before": 58464,
|
||||
"rss_max_kib_after": 61040
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 16,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"duration_seconds_before": 13.63,
|
||||
"duration_seconds_after": 13.364,
|
||||
"successful_requests_before": 100000,
|
||||
"successful_requests_after": 100000,
|
||||
"failed_requests_before": 0,
|
||||
"failed_requests_after": 0,
|
||||
"rps_before": 7336.995,
|
||||
"rps_after": 7482.719,
|
||||
"p50_ms_before": 2.021,
|
||||
"p50_ms_after": 1.977,
|
||||
"p95_ms_before": 3.514,
|
||||
"p95_ms_after": 3.445,
|
||||
"p99_ms_before": 4.631,
|
||||
"p99_ms_after": 4.577,
|
||||
"rss_max_kib_before": 66544,
|
||||
"rss_max_kib_after": 61328
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 32,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"duration_seconds_before": 13.538,
|
||||
"duration_seconds_after": 13.547,
|
||||
"successful_requests_before": 100000,
|
||||
"successful_requests_after": 100000,
|
||||
"failed_requests_before": 0,
|
||||
"failed_requests_after": 0,
|
||||
"rps_before": 7386.656,
|
||||
"rps_after": 7381.5,
|
||||
"p50_ms_before": 4.022,
|
||||
"p50_ms_after": 4.016,
|
||||
"p95_ms_before": 7.026,
|
||||
"p95_ms_after": 7.058,
|
||||
"p99_ms_before": 8.953,
|
||||
"p99_ms_after": 9.054,
|
||||
"rss_max_kib_before": 65616,
|
||||
"rss_max_kib_after": 68768
|
||||
},
|
||||
{
|
||||
"history": 10000,
|
||||
"concurrency": 1,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"duration_seconds_before": 14.008,
|
||||
"duration_seconds_after": 13.984,
|
||||
"successful_requests_before": 100000,
|
||||
"successful_requests_after": 100000,
|
||||
"failed_requests_before": 0,
|
||||
"failed_requests_after": 0,
|
||||
"rps_before": 7138.887,
|
||||
"rps_after": 7150.931,
|
||||
"p50_ms_before": 0.13,
|
||||
"p50_ms_after": 0.131,
|
||||
"p95_ms_before": 0.149,
|
||||
"p95_ms_after": 0.146,
|
||||
"p99_ms_before": 0.21,
|
||||
"p99_ms_after": 0.187,
|
||||
"rss_max_kib_before": 70416,
|
||||
"rss_max_kib_after": 68128
|
||||
},
|
||||
{
|
||||
"history": 10000,
|
||||
"concurrency": 4,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"duration_seconds_before": 11.057,
|
||||
"duration_seconds_after": 11.046,
|
||||
"successful_requests_before": 100000,
|
||||
"successful_requests_after": 100000,
|
||||
"failed_requests_before": 0,
|
||||
"failed_requests_after": 0,
|
||||
"rps_before": 9043.732,
|
||||
"rps_after": 9052.965,
|
||||
"p50_ms_before": 0.406,
|
||||
"p50_ms_after": 0.404,
|
||||
"p95_ms_before": 0.626,
|
||||
"p95_ms_after": 0.628,
|
||||
"p99_ms_before": 0.841,
|
||||
"p99_ms_after": 0.859,
|
||||
"rss_max_kib_before": 67376,
|
||||
"rss_max_kib_after": 71632
|
||||
},
|
||||
{
|
||||
"history": 10000,
|
||||
"concurrency": 16,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"duration_seconds_before": 13.436,
|
||||
"duration_seconds_after": 13.439,
|
||||
"successful_requests_before": 100000,
|
||||
"successful_requests_after": 100000,
|
||||
"failed_requests_before": 0,
|
||||
"failed_requests_after": 0,
|
||||
"rps_before": 7442.895,
|
||||
"rps_after": 7440.817,
|
||||
"p50_ms_before": 1.977,
|
||||
"p50_ms_after": 1.989,
|
||||
"p95_ms_before": 3.485,
|
||||
"p95_ms_after": 3.468,
|
||||
"p99_ms_before": 4.703,
|
||||
"p99_ms_after": 4.701,
|
||||
"rss_max_kib_before": 75616,
|
||||
"rss_max_kib_after": 73712
|
||||
},
|
||||
{
|
||||
"history": 10000,
|
||||
"concurrency": 32,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"duration_seconds_before": 13.546,
|
||||
"duration_seconds_after": 13.478,
|
||||
"successful_requests_before": 100000,
|
||||
"successful_requests_after": 100000,
|
||||
"failed_requests_before": 0,
|
||||
"failed_requests_after": 0,
|
||||
"rps_before": 7382.485,
|
||||
"rps_after": 7419.326,
|
||||
"p50_ms_before": 4.01,
|
||||
"p50_ms_after": 3.984,
|
||||
"p95_ms_before": 7.051,
|
||||
"p95_ms_after": 7.049,
|
||||
"p99_ms_before": 9.096,
|
||||
"p99_ms_after": 9.096,
|
||||
"rss_max_kib_before": 77792,
|
||||
"rss_max_kib_after": 70976
|
||||
},
|
||||
{
|
||||
"history": 50000,
|
||||
"concurrency": 1,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"duration_seconds_before": 13.969,
|
||||
"duration_seconds_after": 13.863,
|
||||
"successful_requests_before": 100000,
|
||||
"successful_requests_after": 100000,
|
||||
"failed_requests_before": 0,
|
||||
"failed_requests_after": 0,
|
||||
"rps_before": 7158.653,
|
||||
"rps_after": 7213.61,
|
||||
"p50_ms_before": 0.13,
|
||||
"p50_ms_after": 0.129,
|
||||
"p95_ms_before": 0.149,
|
||||
"p95_ms_after": 0.145,
|
||||
"p99_ms_before": 0.211,
|
||||
"p99_ms_after": 0.191,
|
||||
"rss_max_kib_before": 81072,
|
||||
"rss_max_kib_after": 81824
|
||||
},
|
||||
{
|
||||
"history": 50000,
|
||||
"concurrency": 4,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"duration_seconds_before": 11.014,
|
||||
"duration_seconds_after": 11.066,
|
||||
"successful_requests_before": 100000,
|
||||
"successful_requests_after": 100000,
|
||||
"failed_requests_before": 0,
|
||||
"failed_requests_after": 0,
|
||||
"rps_before": 9079.212,
|
||||
"rps_after": 9036.335,
|
||||
"p50_ms_before": 0.404,
|
||||
"p50_ms_after": 0.405,
|
||||
"p95_ms_before": 0.623,
|
||||
"p95_ms_after": 0.63,
|
||||
"p99_ms_before": 0.823,
|
||||
"p99_ms_after": 0.842,
|
||||
"rss_max_kib_before": 77088,
|
||||
"rss_max_kib_after": 86832
|
||||
},
|
||||
{
|
||||
"history": 50000,
|
||||
"concurrency": 16,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"duration_seconds_before": 13.479,
|
||||
"duration_seconds_after": 13.416,
|
||||
"successful_requests_before": 100000,
|
||||
"successful_requests_after": 100000,
|
||||
"failed_requests_before": 0,
|
||||
"failed_requests_after": 0,
|
||||
"rps_before": 7419.068,
|
||||
"rps_after": 7453.53,
|
||||
"p50_ms_before": 1.99,
|
||||
"p50_ms_after": 1.978,
|
||||
"p95_ms_before": 3.471,
|
||||
"p95_ms_after": 3.455,
|
||||
"p99_ms_before": 4.694,
|
||||
"p99_ms_after": 4.688,
|
||||
"rss_max_kib_before": 79552,
|
||||
"rss_max_kib_after": 89824
|
||||
},
|
||||
{
|
||||
"history": 50000,
|
||||
"concurrency": 32,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"duration_seconds_before": 13.464,
|
||||
"duration_seconds_after": 13.542,
|
||||
"successful_requests_before": 100000,
|
||||
"successful_requests_after": 100000,
|
||||
"failed_requests_before": 0,
|
||||
"failed_requests_after": 0,
|
||||
"rps_before": 7427.333,
|
||||
"rps_after": 7384.536,
|
||||
"p50_ms_before": 3.99,
|
||||
"p50_ms_after": 4.005,
|
||||
"p95_ms_before": 7.049,
|
||||
"p95_ms_after": 7.084,
|
||||
"p99_ms_before": 9.007,
|
||||
"p99_ms_after": 9.203,
|
||||
"rss_max_kib_before": 89552,
|
||||
"rss_max_kib_after": 80128
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,209 @@
|
||||
{
|
||||
"mode": "optimized",
|
||||
"command": [
|
||||
"go",
|
||||
"run",
|
||||
"./cmd/messenger"
|
||||
],
|
||||
"go_version": "go version go1.27.1 darwin/arm64",
|
||||
"os_arch": [
|
||||
"darwin",
|
||||
"arm64"
|
||||
],
|
||||
"requests_per_case": 100000,
|
||||
"rss_source": "ps RSS of go run child executable, KiB; sampled every 100 ms",
|
||||
"rows": [
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 1,
|
||||
"duration_seconds": 13.919,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7184.594,
|
||||
"p50_ms": 0.129,
|
||||
"p95_ms": 0.15,
|
||||
"p99_ms": 0.231,
|
||||
"rss_min_kib": 23504,
|
||||
"rss_max_kib": 62048,
|
||||
"rss_delta_kib": 38544
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 4,
|
||||
"duration_seconds": 11.115,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 8996.523,
|
||||
"p50_ms": 0.407,
|
||||
"p95_ms": 0.632,
|
||||
"p99_ms": 0.867,
|
||||
"rss_min_kib": 23744,
|
||||
"rss_max_kib": 61040,
|
||||
"rss_delta_kib": 37296
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 16,
|
||||
"duration_seconds": 13.364,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7482.719,
|
||||
"p50_ms": 1.977,
|
||||
"p95_ms": 3.445,
|
||||
"p99_ms": 4.577,
|
||||
"rss_min_kib": 22480,
|
||||
"rss_max_kib": 61328,
|
||||
"rss_delta_kib": 38848
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 32,
|
||||
"duration_seconds": 13.547,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7381.5,
|
||||
"p50_ms": 4.016,
|
||||
"p95_ms": 7.058,
|
||||
"p99_ms": 9.054,
|
||||
"rss_min_kib": 23152,
|
||||
"rss_max_kib": 68768,
|
||||
"rss_delta_kib": 45616
|
||||
},
|
||||
{
|
||||
"history": 10000,
|
||||
"concurrency": 1,
|
||||
"duration_seconds": 13.984,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7150.931,
|
||||
"p50_ms": 0.131,
|
||||
"p95_ms": 0.146,
|
||||
"p99_ms": 0.187,
|
||||
"rss_min_kib": 25936,
|
||||
"rss_max_kib": 68128,
|
||||
"rss_delta_kib": 42192
|
||||
},
|
||||
{
|
||||
"history": 10000,
|
||||
"concurrency": 4,
|
||||
"duration_seconds": 11.046,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 9052.965,
|
||||
"p50_ms": 0.404,
|
||||
"p95_ms": 0.628,
|
||||
"p99_ms": 0.859,
|
||||
"rss_min_kib": 26448,
|
||||
"rss_max_kib": 71632,
|
||||
"rss_delta_kib": 45184
|
||||
},
|
||||
{
|
||||
"history": 10000,
|
||||
"concurrency": 16,
|
||||
"duration_seconds": 13.439,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7440.817,
|
||||
"p50_ms": 1.989,
|
||||
"p95_ms": 3.468,
|
||||
"p99_ms": 4.701,
|
||||
"rss_min_kib": 26480,
|
||||
"rss_max_kib": 73712,
|
||||
"rss_delta_kib": 47232
|
||||
},
|
||||
{
|
||||
"history": 10000,
|
||||
"concurrency": 32,
|
||||
"duration_seconds": 13.478,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7419.326,
|
||||
"p50_ms": 3.984,
|
||||
"p95_ms": 7.049,
|
||||
"p99_ms": 9.096,
|
||||
"rss_min_kib": 26176,
|
||||
"rss_max_kib": 70976,
|
||||
"rss_delta_kib": 44800
|
||||
},
|
||||
{
|
||||
"history": 50000,
|
||||
"concurrency": 1,
|
||||
"duration_seconds": 13.863,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7213.61,
|
||||
"p50_ms": 0.129,
|
||||
"p95_ms": 0.145,
|
||||
"p99_ms": 0.191,
|
||||
"rss_min_kib": 40592,
|
||||
"rss_max_kib": 81824,
|
||||
"rss_delta_kib": 41232
|
||||
},
|
||||
{
|
||||
"history": 50000,
|
||||
"concurrency": 4,
|
||||
"duration_seconds": 11.066,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 9036.335,
|
||||
"p50_ms": 0.405,
|
||||
"p95_ms": 0.63,
|
||||
"p99_ms": 0.842,
|
||||
"rss_min_kib": 42944,
|
||||
"rss_max_kib": 86832,
|
||||
"rss_delta_kib": 43888
|
||||
},
|
||||
{
|
||||
"history": 50000,
|
||||
"concurrency": 16,
|
||||
"duration_seconds": 13.416,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7453.53,
|
||||
"p50_ms": 1.978,
|
||||
"p95_ms": 3.455,
|
||||
"p99_ms": 4.688,
|
||||
"rss_min_kib": 40768,
|
||||
"rss_max_kib": 89824,
|
||||
"rss_delta_kib": 49056
|
||||
},
|
||||
{
|
||||
"history": 50000,
|
||||
"concurrency": 32,
|
||||
"duration_seconds": 13.542,
|
||||
"requested_requests": 100000,
|
||||
"warmup_requests": 100,
|
||||
"successful_requests": 100000,
|
||||
"failed_requests": 0,
|
||||
"rps": 7384.536,
|
||||
"p50_ms": 4.005,
|
||||
"p95_ms": 7.084,
|
||||
"p99_ms": 9.203,
|
||||
"rss_min_kib": 42848,
|
||||
"rss_max_kib": 80128,
|
||||
"rss_delta_kib": 37280
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
goos: darwin
|
||||
goarch: arm64
|
||||
pkg: mtusi-messenger/internal/storage/memory
|
||||
cpu: Apple M5 Pro
|
||||
BenchmarkMessageCreate/history=1000-18 4830075 243.3 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=1000-18 4958697 241.4 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=1000-18 4984602 241.8 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=1000-18 4976372 241.8 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=1000-18 4962843 241.7 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=10000-18 4967149 241.8 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=10000-18 4946976 242.1 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=10000-18 4950400 242.3 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=10000-18 4938321 242.4 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=10000-18 4955269 242.2 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=50000-18 4943572 242.0 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=50000-18 4969927 242.4 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=50000-18 4931466 242.5 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=50000-18 4948990 242.8 ns/op 16 B/op 1 allocs/op
|
||||
BenchmarkMessageCreate/history=50000-18 4953249 242.6 ns/op 16 B/op 1 allocs/op
|
||||
PASS
|
||||
ok mtusi-messenger/internal/storage/memory 18.240s
|
||||
@@ -0,0 +1,128 @@
|
||||
[
|
||||
{
|
||||
"history": 100,
|
||||
"concurrency": 1,
|
||||
"duration_seconds": 2.002,
|
||||
"successful_requests": 531,
|
||||
"failed_requests": 0,
|
||||
"rps": 265.189,
|
||||
"p50_ms": 3.355,
|
||||
"p95_ms": 4.276,
|
||||
"p99_ms": 17.123,
|
||||
"rss_min_kib": 18800,
|
||||
"rss_max_kib": 22736,
|
||||
"rss_delta_kib": 3936
|
||||
},
|
||||
{
|
||||
"history": 100,
|
||||
"concurrency": 4,
|
||||
"duration_seconds": 2.005,
|
||||
"successful_requests": 1445,
|
||||
"failed_requests": 0,
|
||||
"rps": 720.55,
|
||||
"p50_ms": 4.197,
|
||||
"p95_ms": 16.868,
|
||||
"p99_ms": 21.043,
|
||||
"rss_min_kib": 20768,
|
||||
"rss_max_kib": 24128,
|
||||
"rss_delta_kib": 3360
|
||||
},
|
||||
{
|
||||
"history": 100,
|
||||
"concurrency": 16,
|
||||
"duration_seconds": 2.012,
|
||||
"successful_requests": 2265,
|
||||
"failed_requests": 0,
|
||||
"rps": 1125.923,
|
||||
"p50_ms": 8.851,
|
||||
"p95_ms": 29.142,
|
||||
"p99_ms": 91.221,
|
||||
"rss_min_kib": 20672,
|
||||
"rss_max_kib": 25216,
|
||||
"rss_delta_kib": 4544
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 1,
|
||||
"duration_seconds": 2.011,
|
||||
"successful_requests": 478,
|
||||
"failed_requests": 0,
|
||||
"rps": 237.68,
|
||||
"p50_ms": 3.467,
|
||||
"p95_ms": 11.279,
|
||||
"p99_ms": 19.675,
|
||||
"rss_min_kib": 23264,
|
||||
"rss_max_kib": 23504,
|
||||
"rss_delta_kib": 240
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 4,
|
||||
"duration_seconds": 2.004,
|
||||
"successful_requests": 1337,
|
||||
"failed_requests": 0,
|
||||
"rps": 667.05,
|
||||
"p50_ms": 4.249,
|
||||
"p95_ms": 17.243,
|
||||
"p99_ms": 29.938,
|
||||
"rss_min_kib": 23264,
|
||||
"rss_max_kib": 25280,
|
||||
"rss_delta_kib": 2016
|
||||
},
|
||||
{
|
||||
"history": 1000,
|
||||
"concurrency": 16,
|
||||
"duration_seconds": 2.005,
|
||||
"successful_requests": 2211,
|
||||
"failed_requests": 0,
|
||||
"rps": 1102.581,
|
||||
"p50_ms": 8.818,
|
||||
"p95_ms": 30.252,
|
||||
"p99_ms": 93.912,
|
||||
"rss_min_kib": 23424,
|
||||
"rss_max_kib": 25200,
|
||||
"rss_delta_kib": 1776
|
||||
},
|
||||
{
|
||||
"history": 5000,
|
||||
"concurrency": 1,
|
||||
"duration_seconds": 2.002,
|
||||
"successful_requests": 483,
|
||||
"failed_requests": 0,
|
||||
"rps": 241.241,
|
||||
"p50_ms": 3.466,
|
||||
"p95_ms": 10.897,
|
||||
"p99_ms": 18.681,
|
||||
"rss_min_kib": 25456,
|
||||
"rss_max_kib": 25456,
|
||||
"rss_delta_kib": 0
|
||||
},
|
||||
{
|
||||
"history": 5000,
|
||||
"concurrency": 4,
|
||||
"duration_seconds": 2.003,
|
||||
"successful_requests": 1374,
|
||||
"failed_requests": 0,
|
||||
"rps": 685.839,
|
||||
"p50_ms": 4.207,
|
||||
"p95_ms": 17.418,
|
||||
"p99_ms": 26.618,
|
||||
"rss_min_kib": 24304,
|
||||
"rss_max_kib": 25376,
|
||||
"rss_delta_kib": 1072
|
||||
},
|
||||
{
|
||||
"history": 5000,
|
||||
"concurrency": 16,
|
||||
"duration_seconds": 2.002,
|
||||
"successful_requests": 2162,
|
||||
"failed_requests": 0,
|
||||
"rps": 1079.866,
|
||||
"p50_ms": 8.939,
|
||||
"p95_ms": 31.525,
|
||||
"p99_ms": 94.709,
|
||||
"rss_min_kib": 24848,
|
||||
"rss_max_kib": 26640,
|
||||
"rss_delta_kib": 1792
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,30 @@
|
||||
# Lab4 evidence
|
||||
|
||||
All files were produced on the local Compose stand (`docker compose up -d --build`)
|
||||
with SeaweedFS 3.80, two API replicas and HAProxy.
|
||||
|
||||
| File | Scenario | Command |
|
||||
|---|---|---|
|
||||
| `smoke.txt` | Public cumulative smoke (LAB=4) | `make test` |
|
||||
| `negative.txt` | Size/format/filename/authz/limits | `make test-attachments` |
|
||||
| `presign.txt` | Presigned upload happy path and negatives | `make test-presign` |
|
||||
| `expiry.txt` | Expired presigned URL (TTL=3s) | `PRESIGN_EXPIRY_WAIT=4 make test-presign` |
|
||||
| `failover.txt` | Upload, stop the serving replica, download via another | `python3 student-tests/attachment_failover.py` |
|
||||
| `persistence.txt` | Restart the stand with volumes | `make test-persistence ACTION_SCRIPT=scripts/restart.sh` |
|
||||
| `s3-init.txt` | Idempotent bucket bootstrap, app/forbidden prefix probes | `docker compose run --rm s3-init` (twice) |
|
||||
| `private-bucket.txt` | Anonymous S3 GET and published ports | `docker compose exec seaweedfs wget ...` |
|
||||
| `s3-outage.txt` | S3 down: attachments 503, other endpoints 200 | `docker compose stop seaweedfs` |
|
||||
| `sweep.txt` | Abandoned presign cleanup after grace; ready survives | `S3_SWEEP_GRACE=2s S3_SWEEP_INTERVAL=1s S3_PRESIGN_TTL=1s` |
|
||||
| `memory/` | 10 concurrent 9.4 MiB uploads, cgroup memory samples | `python3 scripts/lab4_memory_experiment.py` |
|
||||
| `track1/` | Proxy vs presigned upload: traffic, latency, memory | `python3 scripts/lab4_track1.py` |
|
||||
|
||||
Notes:
|
||||
|
||||
- Credentials are synthetic local values from `infra/s3/s3.json`; `.env` is
|
||||
ignored by git.
|
||||
- `memory.current` includes page cache from temporary spool files; `anon` is
|
||||
the primary RAM metric.
|
||||
- Presigned completion re-reads the object once to verify SHA-256, so API RX
|
||||
stays close to the file size. The client-facing LB leg is the actual saving.
|
||||
- Presigned URLs sign `Content-Length`: an oversized PUT is rejected by S3 with 403
|
||||
before anything is stored.
|
||||
@@ -0,0 +1,3 @@
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 student-tests/presign_flow.py --base-url "http://localhost:8080"
|
||||
EXPIRED: presigned URL rejected after 4.0 seconds
|
||||
PASS: lab4 presigned upload flow
|
||||
@@ -0,0 +1 @@
|
||||
PASS: lab4 attachment failover; served by 7fd3e5df907d
|
||||
@@ -0,0 +1,7 @@
|
||||
elapsed,phase,anon,current
|
||||
0.378,during,281362432,400949248
|
||||
0.804,during,281423872,381423616
|
||||
1.395,during,281542656,403361792
|
||||
1.827,during,281542656,371871744
|
||||
2.376,during,281632768,411824128
|
||||
2.81,during,281653248,381726720
|
||||
|
@@ -0,0 +1,11 @@
|
||||
Lab4 memory experiment
|
||||
concurrency: 10
|
||||
file_size_bytes: 9454448
|
||||
uploads: 30
|
||||
rounds: 3
|
||||
elapsed_seconds: 2.980
|
||||
baseline_anon_bytes: 280317952
|
||||
peak_anon_bytes: 281653248
|
||||
anon_delta_bytes: 1335296
|
||||
peak_memory_current_bytes: 411824128
|
||||
note: memory.current includes page cache from temporary spool files; anon is the primary metric
|
||||
@@ -0,0 +1,14 @@
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 student-tests/attachments_negative.py --base-url "http://localhost:8080"
|
||||
10 MiB + 1 body: 413
|
||||
empty body: 415
|
||||
corrupt PNG (IDAT CRC): 415
|
||||
MIME spoof (PNG declared as JPEG): 415
|
||||
dangerous filenames: 400
|
||||
foreign attachment metadata/content: 404
|
||||
empty text without attachments: 400
|
||||
attachment from another chat: 404
|
||||
11 attachment ids: 400
|
||||
duplicate attachment ids: 400
|
||||
attachment-only message: 201
|
||||
anonymous direct S3 GET: 403
|
||||
PASS: lab4 attachment negative scenarios
|
||||
@@ -0,0 +1,3 @@
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,10 @@
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 student-tests/presign_flow.py --base-url "http://localhost:8080"
|
||||
happy path: direct PUT 200, complete ready, checksum/size match
|
||||
message with attachment downloaded as the second chat member
|
||||
repeated complete is idempotent
|
||||
foreign complete: 404
|
||||
complete before PUT: 409
|
||||
wrong completion checksum: 409
|
||||
oversized direct PUT: 403 from S3; complete: 409 (nothing stored)
|
||||
same-size overwrite: last PUT wins, checksum verified
|
||||
PASS: lab4 presigned upload flow
|
||||
@@ -0,0 +1,10 @@
|
||||
=== anonymous GET ===
|
||||
wget: server returned error: HTTP/1.1 403 Forbidden
|
||||
exit=1
|
||||
=== published ports ===
|
||||
api 8080/tcp
|
||||
api 8080/tcp
|
||||
lb 127.0.0.1:8404->8404/tcp, 127.0.0.1:8080->80/tcp
|
||||
postgres 5432/tcp
|
||||
redis 6379/tcp
|
||||
seaweedfs 7333/tcp, 8080/tcp, 8888/tcp, 9333/tcp, 18080/tcp, 18888/tcp, 19333/tcp, 127.0.0.1:8333->8333/tcp
|
||||
@@ -0,0 +1,14 @@
|
||||
=== run 1 ===
|
||||
Container mtusi-messenger-lab4-seaweedfs-1 Running
|
||||
Container mtusi-messenger-lab4-seaweedfs-1 Waiting
|
||||
Container mtusi-messenger-lab4-seaweedfs-1 Healthy
|
||||
Container mtusi-messenger-lab4-s3-init-run-77217672cba1 Creating
|
||||
Container mtusi-messenger-lab4-s3-init-run-77217672cba1 Created
|
||||
{"time":"2026-10-21T20:24:44.714991263Z","level":"INFO","msg":"s3 bucket ready","endpoint":"http://seaweedfs:8333","bucket":"messenger-attachments"}
|
||||
=== run 2 (idempotent) ===
|
||||
Container mtusi-messenger-lab4-seaweedfs-1 Running
|
||||
Container mtusi-messenger-lab4-seaweedfs-1 Waiting
|
||||
Container mtusi-messenger-lab4-seaweedfs-1 Healthy
|
||||
Container mtusi-messenger-lab4-s3-init-run-33ccde88f9aa Creating
|
||||
Container mtusi-messenger-lab4-s3-init-run-33ccde88f9aa Created
|
||||
{"time":"2026-10-21T20:24:45.578062247Z","level":"INFO","msg":"s3 bucket ready","endpoint":"http://seaweedfs:8333","bucket":"messenger-attachments"}
|
||||
@@ -0,0 +1,8 @@
|
||||
created attachment before outage: 01a1601e-9947-753c-8085-65db29e8a909
|
||||
seaweedfs stopped
|
||||
health/ready during outage: {'status': 'ok'}
|
||||
chat list during outage: 200
|
||||
download during outage: 503
|
||||
upload during outage: 503
|
||||
seaweedfs restarted
|
||||
upload after recovery: ready 01a1601f-1c45-793b-bb59-281781ea8482
|
||||
@@ -0,0 +1,2 @@
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/smoke.py --base-url "http://localhost:8080"
|
||||
PASS: lab4 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,4 @@
|
||||
ready attachment created: 01a16022-78dc-7349-b3da-2937b2faf1f0
|
||||
abandoned presign attachment: 01a16022-78e3-733f-861b-0443011dcfc8 (no PUT)
|
||||
abandoned pending row removed after grace
|
||||
ready attachment survived sweep: ready 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
|
||||
@@ -0,0 +1,21 @@
|
||||
size,bytes,flow,iteration,latency_s,lb_rx_bytes,lb_tx_bytes,api_rx_bytes,api_tx_bytes,api_anon_peak
|
||||
~1MiB,1050888,proxy,0,0.2291,1058727,1075375,1074306,1059556,284934144
|
||||
~1MiB,1050888,proxy,1,0.2253,1058659,1058991,1060120,1061998,285270016
|
||||
~1MiB,1050888,proxy,2,0.2328,1058925,1059123,1058798,1059912,285433856
|
||||
~1MiB,1050888,proxy,3,0.227,1058485,1058633,1058297,1059591,285433856
|
||||
~1MiB,1050888,proxy,4,0.2284,1057165,1057115,1057126,1058104,285638656
|
||||
~1MiB,1050888,presign,0,0.2249,4098,3850,1058691,10486,285917184
|
||||
~1MiB,1050888,presign,1,0.2262,4163,3981,1058060,9274,286142464
|
||||
~1MiB,1050888,presign,2,0.2356,3548,3680,1057677,9240,286138368
|
||||
~1MiB,1050888,presign,3,0.2297,3482,3614,1058397,10146,286183424
|
||||
~1MiB,1050888,presign,4,0.2388,3482,3680,1057479,8382,286216192
|
||||
~9MiB,9454448,proxy,0,0.2374,9491811,9511561,9503858,9488878,286212096
|
||||
~9MiB,9454448,proxy,1,0.2397,9498015,9511259,9498331,9490528,286228480
|
||||
~9MiB,9454448,proxy,2,0.2247,9492207,9511759,9493573,9486286,286261248
|
||||
~9MiB,9454448,proxy,3,0.2273,9486399,9496645,9483662,9481323,286285824
|
||||
~9MiB,9454448,proxy,4,0.237,9483275,9494891,9493892,9482709,286285824
|
||||
~9MiB,9454448,presign,0,0.2431,4098,3916,9473045,12060,286306304
|
||||
~9MiB,9454448,presign,1,0.246,3552,3680,9472208,9451,286318592
|
||||
~9MiB,9454448,presign,2,0.2347,4164,3982,9473447,11088,286326784
|
||||
~9MiB,9454448,presign,3,0.2346,3482,3614,9471731,9174,286343168
|
||||
~9MiB,9454448,presign,4,0.2389,4098,3916,9473771,14040,286367744
|
||||
|
@@ -0,0 +1,12 @@
|
||||
Lab4 track 1: proxy vs presigned upload
|
||||
|
||||
| size | flow | median latency, s | p95 latency, s | LB rx, bytes | API rx, bytes | API anon peak, bytes |
|
||||
|---|---|---:|---:|---:|---:|---:|
|
||||
| ~1MiB | proxy | 0.228 | 0.233 | 1058392 | 1061729 | 285638656 |
|
||||
| ~1MiB | presign | 0.230 | 0.239 | 3755 | 1058061 | 286216192 |
|
||||
| ~9MiB | proxy | 0.237 | 0.240 | 9490341 | 9494663 | 286285824 |
|
||||
| ~9MiB | presign | 0.239 | 0.246 | 3879 | 9472840 | 286367744 |
|
||||
|
||||
Note: presigned upload keeps the file body off the API request path and off the load balancer.
|
||||
Completion still streams the object from S3 once to verify its SHA-256, so api_rx stays close to
|
||||
the file size; the saving is in the client-facing LB leg and in not accepting/buffering the body.
|
||||
@@ -0,0 +1,20 @@
|
||||
# Lab5 evidence
|
||||
|
||||
All artifacts were produced against the local Compose stand on 2026-10-30
|
||||
(2 vCPU, 2 GiB Docker VM, RabbitMQ 4.3.7, PostgreSQL 18, SeaweedFS 3.80).
|
||||
|
||||
- `stand.txt` — containers, image versions, VM limits.
|
||||
- `smoke.txt` — public `make test`.
|
||||
- `async.txt` — worker down/restart, broker restart with volume, stack restart.
|
||||
- `variants.txt` — thumbnail/crop/optimized metadata, bytes, dimensions.
|
||||
- `faults.txt` — permanent/transient retry, DLQ/replay, crash before/after
|
||||
side effect, crash before/after ack, outbox gap, lease takeover.
|
||||
- `persistence.txt`, `failover.txt`, `idempotency.txt`, `lb-readiness.txt` —
|
||||
cumulative lab2–lab4 regressions.
|
||||
- `track2/run.txt`, `track2/runs.csv`, `track2/summary.md` — track 2
|
||||
duplicate/stale/version harness (3 repetitions).
|
||||
- `unit-test.txt`, `integration-test.txt`, `vet.txt`, `lint.txt`,
|
||||
`validate.txt` — build/quality gates.
|
||||
|
||||
No `.env`, tokens, credentials or presigned URLs are stored here. Raw SQL rows
|
||||
contain only synthetic IDs and metadata.
|
||||
@@ -0,0 +1,12 @@
|
||||
# make test-queue 2026-10-31T11:26:40Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 student-tests/lab5_async.py --base-url "http://localhost:8080"
|
||||
worker down: 202 queued, content 409, queued attachment linked, API restarted
|
||||
worker restarted: ready, thumbnail and original downloadable, staging cleared
|
||||
broker down: upload accepted into outbox
|
||||
broker + relay recovered: queued job reached ready
|
||||
stack restart: ready attachment and original preserved
|
||||
worker down: reprocess pipeline 2 accepted, v1 audit event recorded, upload still queued
|
||||
worker up: reprocessed upload reached ready at pipeline 2, v1 superseded
|
||||
worker down: reprocess pipeline 3 refused, v1 job untouched
|
||||
worker up: preserved upload reached ready at pipeline 1
|
||||
PASS: lab5 async worker/broker durability
|
||||
@@ -0,0 +1,25 @@
|
||||
# make test-attachments 2026-10-31T11:26:14Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 student-tests/attachments_negative.py --base-url "http://localhost:8080"
|
||||
10 MiB + 1 body: 413
|
||||
empty body: 415
|
||||
corrupt PNG (IDAT CRC): 415
|
||||
MIME spoof (PNG declared as JPEG): 415
|
||||
structurally valid PNG with non-zlib IDAT: 415
|
||||
valid zlib, empty PNG raster: 415
|
||||
valid zlib, invalid PNG scanline filter: 415
|
||||
invalid PNG color type/bit depth pair: 415
|
||||
duplicate PNG IHDR: 415
|
||||
trailing bytes after PNG zlib stream: 415
|
||||
tRNS on RGBA PNG: 415
|
||||
short tRNS on RGB PNG: 415
|
||||
PLTE entries exceed palette bit depth: 415
|
||||
palette tRNS exceeds PLTE entries: 415
|
||||
dangerous filenames: 400
|
||||
foreign attachment metadata/content: 404
|
||||
empty text without attachments: 400
|
||||
attachment from another chat: 404
|
||||
11 attachment ids: 400
|
||||
duplicate attachment ids: 400
|
||||
attachment-only message: 201
|
||||
anonymous direct S3 GET: 403
|
||||
PASS: lab4 attachment negative scenarios
|
||||
@@ -0,0 +1,29 @@
|
||||
# db state 2026-10-30T20:16:08Z
|
||||
status | count
|
||||
---------+-------
|
||||
failed | 2
|
||||
pending | 4
|
||||
ready | 31
|
||||
(3 rows)
|
||||
|
||||
status | count
|
||||
--------+-------
|
||||
failed | 2
|
||||
ready | 34
|
||||
(2 rows)
|
||||
|
||||
variants
|
||||
----------
|
||||
102
|
||||
(1 row)
|
||||
|
||||
unpublished | outbox
|
||||
-------------+--------
|
||||
0 | 58
|
||||
(1 row)
|
||||
|
||||
Timeout: 60.0 seconds ...
|
||||
Listing queues for vhost messenger ...
|
||||
name messages messages_ready messages_unacknowledged consumers
|
||||
attachment.process.dead 4 4 0 0
|
||||
attachment.process.v1 0 0 0 0
|
||||
@@ -0,0 +1,5 @@
|
||||
# failover 2026-10-30T20:11:43Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 99, "failed_attempts": 0, "first_recovery_seconds": 0.221}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,15 @@
|
||||
# make test-faults 2026-10-31T11:27:03Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 student-tests/lab5_faults.py --base-url "http://localhost:8080"
|
||||
permanent failure: failed/injected_failure, content 409, failed attachment not linkable, registry visible
|
||||
replay: failed -> queued -> ready, one thumbnail
|
||||
replay ready job: refused
|
||||
replay older failed version while v2 queued: refused, state intact
|
||||
v2 published after older replay refusal
|
||||
replay of failed reprocess: queued projection restored, then ready at pipeline 2
|
||||
transient exhaustion: attempts=5, retry_exhausted, four retries, DLQ message present
|
||||
crash after first variant: redelivered, same three variants, attempts=2
|
||||
crash after commit before ack: ready remains, redelivery is a no-op
|
||||
crash after claim before side effect: requeued, attempts=2, ready
|
||||
outbox gap: crash before publish recovered through the relay, outbox published, ready
|
||||
lease expiry: paused worker, reaper requeued, stale attempt fenced, ready
|
||||
PASS: lab5 level 4 fault injection
|
||||
@@ -0,0 +1,4 @@
|
||||
# idempotency 2026-10-30T20:11:43Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 student-tests/idempotency_parallel.py --base-url "http://localhost:8080"
|
||||
{"replay": {"workers": 12, "instances": ["1c67613c89f2", "ee96975adb44"], "message_id": "01a18e70-8fcd-7519-91ab-d9c43b6a5f37"}, "conflict": {"workers": 12, "accepted": 1, "conflicts": 11}, "stable_body": {"message_id": "01a18e70-8ff9-759f-ab87-abd58f58c59d"}, "key_required": {"status": 400}}
|
||||
PASS: параллельный повтор с одним Idempotency-Key создаёт ровно одно сообщение
|
||||
@@ -0,0 +1,2 @@
|
||||
ok mtusi-messenger/internal/storage/postgres 9.448s
|
||||
ok mtusi-messenger/internal/storage/redis 1.238s
|
||||
@@ -0,0 +1,31 @@
|
||||
# LB excludes a not-ready but reachable replica (lab5)
|
||||
# generated: 2026-10-30T20:18:32Z
|
||||
# lb: haproxy:3.2-alpine@sha256:254e6370f01cd654e0744edf607c67f33777c1b6a9dc0d4b28bcba7171460122
|
||||
|
||||
## 1. baseline: requests through LB by replica
|
||||
22 23d07355bd77
|
||||
18 56bd7451c245
|
||||
stats: api1=UP api2=MAINT (resolution) api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 2. start a temporary TCP proxy to postgres and a candidate replica behind the same network alias
|
||||
instance-id: 42c73eb4c0a5, readiness while its database is reachable: 200
|
||||
load balancer slot for the candidate: api2, stats: api1=UP api2=UP 1/2 api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 3. cut the candidate's database access (stop only the TCP proxy)
|
||||
candidate is still running: running, readiness: 503
|
||||
waiting for the load balancer to mark api2 DOWN
|
||||
api2 went DOWN 1s after its database was cut (check: inter 2s fall 2)
|
||||
stats after failure: api1=UP api2=DOWN api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 4. 40 requests through LB while the candidate is not ready
|
||||
22 23d07355bd77
|
||||
18 56bd7451c245
|
||||
(the candidate must not appear above)
|
||||
|
||||
## 5. business writes through LB during the exclusion
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 816.58,
|
||||
|
||||
## 6. cleanup
|
||||
stats after cleanup: api1=UP api2=MAINT (resolution) api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
@@ -0,0 +1,34 @@
|
||||
# lb readiness 2026-10-30T20:18:31Z
|
||||
scripts/lb_readiness_check.sh
|
||||
# LB excludes a not-ready but reachable replica (lab5)
|
||||
# generated: 2026-10-30T20:18:32Z
|
||||
# lb: haproxy:3.2-alpine@sha256:254e6370f01cd654e0744edf607c67f33777c1b6a9dc0d4b28bcba7171460122
|
||||
|
||||
## 1. baseline: requests through LB by replica
|
||||
22 23d07355bd77
|
||||
18 56bd7451c245
|
||||
stats: api1=UP api2=MAINT (resolution) api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 2. start a temporary TCP proxy to postgres and a candidate replica behind the same network alias
|
||||
instance-id: 42c73eb4c0a5, readiness while its database is reachable: 200
|
||||
load balancer slot for the candidate: api2, stats: api1=UP api2=UP 1/2 api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 3. cut the candidate's database access (stop only the TCP proxy)
|
||||
candidate is still running: running, readiness: 503
|
||||
waiting for the load balancer to mark api2 DOWN
|
||||
api2 went DOWN 1s after its database was cut (check: inter 2s fall 2)
|
||||
stats after failure: api1=UP api2=DOWN api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 4. 40 requests through LB while the candidate is not ready
|
||||
22 23d07355bd77
|
||||
18 56bd7451c245
|
||||
(the candidate must not appear above)
|
||||
|
||||
## 5. business writes through LB during the exclusion
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 816.58,
|
||||
|
||||
## 6. cleanup
|
||||
stats after cleanup: api1=UP api2=MAINT (resolution) api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
lb_readiness_check.sh: evidence in evidence/lab5/lb-readiness-detail.txt
|
||||
@@ -0,0 +1,20 @@
|
||||
/Users/vladislav/Projects/mtusi2026lab5/bin/golangci-lint run -v
|
||||
level=info msg="golangci-lint has version 2.13.2 built with go1.27.1 from (unknown, modified: ?, mod sum: \"h1:bCyq3E4vo9qwzifjpzJqYndEt7Ncva80qkk8G2B4TXU=\") on (unknown)"
|
||||
level=info msg="[config_reader] Config search paths: [./ /Users/vladislav/Projects/mtusi2026lab5 /Users/vladislav/Projects /Users/vladislav /Users /]"
|
||||
level=info msg="[config_reader] Used config file .golangci.yml"
|
||||
level=info msg="[config_reader] Module name \"mtusi-messenger\""
|
||||
level=info msg="[goenv] Read go env for 6.264542ms: map[string]string{\"GOCACHE\":\"/Users/vladislav/Library/Caches/go-build\", \"GOROOT\":\"/opt/homebrew/Cellar/go/1.27.1/libexec\"}"
|
||||
level=info msg="[lintersdb] Active 50 linters: [asasalint bodyclose canonicalheader containedctx contextcheck copyloopvar depguard durationcheck errcheck errname errorlint exhaustive exptostd fatcontext forbidigo forcetypeassert gocheckcompilerdirectives gocritic gofumpt goimports gomoddirectives gosec govet ineffassign intrange makezero misspell musttag nilerr nilnil noctx nolintlint perfsprint prealloc reassign recvcheck revive rowserrcheck sloglint sqlclosecheck staticcheck testifylint thelper tparallel unconvert unparam unused usestdlibvars usetesting wastedassign]"
|
||||
level=info msg="[loader] Using build tags: [integration]"
|
||||
level=info msg="[loader] Go packages loading at mode 8767 (compiled_files|deps|exports_file|files|types_sizes|imports|name) took 193.808375ms"
|
||||
level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 11.667ms"
|
||||
level=info msg="[linters_context/goanalysis] analyzers took 0s with no stages"
|
||||
level=info msg="[runner/exclusion_rules] Skipped 14 issues by rules: [Path: \"_test\\\\.go\", Linters: \"gosec, prealloc, forcetypeassert, unparam\"]"
|
||||
level=info msg="[runner] Issues before processing: 887, after processing: 0"
|
||||
level=info msg="[runner] Processors filtering stat (in/out): path_absoluter: 887/887, cgo: 887/887, filename_unadjuster: 887/887, nolint_filter: 6/0, invalid_issue: 887/887, exclusion_paths: 887/887, path_relativity: 887/887, generated_file_filter: 887/298, exclusion_rules: 298/6"
|
||||
level=info msg="[runner] processing took 2.828168ms with stages: generated_file_filter: 1.490334ms, nolint_filter: 764.209µs, path_relativity: 284.917µs, exclusion_rules: 251.001µs, invalid_issue: 13.417µs, cgo: 12.25µs, path_absoluter: 4.666µs, sort_results: 2.916µs, filename_unadjuster: 2.542µs, max_same_issues: 874ns, diff: 167ns, fixer: 166ns, path_prettifier: 125ns, max_per_file_from_linter: 125ns, exclusion_paths: 125ns, path_shortener: 124ns, uniq_by_line: 84ns, severity-rules: 42ns, max_from_linter: 42ns, source_code: 42ns"
|
||||
level=info msg="[runner] linters took 629.148708ms with stages: goanalysis_metalinter: 626.277292ms"
|
||||
0 issues.
|
||||
level=info msg="File cache stats: 0 entries of total size 0B"
|
||||
level=info msg="Memory: 10 samples, avg is 87.2MB, max is 111.5MB"
|
||||
level=info msg="Execution took 841.622625ms"
|
||||
@@ -0,0 +1,4 @@
|
||||
# persistence 2026-10-30T20:12:05Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,11 @@
|
||||
# presign 2026-10-30T20:11:41Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 student-tests/presign_flow.py --base-url "http://localhost:8080"
|
||||
happy path: direct PUT 200, complete queued, ready after worker
|
||||
message with attachment downloaded as the second chat member
|
||||
repeated complete is idempotent
|
||||
foreign complete: 404
|
||||
complete before PUT: 409
|
||||
wrong completion checksum: 409
|
||||
oversized direct PUT: 403 from S3; complete: 409 (nothing stored)
|
||||
same-size overwrite: last PUT wins, checksum verified
|
||||
PASS: lab4 presigned upload flow
|
||||
@@ -0,0 +1,3 @@
|
||||
# make test 2026-10-31T11:26:59Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/smoke.py --base-url "http://localhost:8080"
|
||||
PASS: lab5 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,20 @@
|
||||
# stand 2026-10-30T20:16:07Z
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi-messenger-lab5-api-1 mtusi-messenger:lab5 "/usr/local/bin/mess…" api 42 seconds ago Up Less than a second (health: starting) 8080/tcp
|
||||
mtusi-messenger-lab5-api-2 mtusi-messenger:lab5 "/usr/local/bin/mess…" api 42 seconds ago Up Less than a second (health: starting) 8080/tcp
|
||||
mtusi-messenger-lab5-broker-1 rabbitmq:4.3.7-management-alpine@sha256:1528a88eebf2bc4d0ab7e9d5d9bc542e9bdf5e1b105e65848fcf8de5c2186528 "docker-entrypoint.s…" broker 8 minutes ago Up 8 seconds (healthy) 4369/tcp, 5671-5672/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp, 127.0.0.1:15672->15672/tcp
|
||||
mtusi-messenger-lab5-lb-1 haproxy:3.2-alpine@sha256:254e6370f01cd654e0744edf607c67f33777c1b6a9dc0d4b28bcba7171460122 "docker-entrypoint.s…" lb 8 minutes ago Up 3 minutes 127.0.0.1:8404->8404/tcp, 127.0.0.1:8080->80/tcp
|
||||
mtusi-messenger-lab5-postgres-1 postgres:18-alpine@sha256:77f585114c32fbca283dc835b0596f4e52b51b4c6662d7810b2f4084f60a1873 "docker-entrypoint.s…" postgres 8 minutes ago Up 3 minutes (healthy) 5432/tcp
|
||||
mtusi-messenger-lab5-redis-1 redis:7.4-alpine@sha256:858f009f9709ce576febc734aa78b8f6d624b82571f9ddb6bda4377c833b3499 "docker-entrypoint.s…" redis 8 minutes ago Up 4 minutes (healthy) 6379/tcp
|
||||
mtusi-messenger-lab5-relay-1 mtusi-messenger:lab5 "/usr/local/bin/relay" relay 42 seconds ago Up Less than a second (health: starting) 8080/tcp, 127.0.0.1:8082->8082/tcp
|
||||
mtusi-messenger-lab5-seaweedfs-1 chrislusf/seaweedfs:3.80@sha256:1055999e08eed1789b0ae45d235126e4495e23d3fb9d6396293fd42539b1ae6a "/entrypoint.sh serv…" seaweedfs 8 minutes ago Up 3 minutes (healthy) 7333/tcp, 8080/tcp, 8888/tcp, 9333/tcp, 18080/tcp, 18888/tcp, 19333/tcp, 127.0.0.1:8333->8333/tcp
|
||||
mtusi-messenger-lab5-worker-1 mtusi-messenger:lab5 "/usr/local/bin/work…" worker 42 seconds ago Up Less than a second (health: starting) 8080/tcp, 127.0.0.1:8081->8081/tcp
|
||||
|
||||
mtusi-messenger:lab5 10b83ff52c7d
|
||||
rabbitmq:4.3.7-management-alpine 1528a88eebf2
|
||||
haproxy:3.2-alpine 254e6370f01c
|
||||
redis:7.4-alpine 858f009f9709
|
||||
postgres:18-alpine 77f585114c32
|
||||
chrislusf/seaweedfs:3.80 1055999e08ee
|
||||
|
||||
CPUs=2 MemTotal=2053644288
|
||||
@@ -0,0 +1,7 @@
|
||||
Dduplicate_before_effect rep=1: PASS
|
||||
Dstale_version_after_v2 rep=1: PASS
|
||||
Dduplicate_before_effect rep=2: PASS
|
||||
Dstale_version_after_v2 rep=2: PASS
|
||||
Dduplicate_before_effect rep=3: PASS
|
||||
Dstale_version_after_v2 rep=3: PASS
|
||||
PASS: track2 6/6 scenarios
|
||||
@@ -0,0 +1,7 @@
|
||||
scenario,rep,pass,detail
|
||||
duplicate_before_effect,1,1,attempts=1
|
||||
stale_version_after_v2,1,1,v1_job=01a18e6e-17b0-763b-b330-7adbcb43a700
|
||||
duplicate_before_effect,2,1,attempts=1
|
||||
stale_version_after_v2,2,1,v1_job=01a18e6e-455e-75f3-857a-750ed660378b
|
||||
duplicate_before_effect,3,1,attempts=1
|
||||
stale_version_after_v2,3,1,v1_job=01a18e6e-74f2-7b4a-842b-c014c626413c
|
||||
|
@@ -0,0 +1,21 @@
|
||||
# Track 2 — versioned pipeline and duplicate/stale delivery
|
||||
|
||||
Hypothesis: with the effect key `(attachment_id, pipeline_version, variant)`,
|
||||
deterministic object keys, a serving version that changes only when all v2
|
||||
variants are committed, and stale-version acknowledgements, an at-least-once
|
||||
pipeline loses no accepted work and never overwrites a newer result with an
|
||||
older duplicate.
|
||||
|
||||
Method: N=3 repetitions. Each repetition creates fresh users/chat and runs:
|
||||
- duplicate pipeline publication while the worker is stopped, followed by recovery;
|
||||
- v1 ready -> explicit reprocess to v2 -> old v1 message delivered after v2 ready.
|
||||
|
||||
Invariants checked: unique variant rows per effect key; ready remains ready;
|
||||
serving pipeline version never regresses; original bytes/checksum unchanged;
|
||||
stale job state is not rewritten.
|
||||
|
||||
Limitations: this harness covers duplicate and stale/reorder delivery. Crash
|
||||
windows (before/after side effect, before/after ack, outbox gap) and lease
|
||||
takeover are covered by student-tests/lab5_faults.py; both are single-node
|
||||
Compose evidence, not a production availability claim. Delivery is
|
||||
at-least-once; exactly-once is not claimed.
|
||||
@@ -0,0 +1,41 @@
|
||||
env -u APP_ENV -u SERVER_HOST -u SERVER_PORT -u SERVER_READ_HEADER_TIMEOUT -u SERVER_READ_TIMEOUT -u SERVER_SHUTDOWN_TIMEOUT -u SERVER_MAX_BODY_BYTES -u LOG_LEVEL -u LOG_FORMAT -u POSTGRES_HOST -u POSTGRES_PORT -u POSTGRES_DATABASE -u POSTGRES_USER -u POSTGRES_PASSWORD -u POSTGRES_SSL_MODE -u POSTGRES_MAX_CONNS -u POSTGRES_MIN_CONNS -u POSTGRES_MAX_CONN_LIFETIME -u POSTGRES_MAX_CONN_IDLE_TIME -u POSTGRES_CONNECT_TIMEOUT -u POSTGRES_QUERY_TIMEOUT -u REDIS_ENABLED -u REDIS_HOST -u REDIS_PORT -u REDIS_PASSWORD -u REDIS_DB -u REDIS_MAX_RETRIES -u REDIS_DIAL_TIMEOUT -u REDIS_READ_TIMEOUT -u REDIS_WRITE_TIMEOUT -u REDIS_POOL_SIZE -u CACHE_ENABLED -u CACHE_CHAT_LIST_TTL -u CACHE_LOCK_TTL -u CACHE_LOCK_WAIT_TIMEOUT -u SESSION_TTL_SECONDS -u IDEMPOTENCY_TTL_SECONDS -u API_REPLICAS -u API_CPU_LIMIT -u API_MEM_LIMIT -u POSTGRES_MAX_CONNS -u POSTGRES_CPU_LIMIT -u POSTGRES_MEM_LIMIT -u LB_STATS_PORT -u S3_ENDPOINT -u S3_PUBLIC_ENDPOINT -u S3_PORT -u S3_REGION -u S3_BUCKET -u S3_ACCESS_KEY_ID -u S3_SECRET_ACCESS_KEY -u MAX_UPLOAD_BYTES -u MAX_IMAGE_PIXELS -u S3_PRESIGN_TTL -u S3_SWEEP_INTERVAL -u S3_SWEEP_GRACE -u BROKER_USER -u BROKER_PASSWORD -u BROKER_VHOST -u BROKER_URL -u BROKER_EXCHANGE -u BROKER_QUEUE -u BROKER_DLX -u BROKER_DLQ -u BROKER_MANAGEMENT_PORT -u BROKER_CPU_LIMIT -u BROKER_MEM_LIMIT -u WORKER_CONCURRENCY -u WORKER_PREFETCH -u WORKER_CPU_LIMIT -u WORKER_MEM_LIMIT -u WORKER_SHUTDOWN_TIMEOUT -u PROCESSING_PIPELINE_VERSION -u PROCESSING_MAX_ATTEMPTS -u PROCESSING_JOB_TIMEOUT -u PROCESSING_LEASE_TTL -u PROCESSING_HEARTBEAT -u PROCESSING_RETRY_BASE -u PROCESSING_RETRY_CAP -u OUTBOX_POLL_INTERVAL -u OUTBOX_CLAIM_TTL -u OUTBOX_BATCH -u OUTBOX_REAPER_INTERVAL -u OUTBOX_RETENTION -u RELAY_CPU_LIMIT -u RELAY_MEM_LIMIT -u STAGING_ORPHAN_GRACE -u STAGING_FAILED_RETENTION -u ADMISSION_MAX_PENDING_PER_USER -u ADMISSION_MAX_PENDING -u ADMISSION_MAX_STAGED_BYTES go test -race -shuffle=on -count=1 -timeout=5m ./...
|
||||
? mtusi-messenger/cmd/jobctl [no test files]
|
||||
? mtusi-messenger/cmd/messenger [no test files]
|
||||
? mtusi-messenger/cmd/migrate [no test files]
|
||||
? mtusi-messenger/cmd/relay [no test files]
|
||||
? mtusi-messenger/cmd/s3init [no test files]
|
||||
? mtusi-messenger/cmd/worker [no test files]
|
||||
? mtusi-messenger/internal/broker [no test files]
|
||||
ok mtusi-messenger/internal/config 1.717s
|
||||
ok mtusi-messenger/internal/domain 2.647s
|
||||
? mtusi-messenger/internal/failpoint [no test files]
|
||||
ok mtusi-messenger/internal/health 1.315s
|
||||
ok mtusi-messenger/internal/imagecheck 3.766s
|
||||
ok mtusi-messenger/internal/imageproc 2.400s
|
||||
ok mtusi-messenger/internal/logger 2.338s
|
||||
? mtusi-messenger/internal/outbox [no test files]
|
||||
ok mtusi-messenger/internal/platform/cache 4.909s
|
||||
? mtusi-messenger/internal/platform/cache/mocks [no test files]
|
||||
ok mtusi-messenger/internal/platform/objectstore 6.507s
|
||||
ok mtusi-messenger/internal/platform/password 3.349s
|
||||
ok mtusi-messenger/internal/platform/token 3.304s
|
||||
ok mtusi-messenger/internal/service/attachment 5.105s
|
||||
? mtusi-messenger/internal/service/attachment/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/chat 4.460s
|
||||
? mtusi-messenger/internal/service/chat/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/message 4.119s
|
||||
? mtusi-messenger/internal/service/message/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/session 5.771s
|
||||
? mtusi-messenger/internal/service/session/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/user 6.251s
|
||||
? mtusi-messenger/internal/service/user/mocks [no test files]
|
||||
ok mtusi-messenger/internal/storage/postgres 6.484s
|
||||
? mtusi-messenger/internal/storage/postgres/internal/sqlcgen [no test files]
|
||||
? mtusi-messenger/internal/storage/postgres/migrations [no test files]
|
||||
? mtusi-messenger/internal/storage/redis [no test files]
|
||||
? mtusi-messenger/internal/storage/redis/mocks [no test files]
|
||||
ok mtusi-messenger/internal/transport/rest 6.893s
|
||||
? mtusi-messenger/internal/transport/rest/internal/oas [no test files]
|
||||
? mtusi-messenger/internal/transport/rest/mocks [no test files]
|
||||
? mtusi-messenger/internal/worker [no test files]
|
||||
? mtusi-messenger/tools/specgen [no test files]
|
||||
@@ -0,0 +1,3 @@
|
||||
# make validate PYTHON=.venv/bin/python 2026-10-30T22:22:13Z
|
||||
.venv/bin/python scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
@@ -0,0 +1,3 @@
|
||||
# lab5_variants 2026-10-30T20:08:36Z
|
||||
variants: thumbnail 256x160, crop 128x128, optimized WebP 320x200; metadata == bytes
|
||||
PASS: lab5 variant contract
|
||||
@@ -0,0 +1,31 @@
|
||||
# LB excludes a not-ready but reachable replica (lab3)
|
||||
# generated: 2026-10-16T14:02:26Z
|
||||
# lb: haproxy:3.2-alpine
|
||||
|
||||
## 1. baseline: requests through LB by replica
|
||||
18 52861386fddb
|
||||
22 8587b4251b72
|
||||
stats: api1=UP api2=UP api3=MAINT (resolution) api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 2. start a temporary TCP proxy to postgres and a candidate replica behind the same network alias
|
||||
instance-id: 9e9e905440d3, readiness while its database is reachable: 200
|
||||
load balancer slot for the candidate: api3, stats: api1=UP api2=UP api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 3. cut the candidate's database access (stop only the TCP proxy)
|
||||
candidate is still running: running, readiness: 503
|
||||
waiting for the load balancer to mark api3 DOWN
|
||||
api3 went DOWN 2s after its database was cut (check: inter 2s fall 2)
|
||||
stats after failure: api1=UP api2=UP api3=DOWN api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
|
||||
## 4. 40 requests through LB while the candidate is not ready
|
||||
18 52861386fddb
|
||||
22 8587b4251b72
|
||||
(the candidate must not appear above)
|
||||
|
||||
## 5. business writes through LB during the exclusion
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1163.529,
|
||||
|
||||
## 6. cleanup
|
||||
stats after cleanup: api1=UP api2=UP api3=MAINT (resolution) api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 30.0,
|
||||
"elapsed_seconds": 30.031,
|
||||
"concurrency": 32,
|
||||
"successful_requests": 38549,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1283.644,
|
||||
"successful_latency_ms": {
|
||||
"p50": 19.177,
|
||||
"p95": 52.823,
|
||||
"p99": 60.246
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
# контейнерный стенд через LB, 32 клиента, 30 с — 2026-10-16T14:26:39Z
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 30.0,
|
||||
"elapsed_seconds": 30.031,
|
||||
"concurrency": 32,
|
||||
"successful_requests": 38549,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1283.644,
|
||||
"successful_latency_ms": {
|
||||
"p50": 19.177,
|
||||
"p95": 52.823,
|
||||
"p99": 60.246
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; failures counted, not raised",
|
||||
"requested_duration_seconds": 90.0,
|
||||
"elapsed_seconds": 90.033,
|
||||
"concurrency": 32,
|
||||
"successful_requests": 220781,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"errors_by_kind": {},
|
||||
"successful_rps": 2452.222,
|
||||
"successful_latency_ms": {
|
||||
"p50": 12.541,
|
||||
"p95": 17.549,
|
||||
"p99": 22.396
|
||||
},
|
||||
"instances": {
|
||||
"Vladislavs-MacBook-Pro.local": 220781
|
||||
},
|
||||
"bootstrap_attempts": 1,
|
||||
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# нативный процесс вне Docker, 32 клиента, 90 с — 2026-10-16T14:26:39Z
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; failures counted, not raised",
|
||||
"requested_duration_seconds": 90.0,
|
||||
"elapsed_seconds": 90.033,
|
||||
"concurrency": 32,
|
||||
"successful_requests": 220781,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"errors_by_kind": {},
|
||||
"successful_rps": 2452.222,
|
||||
"successful_latency_ms": {
|
||||
"p50": 12.541,
|
||||
"p95": 17.549,
|
||||
"p99": 22.396
|
||||
},
|
||||
"instances": {
|
||||
"Vladislavs-MacBook-Pro.local": 220781
|
||||
},
|
||||
"bootstrap_attempts": 1,
|
||||
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
# Контроль пути «хост -> Colima VM -> LB»
|
||||
|
||||
Один и тот же генератор (`tests/load.py`), один и тот же профиль (закрытый цикл,
|
||||
8 клиентов, 15 с прогрева, 60 с замера) и один и тот же стенд. Меняется только
|
||||
место клиента: на хосте (через опубликованный порт) или в контейнере внутри VM
|
||||
(напрямую в балансировщик по docker-сети). Воспроизведение:
|
||||
`scripts/path_overhead_check.sh`.
|
||||
|
||||
| клиент | успешных | отказов | ошибки | RPS | p50, мс | p95, мс |
|
||||
| --- | --- | --- | --- | --- | --- | --- |
|
||||
| на хосте, `http://127.0.0.1:8080` | 92 378 | 32 575 | 26.1 % | 1 539 | 3.79 | 7.16 |
|
||||
| в VM, `http://lb` | 88 596 | **0** | 0 % | 1 475 | 5.29 | 8.42 |
|
||||
|
||||
## Что это показывает
|
||||
|
||||
1. **Пропускная способность одна и та же** (1 539 против 1 475, разница в пределах
|
||||
разброса; клиент в VM даже немного медленнее, потому что делит с стендом те же
|
||||
2 vCPU). Значит путь «хост -> проброс порта -> VM» **не задаёт потолок**: его
|
||||
исключение из маршрута ничего не прибавляет.
|
||||
2. **Отказы целиком клиентские.** Тот же стенд под той же нагрузкой не отказал ни
|
||||
разу для клиента внутри VM. При этом за прогон с 26 % клиентских отказов
|
||||
балансировщик отдал все запросы без 5xx (`hrsp_5xx=0` в статистике HAProxy), а
|
||||
в логах API нет ни одной записи уровня выше `info`.
|
||||
3. Причина — сам проброс порта: генератор ходит без keep-alive (новое TCP-соединение
|
||||
на запрос), и под шквалом соединений forwarder хоста начинает их отклонять.
|
||||
Наблюдения: в момент замера на хосте было **19 556 сокетов в `TIME_WAIT`** при
|
||||
диапазоне эфемерных портов 49 152-65 535 (16 384), а точечный пробник из 40 000
|
||||
быстрых подключений подряд получил 1 294 успеха и 38 706 `ECONNREFUSED`.
|
||||
4. Предел этой хрупкости тоже измерен: прогон на ~4 500 соединений/с по тривиальному
|
||||
`/health/live` дал 100 % отказов, после чего проброс порта (и доступ к Docker-эндпоинту
|
||||
Colima) перестал отвечать до `colima restart`. Стенд при этом не падал — недоступным
|
||||
был именно хостовый путь; серия трека 1 поэтому снимается клиентом внутри VM
|
||||
(`CLIENT=vm`), где отказов нет.
|
||||
|
||||
Клиент на хосте способен на большее: тот же закрытый цикл по тривиальному серверу,
|
||||
поднятому на самом хосте (без Docker), дал 4 469 RPS без отказов — то есть ~1 500 RPS
|
||||
не являются потолком генератора.
|
||||
|
||||
Артефакты: `outside.txt`, `inside.txt`, `load-outside.json`, `load-inside.json`,
|
||||
`summary.txt`.
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.073,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 88596,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1474.795,
|
||||
"successful_latency_ms": {
|
||||
"p50": 5.292,
|
||||
"p95": 8.415,
|
||||
"p99": 10.433
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.073,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 88596,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1474.795,
|
||||
"successful_latency_ms": {
|
||||
"p50": 5.292,
|
||||
"p95": 8.415,
|
||||
"p99": 10.433
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.026,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 92378,
|
||||
"failed_requests": 32575,
|
||||
"error_ratio": 0.260698,
|
||||
"successful_rps": 1538.959,
|
||||
"successful_latency_ms": {
|
||||
"p50": 3.793,
|
||||
"p95": 7.159,
|
||||
"p99": 21.756
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.026,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 92378,
|
||||
"failed_requests": 32575,
|
||||
"error_ratio": 0.260698,
|
||||
"successful_rps": 1538.959,
|
||||
"successful_latency_ms": {
|
||||
"p50": 3.793,
|
||||
"p95": 7.159,
|
||||
"p99": 21.756
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
# Контроль пути к балансировщику
|
||||
# generated: 2026-10-16T18:17:21Z
|
||||
# profile: tests/load.py duration=60 concurrency=8 warmup=15
|
||||
# docker network: mtusi-messenger-lab3_default
|
||||
# клиент в VM: python:3.12-alpine
|
||||
|
||||
=== извне: клиент на хосте, http://127.0.0.1:8080 ===
|
||||
|
||||
=== изнутри: клиент в VM, http://lb ===
|
||||
@@ -0,0 +1,4 @@
|
||||
# make test-persistence — 2026-10-16T13:59:43Z
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,35 @@
|
||||
# quality checks — 2026-10-16T14:30:53Z
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
.venv/bin/python scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
env -u APP_ENV -u SERVER_HOST -u SERVER_PORT -u SERVER_READ_HEADER_TIMEOUT -u SERVER_SHUTDOWN_TIMEOUT -u LOG_LEVEL -u LOG_FORMAT -u POSTGRES_HOST -u POSTGRES_PORT -u POSTGRES_DATABASE -u POSTGRES_USER -u POSTGRES_PASSWORD -u POSTGRES_SSL_MODE -u POSTGRES_MAX_CONNS -u POSTGRES_MIN_CONNS -u POSTGRES_MAX_CONN_LIFETIME -u POSTGRES_MAX_CONN_IDLE_TIME -u POSTGRES_CONNECT_TIMEOUT -u POSTGRES_QUERY_TIMEOUT -u REDIS_ENABLED -u REDIS_HOST -u REDIS_PORT -u REDIS_PASSWORD -u REDIS_DB -u REDIS_MAX_RETRIES -u REDIS_DIAL_TIMEOUT -u REDIS_READ_TIMEOUT -u REDIS_WRITE_TIMEOUT -u REDIS_POOL_SIZE -u CACHE_ENABLED -u CACHE_CHAT_LIST_TTL -u CACHE_LOCK_TTL -u CACHE_LOCK_WAIT_TIMEOUT -u SESSION_TTL_SECONDS -u IDEMPOTENCY_TTL_SECONDS -u API_REPLICAS -u API_CPU_LIMIT -u API_MEM_LIMIT go test -race -shuffle=on -count=1 -timeout=5m ./...
|
||||
? mtusi-messenger/cmd/messenger [no test files]
|
||||
? mtusi-messenger/cmd/migrate [no test files]
|
||||
ok mtusi-messenger/internal/config 1.633s
|
||||
ok mtusi-messenger/internal/domain 1.222s
|
||||
ok mtusi-messenger/internal/health 1.397s
|
||||
ok mtusi-messenger/internal/logger 1.803s
|
||||
ok mtusi-messenger/internal/platform/cache 2.104s
|
||||
? mtusi-messenger/internal/platform/cache/mocks [no test files]
|
||||
ok mtusi-messenger/internal/platform/password 2.659s
|
||||
ok mtusi-messenger/internal/platform/token 2.147s
|
||||
ok mtusi-messenger/internal/service/chat 2.733s
|
||||
? mtusi-messenger/internal/service/chat/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/message 2.527s
|
||||
? mtusi-messenger/internal/service/message/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/session 3.204s
|
||||
? mtusi-messenger/internal/service/session/mocks [no test files]
|
||||
ok mtusi-messenger/internal/service/user 3.505s
|
||||
? mtusi-messenger/internal/service/user/mocks [no test files]
|
||||
ok mtusi-messenger/internal/storage/postgres 3.147s
|
||||
? mtusi-messenger/internal/storage/postgres/internal/sqlcgen [no test files]
|
||||
? mtusi-messenger/internal/storage/postgres/migrations [no test files]
|
||||
? mtusi-messenger/internal/storage/redis [no test files]
|
||||
? mtusi-messenger/internal/storage/redis/mocks [no test files]
|
||||
ok mtusi-messenger/internal/transport/rest 3.609s
|
||||
? mtusi-messenger/internal/transport/rest/internal/oas [no test files]
|
||||
? mtusi-messenger/internal/transport/rest/mocks [no test files]
|
||||
go test -tags=integration -p 1 -count=1 -timeout=15m ./internal/storage/postgres ./internal/storage/redis
|
||||
ok mtusi-messenger/internal/storage/postgres 7.210s
|
||||
ok mtusi-messenger/internal/storage/redis 1.192s
|
||||
@@ -0,0 +1,33 @@
|
||||
# Что означает CPU% в `docker stats` на этом стенде
|
||||
|
||||
Колонка `cpu_percent` в `stats-*.csv` снимается через `docker stats`. Чтобы не
|
||||
толковать её наугад, поведение проверено прямым экспериментом на том же Docker-host
|
||||
(Colima, 2 vCPU).
|
||||
|
||||
```sh
|
||||
docker run -d --name lab3-quota-probe --cpus 0.5 alpine:3.20 sh -c 'while :; do :; done'
|
||||
sleep 12
|
||||
docker stats --no-stream --format '{{.Name}} CPU={{.CPUPerc}}' lab3-quota-probe
|
||||
docker exec lab3-quota-probe cat /sys/fs/cgroup/cpu.max
|
||||
```
|
||||
|
||||
```
|
||||
lab3-quota-probe CPU=49.49% MEM=344KiB / 1.913GiB
|
||||
50000 100000
|
||||
```
|
||||
|
||||
Контейнер упёрт в свою квоту (`cpu.max = 50000 100000` — это 0.5 CPU) и показывает
|
||||
**49.49 %**. Значит в этом окружении `docker stats` печатает процент от **одного
|
||||
ядра**: 100 % = 1 ядро, квота 0.5 CPU = ~50 %, квота 0.25 = ~25 %.
|
||||
|
||||
Как это читать в артефактах:
|
||||
|
||||
| сервис | квота | наблюдение в профилях | вывод |
|
||||
| --- | --- | --- | --- |
|
||||
| `postgres` | 0.50 | 45-50.5 % | 0.45-0.5 ядра, то есть **у самой квоты** |
|
||||
| `api` (2 реплики) | 0.50 каждая | ~20 % каждая | 0.2 ядра, квота не выбрана |
|
||||
| `lb` | 0.25 | 11-14 % | 0.11-0.14 ядра, квота не выбрана |
|
||||
|
||||
Отсюда же следует, что разница между профилем `r2` (PostgreSQL 0.50) и `db1cpu`
|
||||
(PostgreSQL 1.00) читается корректно: в `db1cpu` загрузка БД падала до ~46 %, то есть
|
||||
удвоенная квота не была использована — БД не была зажата квотой.
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; failures counted, not raised",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.013,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 97359,
|
||||
"failed_requests": 3,
|
||||
"error_ratio": 3.1e-05,
|
||||
"errors_by_kind": {
|
||||
"http_error": 3
|
||||
},
|
||||
"successful_rps": 1622.308,
|
||||
"successful_latency_ms": {
|
||||
"p50": 4.011,
|
||||
"p95": 8.688,
|
||||
"p99": 23.718
|
||||
},
|
||||
"instances": {
|
||||
"f00a99f95855": 594,
|
||||
"8782633d0431": 48162,
|
||||
"4248067e3f04": 48603
|
||||
},
|
||||
"bootstrap_attempts": 1,
|
||||
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; failures counted, not raised",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.013,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 97359,
|
||||
"failed_requests": 3,
|
||||
"error_ratio": 3.1e-05,
|
||||
"errors_by_kind": {
|
||||
"http_error": 3
|
||||
},
|
||||
"successful_rps": 1622.308,
|
||||
"successful_latency_ms": {
|
||||
"p50": 4.011,
|
||||
"p95": 8.688,
|
||||
"p99": 23.718
|
||||
},
|
||||
"instances": {
|
||||
"f00a99f95855": 594,
|
||||
"8782633d0431": 48162,
|
||||
"4248067e3f04": 48603
|
||||
},
|
||||
"bootstrap_attempts": 1,
|
||||
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
# Rolling update under load (surge, one replica at a time)
|
||||
# generated: 2026-10-16T14:26:39Z
|
||||
# load: tolerant loader, duration=60s concurrency=8
|
||||
# проверки готовности LB: httpchk /health/ready, inter 2s fall 2 rise 2, timeout check 1s
|
||||
|
||||
time="2026-10-16T17:26:40+03:00" level=warning msg="buildx Docker CLI plugin not found: falling back to the classic builder. BuildKit-only build features (multi-arch, secrets, ssh, additional contexts, ...) will not be available"
|
||||
Image mtusi-messenger:lab3 Building
|
||||
Image mtusi-messenger:lab3 Building
|
||||
Sending build context to Docker daemon 238kB␍
|
||||
Step 1/25 : ARG GO_VERSION=1.27.1
|
||||
Step 2/25 : ARG ALPINE_VERSION=3.22
|
||||
Step 3/25 : FROM golang:${GO_VERSION}-alpine AS build
|
||||
---> 8a5910f31396
|
||||
Step 4/25 : ARG TARGETOS
|
||||
---> Using cache
|
||||
---> d5f2c47ea7a5
|
||||
Step 5/25 : ARG TARGETARCH
|
||||
---> Using cache
|
||||
---> 047ee34b445c
|
||||
Step 6/25 : ARG VERSION=dev
|
||||
---> Using cache
|
||||
---> a529d045efeb
|
||||
Step 7/25 : ENV GOTOOLCHAIN=local
|
||||
---> Using cache
|
||||
---> 428f1b16b5c5
|
||||
Step 8/25 : WORKDIR /opt
|
||||
---> Using cache
|
||||
---> f37febf8b423
|
||||
Step 9/25 : COPY go.mod go.sum ./
|
||||
---> Using cache
|
||||
---> c4015f597b99
|
||||
Step 10/25 : RUN go mod download
|
||||
---> Using cache
|
||||
---> 34ef6a6167b0
|
||||
Step 11/25 : ARG GOFLAGS="-p=2"
|
||||
---> Using cache
|
||||
---> deb54a0ce57a
|
||||
Step 12/25 : ENV GOFLAGS=$GOFLAGS
|
||||
---> Using cache
|
||||
---> 3da36569422d
|
||||
Step 13/25 : COPY . .
|
||||
---> 198f052f6cce
|
||||
Step 14/25 : RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/messenger ./cmd/messenger && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/migrate ./cmd/migrate
|
||||
---> Running in 658437823eb9
|
||||
---> Removed intermediate container 658437823eb9
|
||||
---> 10a89d0bb592
|
||||
Step 15/25 : FROM alpine:${ALPINE_VERSION} AS runtime
|
||||
---> 5291449c3df7
|
||||
Step 16/25 : RUN apk add --no-cache ca-certificates wget && addgroup -S -g 10001 app && adduser -S -D -H -u 10001 -G app app
|
||||
---> Using cache
|
||||
---> f47b074d9bd5
|
||||
Step 17/25 : COPY --from=build --chown=10001:10001 /out/messenger /usr/local/bin/messenger
|
||||
---> Using cache
|
||||
---> 703f8f10d2cc
|
||||
Step 18/25 : COPY --from=build --chown=10001:10001 /out/migrate /usr/local/bin/migrate
|
||||
---> Using cache
|
||||
---> c9121622dae2
|
||||
Step 19/25 : COPY --chown=10001:10001 config/dev/config.yaml /etc/messenger/dev/config.yaml
|
||||
---> Using cache
|
||||
---> 0379076307ea
|
||||
Step 20/25 : USER 10001:10001
|
||||
---> Using cache
|
||||
---> 2ff943b7d2e0
|
||||
Step 21/25 : EXPOSE 8080
|
||||
---> Using cache
|
||||
---> 01674ab574a6
|
||||
Step 22/25 : STOPSIGNAL SIGTERM
|
||||
---> Using cache
|
||||
---> 6c30af2a102c
|
||||
Step 23/25 : HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 CMD wget -q -O /dev/null "http://127.0.0.1:${SERVER_PORT:-8080}/health/live" || exit 1
|
||||
---> Using cache
|
||||
---> 76379f8db08d
|
||||
Step 24/25 : ENTRYPOINT ["/usr/local/bin/messenger"]
|
||||
---> Using cache
|
||||
---> 778babec5020
|
||||
Step 25/25 : LABEL com.docker.compose.image.builder=classic
|
||||
---> Using cache
|
||||
---> 9e7e0224c87c
|
||||
Successfully built 9e7e0224c87c
|
||||
Successfully tagged mtusi-messenger:lab3
|
||||
Image mtusi-messenger:lab3 Built
|
||||
Image mtusi-messenger:lab3 Built
|
||||
реплик до обновления: 2
|
||||
образ старых реплик: sha256:9e7e0224c87cee0ccfa05d5799ec8e2a84b836e51fbda6f1dc3d175d5c0d4640
|
||||
образ новой ревизии: sha256:9e7e0224c87cee0ccfa05d5799ec8e2a84b836e51fbda6f1dc3d175d5c0d4640
|
||||
ревизия меняется: нет (образ не изменился)
|
||||
слотов UP до: 3; restarts до: mtusi-messenger-lab3-api-1=0 mtusi-messenger-lab3-api-2=0
|
||||
|
||||
step 1: lb-rollout-1 обслуживает (образ 9e7e0224c87cee0ccfa05d5799ec8e2a84b836e51fbda6f1dc3d175d5c0d4640, instance 8782633d0431), старый контейнер 2ed432da6dd1 (2ed432da6dd1) снят; UP-слотов 3; 5xx накоплено 416; старт шага 2026-10-16T14:27:22Z
|
||||
step 2: lb-rollout-2 обслуживает (образ 9e7e0224c87cee0ccfa05d5799ec8e2a84b836e51fbda6f1dc3d175d5c0d4640, instance 4248067e3f04), старый контейнер f00a99f95855 (f00a99f95855) снят; UP-слотов 4; 5xx накоплено 419; старт шага 2026-10-16T14:27:22Z
|
||||
|
||||
load summary (tolerant generator):
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; failures counted, not raised",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.013,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 97359,
|
||||
"failed_requests": 3,
|
||||
"error_ratio": 3.1e-05,
|
||||
"errors_by_kind": {
|
||||
"http_error": 3
|
||||
},
|
||||
"successful_rps": 1622.308,
|
||||
"successful_latency_ms": {
|
||||
"p50": 4.011,
|
||||
"p95": 8.688,
|
||||
"p99": 23.718
|
||||
},
|
||||
"instances": {
|
||||
"f00a99f95855": 594,
|
||||
"8782633d0431": 48162,
|
||||
"4248067e3f04": 48603
|
||||
},
|
||||
"bootstrap_attempts": 1,
|
||||
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
|
||||
}
|
||||
|
||||
5xx от LB за время обновления (hrsp_5xx frontend): 3
|
||||
restarts после: lb-rollout-2=0 lb-rollout-1=0
|
||||
|
||||
возврат стенда под управление compose:
|
||||
Container mtusi-messenger-lab3-api-2 Creating
|
||||
Container mtusi-messenger-lab3-api-1 Creating
|
||||
Container mtusi-messenger-lab3-api-1 Created
|
||||
Container mtusi-messenger-lab3-api-2 Created
|
||||
Container mtusi-messenger-lab3-api-1 Starting
|
||||
Container mtusi-messenger-lab3-api-1 Started
|
||||
Container mtusi-messenger-lab3-api-2 Starting
|
||||
Container mtusi-messenger-lab3-api-2 Started
|
||||
снято временных контейнеров наплыва: проверено
|
||||
UP-слотов после: 3; restarts в конце: mtusi-messenger-lab3-api-1=0 mtusi-messenger-lab3-api-2=0
|
||||
API containers после обновления:
|
||||
mtusi-messenger-lab3-api-1 Up Less than a second (health: starting)
|
||||
mtusi-messenger-lab3-api-2 Up Less than a second (health: starting)
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; failures counted, not raised",
|
||||
"requested_duration_seconds": 45.0,
|
||||
"elapsed_seconds": 45.014,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 89560,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"errors_by_kind": {},
|
||||
"successful_rps": 1989.584,
|
||||
"successful_latency_ms": {
|
||||
"p50": 3.905,
|
||||
"p95": 6.02,
|
||||
"p99": 7.984
|
||||
},
|
||||
"instances": {
|
||||
"388ebcb74200": 7524,
|
||||
"73d07d7d76db": 45354,
|
||||
"cc6274635bd6": 36682
|
||||
},
|
||||
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; failures counted, not raised",
|
||||
"requested_duration_seconds": 45.0,
|
||||
"elapsed_seconds": 45.014,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 89560,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"errors_by_kind": {},
|
||||
"successful_rps": 1989.584,
|
||||
"successful_latency_ms": {
|
||||
"p50": 3.905,
|
||||
"p95": 6.02,
|
||||
"p99": 7.984
|
||||
},
|
||||
"instances": {
|
||||
"388ebcb74200": 7524,
|
||||
"73d07d7d76db": 45354,
|
||||
"cc6274635bd6": 36682
|
||||
},
|
||||
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
# Rolling update under load
|
||||
# generated: 2026-10-15T19:03:13Z
|
||||
# load: tests/load.py duration=45s concurrency=8 (closed loop)
|
||||
# steps: delete one replica, recreate it from the freshly built image, wait for health + LB
|
||||
|
||||
time="2026-10-15T22:03:13+03:00" level=warning msg="buildx Docker CLI plugin not found: falling back to the classic builder. BuildKit-only build features (multi-arch, secrets, ssh, additional contexts, ...) will not be available"
|
||||
Image mtusi-messenger:lab3 Building
|
||||
Image mtusi-messenger:lab3 Building
|
||||
Sending build context to Docker daemon 213.7kB␍
|
||||
Step 1/25 : ARG GO_VERSION=1.27.1
|
||||
Step 2/25 : ARG ALPINE_VERSION=3.22
|
||||
Step 3/25 : FROM golang:${GO_VERSION}-alpine AS build
|
||||
---> 8a5910f31396
|
||||
Step 4/25 : ARG TARGETOS
|
||||
---> Using cache
|
||||
---> d5f2c47ea7a5
|
||||
Step 5/25 : ARG TARGETARCH
|
||||
---> Using cache
|
||||
---> 047ee34b445c
|
||||
Step 6/25 : ARG VERSION=dev
|
||||
---> Using cache
|
||||
---> a529d045efeb
|
||||
Step 7/25 : ENV GOTOOLCHAIN=local
|
||||
---> Using cache
|
||||
---> 428f1b16b5c5
|
||||
Step 8/25 : WORKDIR /opt
|
||||
---> Using cache
|
||||
---> f37febf8b423
|
||||
Step 9/25 : COPY go.mod go.sum ./
|
||||
---> Using cache
|
||||
---> c4015f597b99
|
||||
Step 10/25 : RUN go mod download
|
||||
---> Using cache
|
||||
---> 34ef6a6167b0
|
||||
Step 11/25 : ARG GOFLAGS="-p=2"
|
||||
---> Using cache
|
||||
---> deb54a0ce57a
|
||||
Step 12/25 : ENV GOFLAGS=$GOFLAGS
|
||||
---> Using cache
|
||||
---> 3da36569422d
|
||||
Step 13/25 : COPY . .
|
||||
---> Using cache
|
||||
---> 596dc1ab02d1
|
||||
Step 14/25 : RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/messenger ./cmd/messenger && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/migrate ./cmd/migrate
|
||||
---> Using cache
|
||||
---> 01aa8bc6200d
|
||||
Step 15/25 : FROM alpine:${ALPINE_VERSION} AS runtime
|
||||
---> 5291449c3df7
|
||||
Step 16/25 : RUN apk add --no-cache ca-certificates wget && addgroup -S -g 10001 app && adduser -S -D -H -u 10001 -G app app
|
||||
---> Using cache
|
||||
---> f47b074d9bd5
|
||||
Step 17/25 : COPY --from=build --chown=10001:10001 /out/messenger /usr/local/bin/messenger
|
||||
---> Using cache
|
||||
---> 50fc6abe3b04
|
||||
Step 18/25 : COPY --from=build --chown=10001:10001 /out/migrate /usr/local/bin/migrate
|
||||
---> Using cache
|
||||
---> 9bf6afe0256d
|
||||
Step 19/25 : COPY --chown=10001:10001 config/dev/config.yaml /etc/messenger/dev/config.yaml
|
||||
---> Using cache
|
||||
---> 0d1870a325ec
|
||||
Step 20/25 : USER 10001:10001
|
||||
---> Using cache
|
||||
---> 1991f2ae06cc
|
||||
Step 21/25 : EXPOSE 8080
|
||||
---> Using cache
|
||||
---> 762d1bfb7606
|
||||
Step 22/25 : STOPSIGNAL SIGTERM
|
||||
---> Using cache
|
||||
---> 8a9d8f4f7101
|
||||
Step 23/25 : HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 CMD wget -q -O /dev/null "http://127.0.0.1:${SERVER_PORT:-8080}/health/live" || exit 1
|
||||
---> Using cache
|
||||
---> 65dea502a3f3
|
||||
Step 24/25 : ENTRYPOINT ["/usr/local/bin/messenger"]
|
||||
---> Using cache
|
||||
---> 83bbee72905e
|
||||
Step 25/25 : LABEL com.docker.compose.image.builder=classic
|
||||
---> Using cache
|
||||
---> 037f969d5ea1
|
||||
Successfully built 037f969d5ea1
|
||||
Successfully tagged mtusi-messenger:lab3
|
||||
Image mtusi-messenger:lab3 Built
|
||||
Image mtusi-messenger:lab3 Built
|
||||
Container mtusi-messenger-lab3-api-13 Recreate
|
||||
Container mtusi-messenger-lab3-api-14 Recreate
|
||||
Container mtusi-messenger-lab3-api-13 Recreated
|
||||
Container mtusi-messenger-lab3-api-14 Recreated
|
||||
Container mtusi-messenger-lab3-api-14 Starting
|
||||
Container mtusi-messenger-lab3-api-14 Started
|
||||
Container mtusi-messenger-lab3-api-13 Starting
|
||||
Container mtusi-messenger-lab3-api-13 Started
|
||||
replicas before: 2; instances seen through LB: 2
|
||||
Container mtusi-messenger-lab3-api-13 Running
|
||||
Container mtusi-messenger-lab3-api-14 Creating
|
||||
Container mtusi-messenger-lab3-api-14 Created
|
||||
Container mtusi-messenger-lab3-api-14 Starting
|
||||
Container mtusi-messenger-lab3-api-14 Started
|
||||
step 1: removed 54a7e7888b5f at 2026-10-15T19:03:20Z, 2 healthy replicas served again at 2026-10-15T19:03:26Z
|
||||
Container mtusi-messenger-lab3-api-14 Running
|
||||
Container mtusi-messenger-lab3-api-15 Creating
|
||||
Container mtusi-messenger-lab3-api-15 Created
|
||||
Container mtusi-messenger-lab3-api-15 Starting
|
||||
Container mtusi-messenger-lab3-api-15 Started
|
||||
step 2: removed 388ebcb74200 at 2026-10-15T19:03:26Z, 2 healthy replicas served again at 2026-10-15T19:03:31Z
|
||||
|
||||
load summary (tolerant generator):
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; failures counted, not raised",
|
||||
"requested_duration_seconds": 45.0,
|
||||
"elapsed_seconds": 45.014,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 89560,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"errors_by_kind": {},
|
||||
"successful_rps": 1989.584,
|
||||
"successful_latency_ms": {
|
||||
"p50": 3.905,
|
||||
"p95": 6.02,
|
||||
"p99": 7.984
|
||||
},
|
||||
"instances": {
|
||||
"388ebcb74200": 7524,
|
||||
"73d07d7d76db": 45354,
|
||||
"cc6274635bd6": 36682
|
||||
},
|
||||
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
|
||||
}
|
||||
|
||||
LB responses with 5xx during the update: 0
|
||||
|
||||
API containers after the update:
|
||||
mtusi-messenger-lab3-api-15 Up 41 seconds (healthy)
|
||||
mtusi-messenger-lab3-api-14 Up 46 seconds (healthy)
|
||||
@@ -0,0 +1,3 @@
|
||||
# make test — 2026-10-16T14:07:37Z (final image)
|
||||
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/smoke.py --base-url "http://localhost:8080"
|
||||
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,34 @@
|
||||
# Lab3 stand evidence
|
||||
# generated: 2026-10-16T13:38:19Z
|
||||
|
||||
## docker ps (ports)
|
||||
mtusi-messenger-lab3-api-6 | 8080/tcp
|
||||
mtusi-messenger-lab3-api-5 | 8080/tcp
|
||||
mtusi-messenger-lab3-lb-1 | 127.0.0.1:8404->8404/tcp, 127.0.0.1:8080->80/tcp
|
||||
mtusi-messenger-lab3-postgres-1 | 5432/tcp
|
||||
mtusi-messenger-lab3-redis-1 | 6379/tcp
|
||||
|
||||
## compose config: limits/replicas/published
|
||||
api:
|
||||
replicas: 2
|
||||
cpus: 0.5
|
||||
memory: "268435456"
|
||||
lb:
|
||||
cpus: 0.25
|
||||
memory: "67108864"
|
||||
published: "8080"
|
||||
published: "8404"
|
||||
migrate:
|
||||
cpus: 0.5
|
||||
memory: "268435456"
|
||||
postgres:
|
||||
cpus: 0.5
|
||||
memory: "402653184"
|
||||
redis:
|
||||
cpus: 0.25
|
||||
memory: "201326592"
|
||||
default:
|
||||
build:
|
||||
image: mtusi-messenger:lab3
|
||||
|
||||
container_name: absent
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.082,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 83581,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1391.108,
|
||||
"successful_latency_ms": {
|
||||
"p50": 5.571,
|
||||
"p95": 9.03,
|
||||
"p99": 11.692
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.072,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 83599,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1391.647,
|
||||
"successful_latency_ms": {
|
||||
"p50": 5.575,
|
||||
"p95": 8.994,
|
||||
"p99": 11.512
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.078,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 81711,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1360.087,
|
||||
"successful_latency_ms": {
|
||||
"p50": 5.664,
|
||||
"p95": 9.482,
|
||||
"p99": 12.322
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.074,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 81688,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1359.794,
|
||||
"successful_latency_ms": {
|
||||
"p50": 5.688,
|
||||
"p95": 9.37,
|
||||
"p99": 12.032
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.068,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 83445,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1389.179,
|
||||
"successful_latency_ms": {
|
||||
"p50": 5.585,
|
||||
"p95": 9.054,
|
||||
"p99": 11.711
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.077,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 76301,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1270.045,
|
||||
"successful_latency_ms": {
|
||||
"p50": 6.057,
|
||||
"p95": 10.141,
|
||||
"p99": 13.724
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.064,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 89486,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1489.856,
|
||||
"successful_latency_ms": {
|
||||
"p50": 5.238,
|
||||
"p95": 8.245,
|
||||
"p99": 10.54
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.071,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 89886,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1496.325,
|
||||
"successful_latency_ms": {
|
||||
"p50": 5.207,
|
||||
"p95": 8.221,
|
||||
"p99": 10.508
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 60.0,
|
||||
"elapsed_seconds": 60.061,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 89566,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1491.252,
|
||||
"successful_latency_ms": {
|
||||
"p50": 5.251,
|
||||
"p95": 8.176,
|
||||
"p99": 10.209
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user