:
HardwareInfo
Method Summary
| Private Methods | |
|---|---|
| private |
isUsingBattery(platform): Null | Boolean
Indicates whether the host is running on battery power. This can cause performance degredation. |
| private |
memorySwapUsed(platform): Null | Number
Determines the amount of swap/virtual memory currently in use. |
| private |
memoryTotal( ): Number
Determines the total amount of memory available to the host, as from |
| private |
memoryUsed( ): Object
Determines the amount of memory currently being used by the current Node process, as from |
| private |
processorCount( ): Number
Determines the number of logical processors available to the host, as from |
| private |
processorLoad(platform): Array
Determines the average processor load across the system. This is expressed as a fractional number between 0 and the number of logical processors. |
| private |
processorSpeed( ): Number
Gets the speed of the host's processors. |
| private |
Determines the time since the host was started, as from |
Private Methods
lib/models/hardware-info.js:232
private isUsingBattery(platform): Null | Boolean
Indicates whether the host is running on battery power. This can cause performance degredation.
Parameters:
| Name | Type | Attribute | Description |
|---|---|---|---|
| platform | String=process.platform |
|
The current hardware platform. USED FOR TESTING ONLY. |
Return:
true iff the host is running on battery power or
false if not. null if the battery status
cannot be determined.
lib/models/hardware-info.js:266
private memorySwapUsed(platform): Null | Number
Determines the amount of swap/virtual memory currently in use.
Parameters:
| Name | Type | Attribute | Description |
|---|---|---|---|
| platform | String=process.platform |
|
The current hardware platform. USED FOR TESTING ONLY. |
Return:
The amount of used swap space, in bytes. null if
the used swap space cannot be determined.
lib/models/hardware-info.js:297
private memoryTotal( ): Number
Determines the total amount of memory available to the host, as from
os.totalmem.
Return:
The total memory in bytes.
lib/models/hardware-info.js:309
private memoryUsed( ): Object
Determines the amount of memory currently being used by the current Node
process, as from process.memoryUsage.
Return:
The Resident Set Size, as reported by
process.memoryUsage.
lib/models/hardware-info.js:322
private processorCount( ): Number
Determines the number of logical processors available to the host, as from
os.cpus.
Return:
The number of logical processors.
lib/models/hardware-info.js:334
private
processorLoad(platform): Array
Determines the average processor load across the system. This is expressed as a fractional number between 0 and the number of logical processors.
Parameters:
| Name | Type | Attribute | Description |
|---|---|---|---|
| platform | String=process.platform |
|
The current hardware platform. USED FOR TESTING ONLY. |
Return:
The one-, five-, and fifteen-minute processor load averages.
lib/models/hardware-info.js:358
private processorSpeed( ): Number
Gets the speed of the host's processors.
If more than one processor is found, the average of their speeds is taken.
Return:
The average processor speed in MHz.
lib/models/hardware-info.js:373
private uptime( ): Number
Determines the time since the host was started, as from os.uptime.
Return:
The number of seconds since the host was started.