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

Function memorySwapUsedWindows

lib/models/hardware-info.js:216–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

214}
215
216function memorySwapUsedWindows() {
217 try {
218 const { stdout } = execa.sync('wmic', ['PAGEFILE', 'get', 'CurrentUsage', '/format:list']);
219 const match = /\bCurrentUsage=(\d+)/.exec(stdout);
220
221 if (!match) {
222 throw new Error('Page file usage info not in output.');
223 }
224
225 return parseInt(match[1], 10) * 1048576;
226 } catch (ex) {
227 logger.warn(`Could not get swap status from wmic: ${ex}`);
228 logger.warn(ex.stack);
229
230 return null;
231 }
232}
233
234const hwinfo = {
235 /**

Callers 1

memorySwapUsedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…