Class PerformanceManager
Class defined in:src/node-performancemanager.js:27
addDisplayClient
( idx, data
)
src/node-performancemanager.js:130
Adds data for a display client.
Parameters:-
idx
<> The client ID
-
data
<> The data
collectCPULoad
( data
)
src/node-performancemanager.js:210
Gets current CPU load and adds it to a list collected over time
- also computes moving averages of 1 minute and a longer duration (5 minutes)
-
data
<Object>- CPU load data
collectMemoryUsage
( data
)
src/node-performancemanager.js:409
Gets current server process load and adds it to a list collected over time also computes moving averages of 1 minute and a longer duration (5 minutes)
Parameters:-
data
<Object>- memory usage data
collectMetrics
(
)
src/node-performancemanager.js:496
Calls all metric collection functions to gather data
collectserverLoad
( data
)
src/node-performancemanager.js:314
Gets current Server process load and adds it to a list collected over time also computes moving averages of 1 minute and a longer duration (5 minutes)
Parameters:-
data
<Object>- processes load data list
collectServerTraffic
(
)
src/node-performancemanager.js:443
Gets current server traffic and adds it to a list collected over time also computes moving averages of 1 minute and a longer duration (5 minutes)
collectSystemTraffic
(
)
src/node-performancemanager.js:467
Gets current system traffic and adds it to a list collected over time also computes moving averages of 1 minute and a longer duration (5 minutes)
computeMessageSize
( wsio, data, outBound
)
src/node-performancemanager.js:938
Computes size of the data being transferred and received through Websockets
Parameters:computeMovingAverages
( metric, oneMinute, entireDuration
)
src/node-performancemanager.js:365
Computes moving averages (1 minute and a longer duration)
Parameters:formatMemoryString
( used, free, short
)
src/node-performancemanager.js:745
Helper function to format memory usage info in a string
Parameters:getNiceNumber
( number, giga
)
src/node-performancemanager.js:721
Helper function to convert a number to shorter format with appropriate suffix determined (K for Kilo and so on)
Parameters:getPercentString
( val, remaining
)
src/node-performancemanager.js:706
Helper function to get a percentage value
Parameters:getTrafficData
(
)
src/node-performancemanager.js:1015
Retrieves the network traffic data and resets the place holder
printMetrics
(
)
src/node-performancemanager.js:799
Prints different performance metrics to the console
printServerHardware
(
)
src/node-performancemanager.js:769
Print a summary of the hardware that the server is running on
removeDisplayClient
( idx
)
src/node-performancemanager.js:146
Removes data of a closed display client.
Parameters:-
idx
<> The client ID
saveData
( metric, data
)
src/node-performancemanager.js:683
Saves metric data into current value placeholder and history list
Parameters:setSamplingInterval
( interval
)
src/node-performancemanager.js:181
Sets sampling interval to 1, 2 or 5 seconds and restarts the sampling loop values 'often|slow|normal', every other value defaults to 'normal'
Parameters:-
interval
<String>- Interval specified as a user friendly string
updateClient
( wsio
)
src/node-performancemanager.js:158
Send a new monitoring client all the specifics
Parameters:-
wsio
<Object>client's websocket
wrapDataTransferFunctions
( WebsocketIO
)
src/node-performancemanager.js:864
Wraps the WebsocketIO emit and on functions to append size computation of the data
- being transferred
-
WebsocketIO
<Object>- Websocket object that is responsible to client-server communication