lab3: результаты после исправлений (прогоны 3–4), отчёт

This commit is contained in:
2026-10-24 03:02:44 +03:00
parent eec3e43471
commit b05562cbac
10 changed files with 213 additions and 123 deletions
+9
View File
@@ -222,6 +222,8 @@ def main():
p.add_argument('--duration', default='', help='override measured duration, e.g. 15s')
p.add_argument('--warmup', default='', help='override warmup, e.g. 3s')
p.add_argument('--repeats', type=int, default=0, help='override repeats')
p.add_argument('--series-warmup', default='30s',
help='unrecorded warm-up load before the first config of each series; 0 disables')
p.add_argument('--cleanup', action='store_true', help='docker compose down -v for the bench project at the end')
args = p.parse_args()
@@ -259,6 +261,7 @@ def main():
if getattr(args, k):
load[k] = getattr(args, k)
only = {c for c in args.configs.split(',') if c}
warmed = False
for cfg in series['configs']:
if only and cfg['label'] not in only:
continue
@@ -279,6 +282,12 @@ def main():
stack.wait_balanced(n)
stack.pad_redis(exp.get('redis_padding_keys', 0))
containers = stack.containers()
if not warmed and args.series_warmup not in ('', '0', '0s'):
# Прогон 4 показал: первая конфигурация серии на «холодной» машине
# на 11–20% медленнее той же конфигурации в конце. Разогрев не пишется в результаты.
sh([str(BENCH), '-base-url', stack.base, '-concurrency', '16', '-duration', args.series_warmup,
'-warmup', '0s', '-chats', str(load['chats']), '-label', 'series-warmup'], timeout=600)
warmed = True
config_env = {k: env[k] for k in ('API_REPLICAS', 'API_CPUS', 'API_MEMORY', 'PG_CPUS', 'LB_CPUS',
'REDIS_CPUS', 'DB_POOL_MAX', 'CACHE_INVALIDATION', 'LB_BALANCE')}
for lvl, rep in todo: