()
| 22 | const FREQUENCIES = [100, 500, 1000]; |
| 23 | |
| 24 | function performLoad() { |
| 25 | const buffer = randomBytes(1e8); |
| 26 | |
| 27 | // Do some work |
| 28 | return setInterval(() => { |
| 29 | createHash('sha256').update(buffer).end(buffer); |
| 30 | }, platformTimeout(workerData?.frequency ?? 100)); |
| 31 | } |
| 32 | |
| 33 | function getUsages() { |
| 34 | return { process: process.cpuUsage(), thread: process.threadCpuUsage() }; |
no test coverage detected
searching dependent graphs…