|
@@ -113,10 +113,16 @@ function understandingOBS() {
|
|
|
handler2(data) // setTimeout will put the call into the call stack
|
|
|
})
|
|
|
printLog()
|
|
|
+ console.trace() // Checking what's in the stack call
|
|
|
+
|
|
|
+ const used = process.memoryUsage().heapUsed / 1024 / 1024;
|
|
|
+ console.log(`Heap memory used: ${Math.round(used * 100) / 100} MB`);
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+understandingOBS()
|
|
|
+
|
|
|
/* Buffer */
|
|
|
function bufferOBS() {
|
|
|
/* This code defines a function called bufferOBS that creates a new observable called bufferring using
|