{"record":{"id":"117677c6f734321a","repo":"vercel/next.js","slug":"cpu-throttle-must-be-at-least-1-got-cputhrott","errorCode":null,"errorMessage":"--cpu-throttle must be at least 1, got ${cpuThrottle}","messagePattern":"--cpu-throttle must be at least 1, got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"bench/render-pipeline/client-trace.ts","lineNumber":180,"sourceCode":"    .map((route) => route.trim())\n    .filter(Boolean)\n  if (routes.length === 0) {\n    throw new Error('--routes cannot be empty')\n  }\n  for (const route of routes) {\n    if (!route.startsWith('/')) {\n      throw new Error(`Each route must start with '/': ${route}`)\n    }\n  }\n\n  const samples = parseNumberArg(args, 'samples', 3)\n  if (samples < 1) {\n    throw new Error(`--samples must be at least 1, got ${samples}`)\n  }\n  // CDP rejects rates below 1 (1 = no throttling).\n  const cpuThrottle = parseNumberArg(args, 'cpu-throttle', 4)\n  if (cpuThrottle < 1) {\n    throw new Error(`--cpu-throttle must be at least 1, got ${cpuThrottle}`)\n  }\n\n  const timestamp = new Date().toISOString().replace(/[:.]/g, '-')\n\n  return {\n    appDir: resolve(REPO_ROOT, args.get('app-dir') ?? 'bench/basic-app'),\n    routes,\n    samples,\n    cpuThrottle,\n    build: parseBoolean(args.get('build') ?? 'false'),\n    startServer: parseBoolean(args.get('start-server') ?? 'true'),\n    port: parseNumberArg(args, 'port', 3199),\n    timeoutMs: parseNumberArg(args, 'timeout-ms', 30_000),\n    settleMs: parseNumberArg(args, 'settle-ms', 750),\n    artifactDir: resolve(\n      REPO_ROOT,\n      args.get('artifact-dir') ??\n        `bench/render-pipeline/artifacts/${timestamp}-client`","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/vercel/next.js/blob/0ae8c72462952df163f1b1e0726641bc5b40dc93/bench/render-pipeline/client-trace.ts#L162-L198","documentation":"Thrown by parseCli when --cpu-throttle is less than 1. The value is passed directly to Chrome DevTools Protocol CPU throttling (Emulation.setCPUThrottlingRate), which rejects rates below 1 (1 = no throttling). Validating here gives a clear message instead of a cryptic CDP error.","triggerScenarios":"Passing --cpu-throttle=0, --cpu-throttle=-2, or --cpu-throttle=0.5.","commonSituations":"Confusing the throttle rate with a percentage; intending 'no throttle' and passing 0 instead of 1; a typo.","solutions":["Pass --cpu-throttle=1 to disable throttling (no slowdown).","Pass a value > 1 (e.g. 4, the default) to slow the CPU by that factor."],"exampleFix":"// before (intended: no throttle)\n--cpu-throttle=0\n// after\n--cpu-throttle=1","handlingStrategy":"validation","validationCode":"// 1 means no throttling; enforce >= 1\nconst cpuThrottle = Math.max(1, parseNumberArg(args, 'cpu-throttle', 4))","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Use --cpu-throttle=1 for no throttling (not 0).","Remember the value is a slowdown factor, not a percentage."],"tags":["cli","validation","chrome-devtools"],"analyzedSha":"0ae8c72462952df163f1b1e0726641bc5b40dc93","analyzedAt":"2026-08-06T19:44:29.143Z","schemaVersion":2},"datasetVersion":"2026-08-07T02:17:10.218Z"}