lab5: асинхронный воркер, брокер сообщений

This commit is contained in:
2026-11-20 18:44:04 +03:00
parent 276dbdad8a
commit 35753ff11d
88 changed files with 5726 additions and 53 deletions
+23
View File
@@ -0,0 +1,23 @@
import matplotlib.pyplot as plt
import os
replicas = [1, 2, 4, 6]
rps = [250, 255, 260, 257]
plt.figure(figsize=(8, 5))
plt.plot(replicas, rps, marker='o', linestyle='-', color='b', linewidth=2, markersize=8)
plt.title('Трек 1: Масштабирование API (суммарно 2 CPU / 1 GB)', fontsize=14)
plt.xlabel('Количество API-реплик', fontsize=12)
plt.ylabel('RPS (запросов в секунду)', fontsize=12)
plt.grid(True, linestyle='--', alpha=0.7)
plt.xticks(replicas)
plt.annotate('Saturation Point\n(Оптимум)', xy=(4, 260), xytext=(3, 252),
arrowprops=dict(facecolor='red', shrink=0.05),
fontsize=10, color='red')
os.makedirs('evidence', exist_ok=True)
plt.savefig('evidence/scaling.png', dpi=300, bbox_inches='tight')
print("График сохранен в evidence/scaling.png")