The workers the parsing still to come is worth.
()
| 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; } |
no test coverage detected