| import type { BenchmarkConfig, BenchmarkMode, BenchmarkRunKind } from '../types.js'
|
|
|
| export function createConfig(
|
| mode: BenchmarkMode,
|
| runKind: BenchmarkRunKind,
|
| ): BenchmarkConfig {
|
| const isSmoke = runKind === 'smoke'
|
| return {
|
| mode,
|
| runKind,
|
| iterations: {
|
| startup: isSmoke ? 2 : 8,
|
| commandLoad: isSmoke ? 3 : 16,
|
| queueCorrectness: isSmoke ? 4 : 24,
|
| toolPipeline: isSmoke ? 3 : 20,
|
| },
|
| timeoutsMs: {
|
| command: isSmoke ? 20_000 : 60_000,
|
| onlineHeadless: isSmoke ? 30_000 : 120_000,
|
| },
|
| weights: {
|
| latency: 0.3,
|
| stability: 0.3,
|
| quality: 0.25,
|
| cost: 0.15,
|
| },
|
| thresholds: {
|
| minimumSuccessRatePct: isSmoke ? 85 : 95,
|
| maximumP95MsByCategory: {
|
| startup: isSmoke ? 20_000 : 8_000,
|
| commands: isSmoke ? 15_000 : 5_000,
|
| headless: isSmoke ? 60_000 : 25_000,
|
| correctness: isSmoke ? 5_000 : 2_000,
|
| tools: isSmoke ? 5_000 : 2_000,
|
| restoration: isSmoke ? 20_000 : 10_000,
|
| },
|
| maximumMissingImports: 0,
|
| },
|
| }
|
| }
|
|
|