fix: fix async task statistics accounting
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 9 Jul 2023 13:44:03 +0000 (15:44 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 9 Jul 2023 13:44:03 +0000 (15:44 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/worker/abstract-worker.ts

index 1eac74272554b622086ffc20ad8738fa9874fd62..23739270b3a9863c20ea1a212004b2a94e982335 100644 (file)
@@ -292,7 +292,7 @@ export abstract class AbstractWorker<
     fn: WorkerAsyncFunction<Data, Response>,
     message: MessageValue<Data>
   ): void {
-    let taskPerformance = this.beginTaskPerformance()
+    let taskPerformance = this.beginTaskPerformance(message.name)
     fn(message.data)
       .then(res => {
         taskPerformance = this.endTaskPerformance(taskPerformance)