From 162ea5d969ef48585fdfa07125a2cba687fbd404 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 31 May 2023 10:51:54 +0100 Subject: [PATCH] update log formatting --- packages/server/src/threads/automation.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/server/src/threads/automation.ts b/packages/server/src/threads/automation.ts index ed16b27197..17afa3d54e 100644 --- a/packages/server/src/threads/automation.ts +++ b/packages/server/src/threads/automation.ts @@ -252,6 +252,7 @@ class Orchestrator { return } } + const start = performance.now() for (let step of automation.definition.steps) { if (timeoutFlag) { break @@ -473,6 +474,14 @@ class Orchestrator { } } + const end = performance.now() + const executionTime = end - start + + console.info(`Execution time: ${executionTime} milliseconds`, { + _logKey: "automation", + executionTime, + }) + // store the logs for the automation run try { await storeLog(this._automation, this.executionOutput)