Preserve scaling data and reject contaminated benchmark attempts

This commit is contained in:
Artyom
2026-11-05 22:42:51 +03:00
parent 74a39fa93e
commit 05d69ba6ac
5 changed files with 157 additions and 23 deletions
+8 -1
View File
@@ -10,6 +10,7 @@ ORDER = ("1x1", "2x1", "4x1", "8x1", "2x2", "1x4")
PALETTE = ("#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#6250d6", "#e34948")
MARKERS = ("o", "s", "^", "D", "v", "P", "X", "*")
USL_POINTS = 3
MIN_REPEATS = 3
COMPONENTS = (("api", "API"), ("postgres", "PostgreSQL"), ("lb", "HAProxy"), ("k6", "k6"))
INK, MUTED, GRID, SURFACE = "#0b0b0b", "#52514e", "#e4e3df", "#fcfcfb"
SUMMARY = (
@@ -57,9 +58,15 @@ def load(paths):
groups = collections.defaultdict(lambda: collections.defaultdict(list))
for path in paths:
with Path(path).open() as handle:
for row in csv.DictReader(handle):
for row in csv.DictReader(line for line in handle if not line.startswith("#")):
if row["disturbed"] == "True":
raise ValueError(f"disturbed run in accepted sample: {path}")
key = (Path(path).parent.name, row["variant"], row["config"])
groups[key][int(row["rate"])].append(row)
for key, rates in groups.items():
for rate, rows in rates.items():
if len(rows) < MIN_REPEATS or len({row["repeat"] for row in rows}) != len(rows):
raise ValueError(f"need at least three distinct repeats: {key}, {rate}")
return groups