瀏覽代碼

minor update for tomorrow

Enzo 1 年之前
父節點
當前提交
e56ac9cd87
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 0 1
      services/query.service.ts
  2. 6 0
      test/test3.ts

+ 0 - 1
services/query.service.ts

@@ -18,7 +18,6 @@ export class queryService {
         const t1 = performance.now()
         const timeTakenInSeconds = (t1 - t0) / 1000;
         console.log(`Time taken: ${timeTakenInSeconds} seconds to run this function`);
-    
     }
 
     public query(storageAddress: Storage, ...conditions: Conditions[]): Observable<any> {

+ 6 - 0
test/test3.ts

@@ -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