MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / resolveParsePoolSize

Function resolveParsePoolSize

src/extraction/parse-pool.ts:112–121  ·  view source on GitHub ↗
(envVal: string | undefined, cpuCount: number)

Source from the content-addressed store, hash-verified

110}
111
112export function resolveParsePoolSize(envVal: string | undefined, cpuCount: number): number {
113 if (envVal !== undefined && envVal !== '') {
114 const n = Number(envVal);
115 if (Number.isFinite(n) && n >= 0) {
116 return Math.max(1, Math.min(Math.floor(n), MAX_PARSE_POOL_SIZE));
117 }
118 // non-numeric / negative → fall through to the default
119 }
120 return Math.max(1, Math.min(cpuCount - 1, DEFAULT_PARSE_POOL_CAP));
121}
122
123interface ParseJob {
124 id: number;

Callers 2

indexAllMethod · 0.90
parse-pool.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected