File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ class Cube {
1111 this . batchSize = options . batchSize || 60
1212 this . dispatchInterval = options . dispatchInterval || 60
1313 this . tags = options . tags
14+ this . startTime = Date . now ( )
1415 this . uptime = 0
1516 this . cpu = 0.0
1617 this . memory = 0
@@ -25,7 +26,7 @@ class Cube {
2526 // System daemon
2627 setInterval ( ( ) => {
2728 pusage . stat ( process . pid , ( err , stat ) => {
28- this . uptime = Math . floor ( process . uptime ( ) )
29+ this . uptime = ( Date . now ( ) - this . startTime ) / 1000
2930 this . cpu = stat . cpu
3031 this . memory = stat . memory
3132 } )
Original file line number Diff line number Diff line change 11{
22 "name" : " labstack" ,
3- "version" : " 0.21.5 " ,
3+ "version" : " 0.21.6 " ,
44 "description" : " Official Node.js client library for the LabStack platform" ,
55 "main" : " lib/index.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments