(line)
| 341 | let vmTraceWaitCount = 0; |
| 342 | let vmTraceWaitSuppressed = false; |
| 343 | function vmTrace(line) { |
| 344 | if (typeof line === "string" && line.indexOf("runtime.") === 0) { |
| 345 | return; |
| 346 | } |
| 347 | if (typeof line === "string" && line.indexOf("runtime.handleYield.thread-") === 0 && line.indexOf(":wait") > 0) { |
| 348 | vmTraceWaitCount++; |
| 349 | if (vmTraceWaitCount > VM_TRACE_WAIT_LIMIT) { |
| 350 | if (!vmTraceWaitSuppressed && global.console && typeof global.console.log === "function") { |
| 351 | vmTraceWaitSuppressed = true; |
| 352 | global.console.log("PARPAR:runtime.handleYield:wait:throttled"); |
| 353 | } |
| 354 | return; |
| 355 | } |
| 356 | } |
| 357 | if (global.console && typeof global.console.log === "function") { |
| 358 | global.console.log("PARPAR:" + line); |
| 359 | } |
| 360 | } |
| 361 | function shouldEnableDiag() { |
| 362 | if (global.__parparDiagEnabled != null) { |
| 363 | return !!global.__parparDiagEnabled; |
no test coverage detected