DFiP_Budget_planing/perf/e2e/lib/global-teardown.ts
Andrey Epifancev fdc8ecb2a3 perf: замеры бэка
Сетевой лог сценариев, bench запросов, pg_stat_statements и EXPLAIN,
aggregate исключает трассировочные повторы (O-9).

Refs #202

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 02:36:46 +04:00

12 lines
538 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/** Playwright globalTeardown: sql_top.json + explain/*.json в каталог прогона. Только если был сетевой лог (т.е. гонялись сценарии). */
import { existsSync } from 'node:fs';
import { sqlstats } from './global-setup';
import { runDir } from './results';
import { netlogFile } from './netlog';
export default async function globalTeardown(): Promise<void> {
if (process.env.PERF_SQLSTATS === '0') return;
if (!existsSync(netlogFile())) return;
sqlstats(['dump', runDir()]);
}