Просмотр исходного кода

Merge branch 'master' of https://swopt.com:3000/enzo/Fis-SearchUtility

FAMBL 1 год назад
Родитель
Сommit
1c4caf8cdc
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