fix(lab3): verify fixed-resource scaling and prepare submission

This commit is contained in:
kolya5544
2026-11-11 17:56:40 +03:00
parent 7e6f66c3db
commit d1352c12f0
10 changed files with 1351 additions and 13 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ def main():
fig, ax = plt.subplots(1, 3, figsize=(17, 5))
# A: фиксированный суммарный CPU
for tag, color, shift in (("base", "#1565c0", -0.2), ("improved", "#2e7d32", 0.2)):
d = load(out, "A", tag)
d = load(out, "A", tag + "_fixed_resources")
if not d:
continue
names = [r["config"] for r in d["results"]]
@@ -30,7 +30,7 @@ def main():
label={"base": "до (несколько запросов)", "improved": "после (функция БД)"}[tag])
ax[0].set_xticks(range(len(names)))
ax[0].set_xticklabels(["%s" % n.replace("x", " × ") + " CPU" for n in names])
ax[0].set_title("A: суммарно 2.0 CPU на API (число реплик × CPU)"); ax[0].set_ylabel("успешных запросов/с"); ax[0].legend()
ax[0].set_title("A: суммарно 2 CPU / 1024 MiB RAM на API"); ax[0].set_ylabel("успешных запросов/с"); ax[0].legend()
# B: рост ресурсов
for tag, color, label in (("base", "#1565c0", "БД 2 CPU, до"), ("base_pg4", "#ef6c00", "БД 4 CPU, до"), ("improved", "#2e7d32", "БД 2 CPU, после")):
d = load(out, "B", tag)