MCPcopy Create free account
hub / github.com/ember-cli/ember-cli / processorLoad

Function processorLoad

lib/models/hardware-info.js:349–359  ·  view source on GitHub ↗

* Determines the average processor load across the system. This is * expressed as a fractional number between 0 and the number of logical * processors. * * @private * @method processorLoad * @param {String=process.platform} platform The current hardware platform. *

(platform = process.platform)

Source from the content-addressed store, hash-verified

347 * averages.
348 */
349 processorLoad(platform = process.platform) {
350 // The os.loadavg() call works on win32, but never returns correct
351 // data. Better to intercept and warn that it's unsupported.
352 if (platform === 'win32') {
353 logger.warn(`Processor load is unsupported on the '${platform}' platform.`);
354
355 return null;
356 }
357
358 return os.loadavg();
359 },
360
361 /**
362 * Gets the speed of the host's processors.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…