/** * Vitest Performance Test Setup * * Import this file in your vitest.config.ts setupFiles to enable * performance testing custom matchers. * * @example vitest.config.ts * ```typescript * import { defineConfig } from 'vitest/config' * * export default defineConfig({ * test: { * setupFiles: ['@dotdo/postgres-shared/vitest-perf-setup'], * }, * }) * ``` * * @example Usage in tests * ```typescript * import { measureTiming, measureThroughput } from '@dotdo/postgres-shared/perf-test-utils' * * describe('performance tests', () => { * it('completes within baseline', async () => { * const stats = await measureTiming(async () => { * await someOperation() * }) * expect(stats).toBeWithinBaseline('simple-select') * expect(stats).toBeFasterThan(10) // p95 < 10ms * expect(stats).toHaveLowVariance(0.5) // CV < 0.5 * }) * * it('meets throughput requirements', async () => { * const throughput = await measureThroughput(async () => { * await someOperation() * }) * expect(throughput).toMeetThroughput(1000) // >= 1000 ops/sec * }) * }) * ``` * * Issues: postgres-9zvs, postgres-2paw */ export {}; //# sourceMappingURL=vitest-perf-setup.d.ts.map