feat: add track 1 scaling series to the bench stand
Series a/b/pool/ab/quick in bench/run.py: per-cell fresh stand with the configuration's replicas and max_connections, open-model mixed profile (k6/mixed.js), fixed levels and R* search by SLO, a sampler container for cgroup, VM, HAProxy and PostgreSQL metrics, resume and a stand lock. Pure helpers in bench/scaling.py, SVG plots in bench/plots.py, series mode for bench_compare and bench_ab. Hypotheses H1-H3 go to REPORT.md before the first series. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+20
-3
@@ -1,6 +1,8 @@
|
||||
"""Два прогона подряд: «до» и «после» одного изменения, в одной сессии.
|
||||
|
||||
Запуск — `make bench_ab BEFORE=<метка> AFTER=<метка> REAPPLY=<commit>`.
|
||||
Запуск — `make bench_ab BEFORE=<метка> AFTER=<метка> REAPPLY=<commit>
|
||||
[SERIES=<серия>]`; с `SERIES` вместо полной матрицы снимается серия трека 1
|
||||
(`make bench_scaling`).
|
||||
В рабочем дереве должен лежать код «до», а изменение — быть
|
||||
закоммиченным и откаченным отдельным commit; `REAPPLY` — commit отката.
|
||||
Скрипт снимает стенд «до», коммитит его результаты, возвращает изменение
|
||||
@@ -51,13 +53,26 @@ def problems(args: argparse.Namespace) -> list[str]:
|
||||
return found
|
||||
|
||||
|
||||
def run_step(args: argparse.Namespace, label: str) -> list[str]:
|
||||
"""Прогон стенда: полная матрица или серия трека 1 (`--series`,
|
||||
решение 11 design change `scaling-bench`)."""
|
||||
if args.series:
|
||||
return [
|
||||
"make",
|
||||
"bench_scaling",
|
||||
f"SERIES={args.series}",
|
||||
f"SCALING_LABEL={label}",
|
||||
]
|
||||
return ["make", "bench", f"BENCH_LABEL={label}"]
|
||||
|
||||
|
||||
def steps(args: argparse.Namespace) -> list[list[str]]:
|
||||
return [
|
||||
["make", "bench", f"BENCH_LABEL={args.before}"],
|
||||
run_step(args, args.before),
|
||||
["git", "add", f"evidence/bench/{args.before}"],
|
||||
["git", "commit", "-m", f"docs: add {args.before} bench evidence"],
|
||||
["git", "revert", "--no-edit", args.reapply],
|
||||
["make", "bench", f"BENCH_LABEL={args.after}"],
|
||||
run_step(args, args.after),
|
||||
]
|
||||
|
||||
|
||||
@@ -67,6 +82,8 @@ def main(argv: list[str]) -> int:
|
||||
parser.add_argument("--after", default="")
|
||||
parser.add_argument("--reapply", default="")
|
||||
parser.add_argument("--dry-run", action="store_true")
|
||||
# серия трека 1 вместо полной матрицы: a, b, pool, ab, quick
|
||||
parser.add_argument("--series", default="")
|
||||
args = parser.parse_args(argv)
|
||||
if not (args.before and args.after and args.reapply):
|
||||
print(
|
||||
|
||||
Reference in New Issue
Block a user