vitest.bench.config.ts 899 B

1234567891011121314151617181920212223242526
  1. import tsconfigPaths from 'vite-tsconfig-paths'
  2. import { defineConfig } from 'vitest/config'
  3. import { standardDecoratorPlugin, vitestExecArgv } from './vitest.shared.ts'
  4. /**
  5. * CI performance gate. Vitest orchestrates compiled plain-Node workers under
  6. * `.dsh-build/benchmarks/`; timed product work never runs through its source transform.
  7. * Files run one at a time so a measurement never shares the CPU with another
  8. * benchmark.
  9. */
  10. export default defineConfig({
  11. plugins: [tsconfigPaths({ projects: ['./tsconfig.base.json'] }), standardDecoratorPlugin()],
  12. test: {
  13. execArgv: vitestExecArgv,
  14. setupFiles: ['./scripts/test-proxy-environment.ts'],
  15. include: [
  16. 'benchmarks/**/*.bench.ts',
  17. 'benchmarks/**/*.bench.client.ts',
  18. ],
  19. fileParallelism: false,
  20. maxWorkers: 1,
  21. testTimeout: 600_000,
  22. hookTimeout: 120_000,
  23. disableConsoleIntercept: true,
  24. },
  25. })