Преглед на файлове

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

FAMBL преди 1 година
родител
ревизия
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