The workers the parsing still to come is worth.
()
| 310 | |
| 311 | /** The workers the parsing still to come is worth. */ |
| 312 | private wantedSize(): number { |
| 313 | if (this.expectedParses === undefined) return this.maxSize; |
| 314 | const left = Math.max(0, this.expectedParses - this.parsesDone); |
| 315 | const each = this.parsesMeasured >= PARSES_TO_MEASURE ? this.parseMsMeasured / this.parsesMeasured : TYPICAL_PARSE_MS; |
| 316 | return workersWorthStarting(left * each, this.maxSize); |
| 317 | } |
| 318 | |
| 319 | /** Pool size cap (for logging). */ |
| 320 | get size(): number { return this.maxSize; } |
no test coverage detected