File tree Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -16,29 +16,27 @@ var dashboardAgent = function () {
16
16
17
17
var socket = new SocketIO ( "http://localhost:" + options . port ) ;
18
18
19
- var eventLoop = {
20
- delay : 0 ,
21
- high : 0
19
+ var metrics = {
20
+ eventLoop : {
21
+ delay : 0 ,
22
+ high : 0 ,
23
+ } ,
24
+ mem : {
25
+ systemTotal : os . totalmem ( )
26
+ } ,
27
+ cpu : {
28
+ utilization : 0
29
+ }
22
30
} ;
23
31
24
32
var _delayed = function ( delay ) {
25
- eventLoop . high = Math . max ( eventLoop . high , delay ) ;
26
- eventLoop . delay = delay ;
33
+ metrics . eventLoop . high = Math . max ( metrics . eventLoop . high , delay ) ;
34
+ metrics . eventLoop . delay = delay ;
27
35
} ;
28
36
29
37
blocked ( _delayed , { threshold : options . blockedThreshold } ) ;
30
38
31
39
var _getStats = function ( cb ) {
32
- var metrics = {
33
- eventLoop : eventLoop ,
34
- mem : {
35
- systemTotal : os . totalmem ( )
36
- } ,
37
- cpu : {
38
- utilization : 0
39
- }
40
- } ;
41
-
42
40
_ . merge ( metrics . mem , process . memoryUsage ( ) ) ;
43
41
44
42
pusage . stat ( process . pid , function ( err , stat ) {
@@ -54,7 +52,7 @@ var dashboardAgent = function () {
54
52
} ;
55
53
56
54
var resetEventMetrics = function ( ) {
57
- eventLoop . delay = 0 ;
55
+ metrics . eventLoop . delay = 0 ;
58
56
} ;
59
57
60
58
var _emitStats = function ( ) {
You can’t perform that action at this time.
0 commit comments