forked from mtusi2026/mtusi2026lab5
14 lines
924 B
Plaintext
14 lines
924 B
Plaintext
python student-tests/concurrency.py
|
|
time s | processing (DB) | unacked (broker) | waiting in queue
|
|
2.4 | 2 | 0 | 0
|
|
5.0 | 2 | 2 | 4
|
|
7.6 | 2 | 2 | 4
|
|
11.6 | 2 | 2 | 4
|
|
14.3 | 2 | 2 | 2
|
|
17.1 | 2 | 2 | 2
|
|
19.7 | 2 | 2 | 0
|
|
23.8 | 2 | 2 | 0
|
|
26.5 | 0 | 2 | 0
|
|
peak: 2 jobs in processing, 2 unacknowledged messages, up to 4 waiting in the queue; all 6 ready after 26.5 s
|
|
PASS: at most WORKER_CONCURRENCY=2 jobs run at once and the broker gives the worker at most prefetch=2 messages; the rest wait in the durable queue
|