(wElu)
| 70 | })(); |
| 71 | |
| 72 | function checkWorkerIdle(wElu) { |
| 73 | const perfWorkerElu = workerELU(); |
| 74 | const tmpMainElu = eventLoopUtilization(mainElu); |
| 75 | |
| 76 | assert.ok(idleActive(wElu) > 0, `${idleActive(wElu)} <= 0`); |
| 77 | assert.ok(idleActive(workerELU(wElu)) > 0, |
| 78 | `${idleActive(workerELU(wElu))} <= 0`); |
| 79 | assert.ok(idleActive(perfWorkerElu) > idleActive(wElu), |
| 80 | `${idleActive(perfWorkerElu)} <= ${idleActive(wElu)}`); |
| 81 | assert.ok(idleActive(tmpMainElu) > idleActive(perfWorkerElu), |
| 82 | `${idleActive(tmpMainElu)} <= ${idleActive(perfWorkerElu)}`); |
| 83 | |
| 84 | wElu = workerELU(); |
| 85 | setTimeout(mustCall(() => { |
| 86 | wElu = workerELU(wElu); |
| 87 | // Some clocks fire early. Removing a few milliseconds to cover that. |
| 88 | assert.ok(idleActive(wElu) >= 45, `${idleActive(wElu)} < 45`); |
| 89 | // Cutting the idle time in half since it's possible that the call took a |
| 90 | // lot of resources to process? |
| 91 | assert.ok(wElu.idle >= 25, `${wElu.idle} < 25`); |
| 92 | |
| 93 | checkWorkerActive(); |
| 94 | }), 50); |
| 95 | } |
| 96 | |
| 97 | function checkWorkerActive() { |
| 98 | const w = workerELU(); |
nothing calls this directly
no test coverage detected
searching dependent graphs…