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

Method wantedSize

src/extraction/parse-pool.ts:287–292  ·  view source on GitHub ↗

The workers the parsing still to come is worth.

()

Source from the content-addressed store, hash-verified

285
286 /** The workers the parsing still to come is worth. */
287 private wantedSize(): number {
288 if (this.expectedParses === undefined) return this.maxSize;
289 const left = Math.max(0, this.expectedParses - this.parsesDone);
290 const each = this.parsesMeasured >= PARSES_TO_MEASURE ? this.parseMsMeasured / this.parsesMeasured : TYPICAL_PARSE_MS;
291 return workersWorthStarting(left * each, this.maxSize);
292 }
293
294 /** Pool size cap (for logging). */
295 get size(): number { return this.maxSize; }

Callers 2

prewarmMethod · 0.95
drainMethod · 0.95

Calls 1

workersWorthStartingFunction · 0.85

Tested by

no test coverage detected