vitest.bench.config.ts 937 B

123456789101112131415161718192021222324252627
  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. Node CPU cases use compiled plain-Node workers under
  6. * `benchmarks/.dsh-build/`; browser cases drive built Client artifacts through
  7. * the shared shipped-composition Web scaffold.
  8. * Files run one at a time so a measurement never shares the CPU with another
  9. * benchmark.
  10. */
  11. export default defineConfig({
  12. plugins: [tsconfigPaths({ projects: ['./tsconfig.base.json'] }), standardDecoratorPlugin()],
  13. test: {
  14. execArgv: vitestExecArgv,
  15. setupFiles: ['./scripts/test-proxy-environment.ts'],
  16. include: [
  17. 'benchmarks/**/*.bench.ts',
  18. 'benchmarks/**/*.bench.client.ts',
  19. ],
  20. fileParallelism: false,
  21. maxWorkers: 1,
  22. testTimeout: 600_000,
  23. hookTimeout: 120_000,
  24. disableConsoleIntercept: true,
  25. },
  26. })