Реализовать лабораторную работу 5
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
.venv/bin/python 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.
|
||||
.venv/bin/python tests/smoke.py --base-url "http://localhost:18085"
|
||||
FAIL: GET /api/v1/attachments/bb21267f-b7da-491b-96b3-7f55f8c3d884: expected [200], received 503
|
||||
make: *** [test] Error 1
|
||||
.venv/bin/python tests/smoke.py --base-url "http://localhost:18085"
|
||||
PASS: lab5 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,6 @@
|
||||
.venv/bin/python 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.
|
||||
.venv/bin/python tests/smoke.py --base-url "http://localhost:18085"
|
||||
PASS: lab5 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,67 @@
|
||||
Local secrets ready
|
||||
#0 building with "desktop-linux" instance using docker driver
|
||||
|
||||
#1 [internal] load build definition from Dockerfile
|
||||
#1 transferring dockerfile: 969B done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [internal] load metadata for mcr.microsoft.com/dotnet/sdk:9.0.306
|
||||
#2 DONE 0.6s
|
||||
|
||||
#3 [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:9.0.10
|
||||
#3 DONE 0.6s
|
||||
|
||||
#4 [internal] load .dockerignore
|
||||
#4 transferring context: 218B done
|
||||
#4 DONE 0.0s
|
||||
|
||||
#5 [build 1/6] FROM mcr.microsoft.com/dotnet/sdk:9.0.306@sha256:81f6d622fe21ed9d31375167f62a3538ff4d6835f9d5e6da9c2defa8a84b7687
|
||||
#5 resolve mcr.microsoft.com/dotnet/sdk:9.0.306@sha256:81f6d622fe21ed9d31375167f62a3538ff4d6835f9d5e6da9c2defa8a84b7687 0.0s done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [runtime 1/4] FROM mcr.microsoft.com/dotnet/aspnet:9.0.10@sha256:3dcb33395722d14c80d19107158293ed677b2c07841100d51df07275ae2b2682
|
||||
#6 resolve mcr.microsoft.com/dotnet/aspnet:9.0.10@sha256:3dcb33395722d14c80d19107158293ed677b2c07841100d51df07275ae2b2682 0.0s done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#7 [internal] load build context
|
||||
#7 transferring context: 420.67kB 0.0s done
|
||||
#7 DONE 0.0s
|
||||
|
||||
#8 [build 3/6] COPY src/Messenger.Api/Messenger.Api.csproj src/Messenger.Api/
|
||||
#8 CACHED
|
||||
|
||||
#9 [runtime 2/4] RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
|
||||
#9 CACHED
|
||||
|
||||
#10 [runtime 3/4] WORKDIR /app
|
||||
#10 CACHED
|
||||
|
||||
#11 [build 4/6] RUN dotnet restore src/Messenger.Api/Messenger.Api.csproj
|
||||
#11 CACHED
|
||||
|
||||
#12 [build 6/6] RUN dotnet publish src/Messenger.Api/Messenger.Api.csproj -c Release --no-restore -o /app/publish
|
||||
#12 CACHED
|
||||
|
||||
#13 [build 2/6] WORKDIR /src
|
||||
#13 CACHED
|
||||
|
||||
#14 [build 5/6] COPY src/Messenger.Api/ src/Messenger.Api/
|
||||
#14 CACHED
|
||||
|
||||
#15 [runtime 4/4] COPY --from=build /app/publish .
|
||||
#15 CACHED
|
||||
|
||||
#16 exporting to image
|
||||
#16 exporting layers done
|
||||
#16 exporting manifest sha256:8032c23ca82abca0a98189e25912a472fa9f9766aaadfb1dc72e3a8ffd87797d done
|
||||
#16 exporting config sha256:6d5f902dbe672c56753a47a14e780cedd15d0a6134b91f7e1bfcb0da75d784e6 0.0s done
|
||||
#16 exporting attestation manifest sha256:1c91c52f053bf7e2022c725dfdc1906fc181127ae049e472f4f61cbc5255c452 0.0s done
|
||||
#16 exporting manifest list sha256:bc7b3964de3dcbf7f81a4313518695817ae781561b99f22cf02e8114b41271ba 0.0s done
|
||||
#16 naming to docker.io/library/messenger-lab5:clean-check done
|
||||
#16 unpacking to docker.io/library/messenger-lab5:clean-check
|
||||
#16 unpacking to docker.io/library/messenger-lab5:clean-check done
|
||||
#16 DONE 0.1s
|
||||
|
||||
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/mwlwenbjkzp9ukzg8a92tezj0
|
||||
|
||||
PASS: isolated source context, fresh generated secrets, compose config and Docker build. No existing .env, volumes or build outputs copied.
|
||||
@@ -0,0 +1,55 @@
|
||||
.venv/bin/python tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:18085"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 118, "failed_attempts": 1, "first_recovery_seconds": 1.87}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi2026lab5-api-2 messenger-lab5:local "dotnet Messenger.Ap…" api 3 minutes ago Up 30 seconds (healthy) 8080/tcp
|
||||
mtusi2026lab5-broker-1 rabbitmq:4.2.0-alpine "docker-entrypoint.s…" broker 15 minutes ago Up 54 seconds (healthy) 4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp
|
||||
mtusi2026lab5-dispatcher-1 messenger-lab5:local "dotnet Messenger.Ap…" dispatcher About a minute ago Up 30 seconds 8080/tcp
|
||||
mtusi2026lab5-lb-1 haproxy:3.2.7-alpine "docker-entrypoint.s…" lb 15 minutes ago Up 30 seconds (healthy) 127.0.0.1:18085->8080/tcp
|
||||
mtusi2026lab5-postgres-1 postgres:17.6 "docker-entrypoint.s…" postgres 15 minutes ago Up 55 seconds (healthy) 5432/tcp
|
||||
mtusi2026lab5-redis-1 redis:7.4.2-alpine "docker-entrypoint.s…" redis 15 minutes ago Up 55 seconds (healthy) 6379/tcp
|
||||
mtusi2026lab5-s3-1 chrislusf/seaweedfs:3.97 "/entrypoint.sh serv…" s3 7 minutes ago Up 52 seconds (healthy) 7333/tcp, 8080/tcp, 8333/tcp, 8888/tcp, 9333/tcp, 18080/tcp, 18888/tcp, 19333/tcp
|
||||
mtusi2026lab5-worker-1 messenger-lab5:local "dotnet Messenger.Ap…" worker About a minute ago Up 30 seconds 8080/tcp
|
||||
./scripts/compose.sh up -d --wait api lb
|
||||
Container mtusi2026lab5-redis-1 Running
|
||||
Container mtusi2026lab5-api-2 Running
|
||||
Container mtusi2026lab5-s3-1 Running
|
||||
Container mtusi2026lab5-lb-1 Running
|
||||
Container mtusi2026lab5-postgres-1 Running
|
||||
Container mtusi2026lab5-s3-1 Waiting
|
||||
Container mtusi2026lab5-postgres-1 Waiting
|
||||
Container mtusi2026lab5-s3-1 Healthy
|
||||
Container mtusi2026lab5-postgres-1 Healthy
|
||||
Container mtusi2026lab5-s3-bootstrap-1 Starting
|
||||
Container mtusi2026lab5-migrate-1 Starting
|
||||
Container mtusi2026lab5-s3-bootstrap-1 Started
|
||||
Container mtusi2026lab5-migrate-1 Started
|
||||
Container mtusi2026lab5-migrate-1 Waiting
|
||||
Container mtusi2026lab5-redis-1 Waiting
|
||||
Container mtusi2026lab5-s3-bootstrap-1 Waiting
|
||||
Container mtusi2026lab5-redis-1 Healthy
|
||||
Container mtusi2026lab5-migrate-1 Exited
|
||||
Container mtusi2026lab5-s3-bootstrap-1 Exited
|
||||
Container mtusi2026lab5-api-1 Starting
|
||||
Container mtusi2026lab5-api-1 Started
|
||||
Container mtusi2026lab5-api-2 Waiting
|
||||
Container mtusi2026lab5-api-1 Waiting
|
||||
Container mtusi2026lab5-api-2 Healthy
|
||||
Container mtusi2026lab5-api-1 Healthy
|
||||
Container mtusi2026lab5-s3-bootstrap-1 Waiting
|
||||
Container mtusi2026lab5-postgres-1 Waiting
|
||||
Container mtusi2026lab5-redis-1 Waiting
|
||||
Container mtusi2026lab5-api-2 Waiting
|
||||
Container mtusi2026lab5-api-1 Waiting
|
||||
Container mtusi2026lab5-migrate-1 Waiting
|
||||
Container mtusi2026lab5-s3-1 Waiting
|
||||
Container mtusi2026lab5-lb-1 Waiting
|
||||
Container mtusi2026lab5-migrate-1 Exited
|
||||
Container mtusi2026lab5-lb-1 Healthy
|
||||
Container mtusi2026lab5-s3-bootstrap-1 Exited
|
||||
Container mtusi2026lab5-redis-1 Healthy
|
||||
Container mtusi2026lab5-s3-1 Healthy
|
||||
Container mtusi2026lab5-postgres-1 Healthy
|
||||
Container mtusi2026lab5-api-2 Healthy
|
||||
Container mtusi2026lab5-api-1 Healthy
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"job_id": "3590b5cc-4392-4c8e-819f-a44e67ca7c64",
|
||||
"type": "attachment.process.v1",
|
||||
"attachment_id": "80fc41c9-e25b-4bcb-8475-e08d62822e78",
|
||||
"pipeline_version": 1,
|
||||
"attempt": 1,
|
||||
"created_at": "2026-11-09T22:22:38.7816100Z"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
.venv/bin/python student-tests/overload_research.py --base-url "http://localhost:18085"
|
||||
run 1/18: small, 1/1, 4.41 ready/s
|
||||
run 2/18: small, 2/2, 3.62 ready/s
|
||||
run 3/18: small, 4/4, 3.91 ready/s
|
||||
run 4/18: large, 1/1, 0.78 ready/s
|
||||
run 5/18: large, 2/2, 0.95 ready/s
|
||||
run 6/18: large, 4/4, 0.81 ready/s
|
||||
run 7/18: large, 2/2, 0.99 ready/s
|
||||
run 8/18: large, 4/4, 0.97 ready/s
|
||||
run 9/18: large, 1/1, 0.88 ready/s
|
||||
run 10/18: small, 2/2, 3.57 ready/s
|
||||
run 11/18: small, 4/4, 3.62 ready/s
|
||||
run 12/18: small, 1/1, 4.65 ready/s
|
||||
run 13/18: small, 4/4, 3.90 ready/s
|
||||
run 14/18: small, 1/1, 3.86 ready/s
|
||||
run 15/18: small, 2/2, 4.66 ready/s
|
||||
run 16/18: large, 4/4, 0.69 ready/s
|
||||
run 17/18: large, 1/1, 0.81 ready/s
|
||||
run 18/18: large, 2/2, 0.73 ready/s
|
||||
PASS: overload research and bounded admission
|
||||
@@ -0,0 +1,14 @@
|
||||
.venv/bin/python student-tests/overload_research.py --base-url "http://localhost:18085"
|
||||
run 1/18: small, 1/1, 4.60 ready/s
|
||||
run 2/18: small, 2/2, 4.06 ready/s
|
||||
run 3/18: small, 4/4, 0.84 ready/s
|
||||
run 4/18: large, 1/1, 0.86 ready/s
|
||||
FAIL: Infrastructure command failed: 2cad4d5d_mtusi2026lab5-api-2 Stopping
|
||||
Container 74e89bf6ba55_mtusi2026lab5-worker-1 Recreate
|
||||
Container 5c6d2cad4d5d_mtusi2026lab5-api-2 Stopped
|
||||
Container 5c6d2cad4d5d_mtusi2026lab5-api-2 Removing
|
||||
Container mtusi2026lab5-api-2 Error response from daemon: No such container: 5c6d2cad4d5db9f150fce5fc6f432103bddadddad8b1bf0d5f723466384f4843
|
||||
Container mtusi2026lab5-api-2 Removing
|
||||
Error response from daemon: No such container: 5c6d2cad4d5db9f150fce5fc6f432103bddadddad8b1bf0d5f723466384f4843
|
||||
|
||||
make: *** [research-grade5] Error 1
|
||||
@@ -0,0 +1,693 @@
|
||||
{
|
||||
"hypothesis": "With fixed worker CPU, more simultaneous image processes need not improve throughput and can increase RSS; bounded admission protects the queue when the worker stops.",
|
||||
"profile": {
|
||||
"settings": [
|
||||
[
|
||||
1,
|
||||
1
|
||||
],
|
||||
[
|
||||
2,
|
||||
2
|
||||
],
|
||||
[
|
||||
4,
|
||||
4
|
||||
]
|
||||
],
|
||||
"repeats": 3,
|
||||
"batch": 8,
|
||||
"upload_clients": 4,
|
||||
"worker_cpu": 1,
|
||||
"worker_memory_limit_mib": 1024,
|
||||
"warmup_images": 1,
|
||||
"image_sizes_bytes": {
|
||||
"small": 111817,
|
||||
"large": 3319965
|
||||
}
|
||||
},
|
||||
"runs": [
|
||||
{
|
||||
"repeat": 1,
|
||||
"image": "small",
|
||||
"concurrency": 1,
|
||||
"prefetch": 1,
|
||||
"successful_jobs": 8,
|
||||
"errors": 0,
|
||||
"seconds": 1.7385662909946404,
|
||||
"throughput": 4.601492644507199,
|
||||
"p95_ready_seconds": 1.355825,
|
||||
"p95_queue_lag_seconds": 1.221817,
|
||||
"peak_rss_bytes": 152162304,
|
||||
"peak_cgroup_memory_bytes": 53309440,
|
||||
"worker_cpu_seconds": 1.329851,
|
||||
"requests": [
|
||||
{
|
||||
"upload_seconds": 0.04113916699861875,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.10876779200043529,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.12739412499649916,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.1493414579963428,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.11392083399550756,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.05546583300019847,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.04235250000056112,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.02778862499690149,
|
||||
"status": 202
|
||||
}
|
||||
],
|
||||
"jobs": [
|
||||
{
|
||||
"id": "d2b88786-66d5-44f9-8398-afd799333b0d",
|
||||
"ready_seconds": 0.27748,
|
||||
"queue_lag_seconds": 0.115927,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "746abbed-2f2a-44a7-8054-8e2fb4e40d60",
|
||||
"ready_seconds": 0.405159,
|
||||
"queue_lag_seconds": 0.269961,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "a4fbcad3-77a5-402f-8ce9-a286c3c50998",
|
||||
"ready_seconds": 0.52426,
|
||||
"queue_lag_seconds": 0.395915,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "bbc83e93-f179-4f84-a5a1-4bfb334ecf5d",
|
||||
"ready_seconds": 0.629692,
|
||||
"queue_lag_seconds": 0.459954,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "8d5f7573-9a93-4f75-9871-fe57beaafa15",
|
||||
"ready_seconds": 0.909593,
|
||||
"queue_lag_seconds": 0.620331,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "8280ed8d-da55-40a0-bde3-36ee21893e72",
|
||||
"ready_seconds": 1.068921,
|
||||
"queue_lag_seconds": 0.902328,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "d8dbae97-6243-4f95-b9cc-4a3e8fdfefbb",
|
||||
"ready_seconds": 1.225459,
|
||||
"queue_lag_seconds": 1.068507,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "dcd72436-5215-4aca-900d-74767f0385b2",
|
||||
"ready_seconds": 1.355825,
|
||||
"queue_lag_seconds": 1.221817,
|
||||
"attempts": 1
|
||||
}
|
||||
],
|
||||
"samples": [
|
||||
{
|
||||
"time": 1794262118.743776,
|
||||
"memory_bytes": 42041344,
|
||||
"cpu_usec": 795694,
|
||||
"rss_bytes": 103636992
|
||||
},
|
||||
{
|
||||
"time": 1794262119.0674748,
|
||||
"memory_bytes": 48332800,
|
||||
"cpu_usec": 1134009,
|
||||
"rss_bytes": 127852544
|
||||
},
|
||||
{
|
||||
"time": 1794262119.545117,
|
||||
"memory_bytes": 50176000,
|
||||
"cpu_usec": 1544976,
|
||||
"rss_bytes": 152162304
|
||||
},
|
||||
{
|
||||
"time": 1794262119.89533,
|
||||
"memory_bytes": 53309440,
|
||||
"cpu_usec": 1889921,
|
||||
"rss_bytes": 147939328
|
||||
},
|
||||
{
|
||||
"time": 1794262120.2800698,
|
||||
"memory_bytes": 46026752,
|
||||
"cpu_usec": 2125545,
|
||||
"rss_bytes": 107089920
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"repeat": 1,
|
||||
"image": "small",
|
||||
"concurrency": 2,
|
||||
"prefetch": 2,
|
||||
"successful_jobs": 8,
|
||||
"errors": 0,
|
||||
"seconds": 1.969336124995607,
|
||||
"throughput": 4.062282663919469,
|
||||
"p95_ready_seconds": 1.525365,
|
||||
"p95_queue_lag_seconds": 1.016688,
|
||||
"peak_rss_bytes": 219119616,
|
||||
"peak_cgroup_memory_bytes": 62783488,
|
||||
"worker_cpu_seconds": 1.534243,
|
||||
"requests": [
|
||||
{
|
||||
"upload_seconds": 0.03250100000150269,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.044958750004298054,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.05604845799825853,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.06452524999622256,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.0502204169970355,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.04115625000122236,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.03952566699445015,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.0422521250002319,
|
||||
"status": 202
|
||||
}
|
||||
],
|
||||
"jobs": [
|
||||
{
|
||||
"id": "9353ef12-3388-4f17-a52e-7788d9631d5e",
|
||||
"ready_seconds": 0.394761,
|
||||
"queue_lag_seconds": 0.116528,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "5ff9fdf3-e9e6-446e-95c7-978c9b3fd22b",
|
||||
"ready_seconds": 0.404182,
|
||||
"queue_lag_seconds": 0.129876,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "314ef166-fd5e-4c85-abf7-15185aea7576",
|
||||
"ready_seconds": 0.692893,
|
||||
"queue_lag_seconds": 0.388414,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "52a91f37-b649-4896-8051-5f39802fb3ad",
|
||||
"ready_seconds": 0.751849,
|
||||
"queue_lag_seconds": 0.382157,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "052cd532-0568-47b6-a95c-e35bc68c6d81",
|
||||
"ready_seconds": 0.976998,
|
||||
"queue_lag_seconds": 0.669662,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "5df94c7d-97a6-4ca1-a3bb-c663ea5a7e41",
|
||||
"ready_seconds": 1.032436,
|
||||
"queue_lag_seconds": 0.738607,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "926d6d55-a9b6-408f-a7e2-2bf2b98871b0",
|
||||
"ready_seconds": 1.523118,
|
||||
"queue_lag_seconds": 1.005413,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "dad6cf86-7200-4468-b927-aca54ae14db9",
|
||||
"ready_seconds": 1.525365,
|
||||
"queue_lag_seconds": 1.016688,
|
||||
"attempts": 1
|
||||
}
|
||||
],
|
||||
"samples": [
|
||||
{
|
||||
"time": 1794262122.505246,
|
||||
"memory_bytes": 42008576,
|
||||
"cpu_usec": 782744,
|
||||
"rss_bytes": 103116800
|
||||
},
|
||||
{
|
||||
"time": 1794262122.863539,
|
||||
"memory_bytes": 54919168,
|
||||
"cpu_usec": 1204770,
|
||||
"rss_bytes": 161333248
|
||||
},
|
||||
{
|
||||
"time": 1794262123.2467399,
|
||||
"memory_bytes": 57008128,
|
||||
"cpu_usec": 1566113,
|
||||
"rss_bytes": 175915008
|
||||
},
|
||||
{
|
||||
"time": 1794262123.8038552,
|
||||
"memory_bytes": 62783488,
|
||||
"cpu_usec": 2036485,
|
||||
"rss_bytes": 219119616
|
||||
},
|
||||
{
|
||||
"time": 1794262124.115168,
|
||||
"memory_bytes": 45998080,
|
||||
"cpu_usec": 2316987,
|
||||
"rss_bytes": 106729472
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"repeat": 1,
|
||||
"image": "small",
|
||||
"concurrency": 4,
|
||||
"prefetch": 4,
|
||||
"successful_jobs": 8,
|
||||
"errors": 0,
|
||||
"seconds": 9.549317416000122,
|
||||
"throughput": 0.8377562135065066,
|
||||
"p95_ready_seconds": 9.209337,
|
||||
"p95_queue_lag_seconds": 7.286448,
|
||||
"peak_rss_bytes": 289599488,
|
||||
"peak_cgroup_memory_bytes": 87416832,
|
||||
"worker_cpu_seconds": 5.107425,
|
||||
"requests": [
|
||||
{
|
||||
"upload_seconds": 0.03872108399809804,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.06579587499436457,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.08007283299957635,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.09368379199440824,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.040345542001887225,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.07635662500251783,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.032701916999940295,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.05977749999874504,
|
||||
"status": 202
|
||||
}
|
||||
],
|
||||
"jobs": [
|
||||
{
|
||||
"id": "c70a41eb-b3da-40f7-9669-fbc0adf914d1",
|
||||
"ready_seconds": 9.074966,
|
||||
"queue_lag_seconds": 7.278132,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "e799ce82-e00a-4e15-aacc-daa6fa757335",
|
||||
"ready_seconds": 9.150763,
|
||||
"queue_lag_seconds": 7.224741,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "d248b714-1eeb-4668-b497-4a30b3b0aad8",
|
||||
"ready_seconds": 9.16808,
|
||||
"queue_lag_seconds": 7.267137,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "a540b150-be0e-4d38-9077-92802293c12d",
|
||||
"ready_seconds": 9.209337,
|
||||
"queue_lag_seconds": 7.286448,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "d62a309a-a54e-4a7d-aebc-864fd251bed4",
|
||||
"ready_seconds": 7.164243,
|
||||
"queue_lag_seconds": 0.116455,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "063093ae-38a4-4fc4-a841-d3e5db5624b3",
|
||||
"ready_seconds": 7.164926,
|
||||
"queue_lag_seconds": 0.135483,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "06613954-2472-4efe-b2a7-42644a1d8a30",
|
||||
"ready_seconds": 7.149471,
|
||||
"queue_lag_seconds": 0.127605,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "f593fbcd-f166-4e3e-9d89-09faeaa592bb",
|
||||
"ready_seconds": 7.127115,
|
||||
"queue_lag_seconds": 0.132045,
|
||||
"attempts": 1
|
||||
}
|
||||
],
|
||||
"samples": [
|
||||
{
|
||||
"time": 1794262126.910836,
|
||||
"memory_bytes": 44044288,
|
||||
"cpu_usec": 1063223,
|
||||
"rss_bytes": 143413248
|
||||
},
|
||||
{
|
||||
"time": 1794262127.9235861,
|
||||
"memory_bytes": 87416832,
|
||||
"cpu_usec": 1873587,
|
||||
"rss_bytes": 284831744
|
||||
},
|
||||
{
|
||||
"time": 1794262130.018199,
|
||||
"memory_bytes": 42848256,
|
||||
"cpu_usec": 3399041,
|
||||
"rss_bytes": 106557440
|
||||
},
|
||||
{
|
||||
"time": 1794262130.52949,
|
||||
"memory_bytes": 43167744,
|
||||
"cpu_usec": 3541243,
|
||||
"rss_bytes": 106573824
|
||||
},
|
||||
{
|
||||
"time": 1794262131.362358,
|
||||
"memory_bytes": 42827776,
|
||||
"cpu_usec": 3715963,
|
||||
"rss_bytes": 106573824
|
||||
},
|
||||
{
|
||||
"time": 1794262133.449707,
|
||||
"memory_bytes": 44789760,
|
||||
"cpu_usec": 4203236,
|
||||
"rss_bytes": 108687360
|
||||
},
|
||||
{
|
||||
"time": 1794262133.8703759,
|
||||
"memory_bytes": 47022080,
|
||||
"cpu_usec": 4272996,
|
||||
"rss_bytes": 108298240
|
||||
},
|
||||
{
|
||||
"time": 1794262134.622085,
|
||||
"memory_bytes": 77737984,
|
||||
"cpu_usec": 5000530,
|
||||
"rss_bytes": 289599488
|
||||
},
|
||||
{
|
||||
"time": 1794262135.440066,
|
||||
"memory_bytes": 55914496,
|
||||
"cpu_usec": 5808140,
|
||||
"rss_bytes": 108367872
|
||||
},
|
||||
{
|
||||
"time": 1794262135.956406,
|
||||
"memory_bytes": 44863488,
|
||||
"cpu_usec": 6170648,
|
||||
"rss_bytes": 109416448
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"repeat": 1,
|
||||
"image": "large",
|
||||
"concurrency": 1,
|
||||
"prefetch": 1,
|
||||
"successful_jobs": 8,
|
||||
"errors": 0,
|
||||
"seconds": 9.295377750000625,
|
||||
"throughput": 0.8606428071198572,
|
||||
"p95_ready_seconds": 7.433391,
|
||||
"p95_queue_lag_seconds": 6.388493,
|
||||
"peak_rss_bytes": 193171456,
|
||||
"peak_cgroup_memory_bytes": 102318080,
|
||||
"worker_cpu_seconds": 7.074789,
|
||||
"requests": [
|
||||
{
|
||||
"upload_seconds": 0.7639207920001354,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.9345893749996321,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 1.1469821249993402,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 1.436994916999538,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.7003262910002377,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.9740857910001068,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.39281854200089583,
|
||||
"status": 202
|
||||
},
|
||||
{
|
||||
"upload_seconds": 0.8782962080003927,
|
||||
"status": 202
|
||||
}
|
||||
],
|
||||
"jobs": [
|
||||
{
|
||||
"id": "2be2644d-861c-43c4-8085-5fbba90a4d64",
|
||||
"ready_seconds": 1.712623,
|
||||
"queue_lag_seconds": 0.363585,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "ad0083b2-3bf8-4f42-8043-4a57ad7b84a9",
|
||||
"ready_seconds": 2.629908,
|
||||
"queue_lag_seconds": 1.699148,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "407c2a2e-e5aa-4437-ab5b-49a2ec05829b",
|
||||
"ready_seconds": 3.021709,
|
||||
"queue_lag_seconds": 2.407417,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "854309f9-5d4f-4305-ad65-bcb005b3844f",
|
||||
"ready_seconds": 3.852419,
|
||||
"queue_lag_seconds": 2.844126,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "fae78450-5058-4101-8cd9-4dcbcecd9e2c",
|
||||
"ready_seconds": 4.70857,
|
||||
"queue_lag_seconds": 3.753701,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "fe283bf1-cdff-4ee2-867d-369338758dd4",
|
||||
"ready_seconds": 5.265006,
|
||||
"queue_lag_seconds": 4.502767,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "86228db3-70a0-4118-bd9c-1f0aeb13ccf4",
|
||||
"ready_seconds": 6.477127,
|
||||
"queue_lag_seconds": 5.104128,
|
||||
"attempts": 1
|
||||
},
|
||||
{
|
||||
"id": "3fea2d31-ad7b-4282-b815-23adaa068c7a",
|
||||
"ready_seconds": 7.433391,
|
||||
"queue_lag_seconds": 6.388493,
|
||||
"attempts": 1
|
||||
}
|
||||
],
|
||||
"samples": [
|
||||
{
|
||||
"time": 1794262140.0249028,
|
||||
"memory_bytes": 41619456,
|
||||
"cpu_usec": 1623573,
|
||||
"rss_bytes": 106139648
|
||||
},
|
||||
{
|
||||
"time": 1794262140.4498188,
|
||||
"memory_bytes": 41545728,
|
||||
"cpu_usec": 1659252,
|
||||
"rss_bytes": 106139648
|
||||
},
|
||||
{
|
||||
"time": 1794262140.9149399,
|
||||
"memory_bytes": 60805120,
|
||||
"cpu_usec": 2022910,
|
||||
"rss_bytes": 150097920
|
||||
},
|
||||
{
|
||||
"time": 1794262141.32444,
|
||||
"memory_bytes": 88137728,
|
||||
"cpu_usec": 2454146,
|
||||
"rss_bytes": 191004672
|
||||
},
|
||||
{
|
||||
"time": 1794262141.7649221,
|
||||
"memory_bytes": 54976512,
|
||||
"cpu_usec": 2788341,
|
||||
"rss_bytes": 106950656
|
||||
},
|
||||
{
|
||||
"time": 1794262142.153526,
|
||||
"memory_bytes": 82583552,
|
||||
"cpu_usec": 3145199,
|
||||
"rss_bytes": 180039680
|
||||
},
|
||||
{
|
||||
"time": 1794262142.4781618,
|
||||
"memory_bytes": 98701312,
|
||||
"cpu_usec": 3485405,
|
||||
"rss_bytes": 192589824
|
||||
},
|
||||
{
|
||||
"time": 1794262142.818176,
|
||||
"memory_bytes": 54738944,
|
||||
"cpu_usec": 3670691,
|
||||
"rss_bytes": 106897408
|
||||
},
|
||||
{
|
||||
"time": 1794262143.150275,
|
||||
"memory_bytes": 92516352,
|
||||
"cpu_usec": 4041841,
|
||||
"rss_bytes": 187322368
|
||||
},
|
||||
{
|
||||
"time": 1794262143.4721,
|
||||
"memory_bytes": 58019840,
|
||||
"cpu_usec": 4330075,
|
||||
"rss_bytes": 106909696
|
||||
},
|
||||
{
|
||||
"time": 1794262143.816778,
|
||||
"memory_bytes": 91193344,
|
||||
"cpu_usec": 4691490,
|
||||
"rss_bytes": 185057280
|
||||
},
|
||||
{
|
||||
"time": 1794262144.319894,
|
||||
"memory_bytes": 54292480,
|
||||
"cpu_usec": 4990675,
|
||||
"rss_bytes": 106909696
|
||||
},
|
||||
{
|
||||
"time": 1794262144.7009401,
|
||||
"memory_bytes": 66936832,
|
||||
"cpu_usec": 5267047,
|
||||
"rss_bytes": 147943424
|
||||
},
|
||||
{
|
||||
"time": 1794262145.049203,
|
||||
"memory_bytes": 98369536,
|
||||
"cpu_usec": 5612259,
|
||||
"rss_bytes": 192471040
|
||||
},
|
||||
{
|
||||
"time": 1794262145.4414349,
|
||||
"memory_bytes": 63508480,
|
||||
"cpu_usec": 5901715,
|
||||
"rss_bytes": 109088768
|
||||
},
|
||||
{
|
||||
"time": 1794262145.81682,
|
||||
"memory_bytes": 92336128,
|
||||
"cpu_usec": 6171315,
|
||||
"rss_bytes": 182304768
|
||||
},
|
||||
{
|
||||
"time": 1794262146.1910982,
|
||||
"memory_bytes": 75481088,
|
||||
"cpu_usec": 6539191,
|
||||
"rss_bytes": 109092864
|
||||
},
|
||||
{
|
||||
"time": 1794262146.612237,
|
||||
"memory_bytes": 73048064,
|
||||
"cpu_usec": 6912398,
|
||||
"rss_bytes": 154517504
|
||||
},
|
||||
{
|
||||
"time": 1794262147.0016918,
|
||||
"memory_bytes": 96288768,
|
||||
"cpu_usec": 7288823,
|
||||
"rss_bytes": 190681088
|
||||
},
|
||||
{
|
||||
"time": 1794262147.491589,
|
||||
"memory_bytes": 92078080,
|
||||
"cpu_usec": 7759923,
|
||||
"rss_bytes": 179814400
|
||||
},
|
||||
{
|
||||
"time": 1794262147.9121048,
|
||||
"memory_bytes": 64536576,
|
||||
"cpu_usec": 8079635,
|
||||
"rss_bytes": 128561152
|
||||
},
|
||||
{
|
||||
"time": 1794262148.251782,
|
||||
"memory_bytes": 102318080,
|
||||
"cpu_usec": 8385623,
|
||||
"rss_bytes": 193171456
|
||||
},
|
||||
{
|
||||
"time": 1794262148.6732469,
|
||||
"memory_bytes": 67047424,
|
||||
"cpu_usec": 8698362,
|
||||
"rss_bytes": 115306496
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 107 KiB |
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 85 KiB |
@@ -0,0 +1,23 @@
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi2026lab5-api-1 messenger-lab5:local "dotnet Messenger.Ap…" api 2 minutes ago Up About a minute (healthy) 8080/tcp
|
||||
mtusi2026lab5-api-2 messenger-lab5:local "dotnet Messenger.Ap…" api 2 minutes ago Up About a minute (healthy) 8080/tcp
|
||||
mtusi2026lab5-broker-1 rabbitmq:4.2.0-alpine "docker-entrypoint.s…" broker 14 minutes ago Up About a minute (healthy) 4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp
|
||||
mtusi2026lab5-dispatcher-1 messenger-lab5:local "dotnet Messenger.Ap…" dispatcher 2 seconds ago Up Less than a second 8080/tcp
|
||||
mtusi2026lab5-lb-1 haproxy:3.2.7-alpine "docker-entrypoint.s…" lb 14 minutes ago Up 13 minutes (healthy) 127.0.0.1:18085->8080/tcp
|
||||
mtusi2026lab5-postgres-1 postgres:17.6 "docker-entrypoint.s…" postgres 14 minutes ago Up 14 minutes (healthy) 5432/tcp
|
||||
mtusi2026lab5-redis-1 redis:7.4.2-alpine "docker-entrypoint.s…" redis 14 minutes ago Up 14 minutes (healthy) 6379/tcp
|
||||
mtusi2026lab5-s3-1 chrislusf/seaweedfs:3.97 "/entrypoint.sh serv…" s3 6 minutes ago Up 6 minutes (healthy) 7333/tcp, 8080/tcp, 8333/tcp, 8888/tcp, 9333/tcp, 18080/tcp, 18888/tcp, 19333/tcp
|
||||
mtusi2026lab5-worker-1 messenger-lab5:local "dotnet Messenger.Ap…" worker 2 seconds ago Up Less than a second 8080/tcp
|
||||
.venv/bin/python tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:18085"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi2026lab5-api-1 messenger-lab5:local "dotnet Messenger.Ap…" api 2 minutes ago Up 7 seconds (healthy) 8080/tcp
|
||||
mtusi2026lab5-api-2 messenger-lab5:local "dotnet Messenger.Ap…" api 2 minutes ago Up 7 seconds (healthy) 8080/tcp
|
||||
mtusi2026lab5-broker-1 rabbitmq:4.2.0-alpine "docker-entrypoint.s…" broker 15 minutes ago Up 30 seconds (healthy) 4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp
|
||||
mtusi2026lab5-dispatcher-1 messenger-lab5:local "dotnet Messenger.Ap…" dispatcher 44 seconds ago Up 7 seconds 8080/tcp
|
||||
mtusi2026lab5-lb-1 haproxy:3.2.7-alpine "docker-entrypoint.s…" lb 15 minutes ago Up 7 seconds (healthy) 127.0.0.1:18085->8080/tcp
|
||||
mtusi2026lab5-postgres-1 postgres:17.6 "docker-entrypoint.s…" postgres 15 minutes ago Up 32 seconds (healthy) 5432/tcp
|
||||
mtusi2026lab5-redis-1 redis:7.4.2-alpine "docker-entrypoint.s…" redis 15 minutes ago Up 32 seconds (healthy) 6379/tcp
|
||||
mtusi2026lab5-s3-1 chrislusf/seaweedfs:3.97 "/entrypoint.sh serv…" s3 7 minutes ago Up 29 seconds (healthy) 7333/tcp, 8080/tcp, 8333/tcp, 8888/tcp, 9333/tcp, 18080/tcp, 18888/tcp, 19333/tcp
|
||||
mtusi2026lab5-worker-1 messenger-lab5:local "dotnet Messenger.Ap…" worker 44 seconds ago Up 7 seconds 8080/tcp
|
||||
@@ -0,0 +1,2 @@
|
||||
.venv/bin/python student-tests/pipeline_tests.py --base-url "http://localhost:18085"
|
||||
PASS: 11 pipeline scenarios
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"checks": [
|
||||
"HTTP size/MIME/corruption/filename validation remains compatible with Lab4",
|
||||
"202 while worker stopped; durable outbox survives API restart; published queue survives broker restart; same ID becomes ready",
|
||||
"thumbnail/crop/WebP bytes and dimensions; no EXIF; orientation applied; transparent small image remains small with white background; private variants",
|
||||
"three duplicate ready deliveries are no-op",
|
||||
"after_objects: worker killed, same logical job recovered, one published result",
|
||||
"after_commit: worker killed, same logical job recovered, one published result",
|
||||
"publisher confirm before outbox COMMIT crash recovers without lost task or duplicate effect",
|
||||
"invalid staging checksum becomes failed after one attempt; failed attachment cannot be linked",
|
||||
"worker independently rejects >40 million pixels before bitmap allocation",
|
||||
"transient failure retries with bounded attempts then failed; explicit replay succeeds; replay of ready is no-op",
|
||||
"ready staging cleaned after durable publication; failed staging retained for replay"
|
||||
],
|
||||
"broker_queue_before_restart": "[\n{\"name\":\"attachments.v1\",\"messages_ready\":1}\n]\n",
|
||||
"retry_test_max_attempts": 3,
|
||||
"default_max_attempts": 5
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
Reference in New Issue
Block a user