rocaver opened a new issue, #5810:
URL: https://github.com/apache/hop/issues/5810
I have been trying to capture the execution time of a workflow to be able to
pass it down to a file or email.
An AI bot showed me that Apache Hop managed this internal variables:
${Internal.Workflow.ExecutionDuration} Total execution time of the workflow,
expressed in seconds (e.g., 306 for 5 min 6 sec) or also start/end timestamps
(${Internal.Workflow.StartDateTime} / ${Internal.Workflow.EndDateTime}) .
The issue is that I always get 0 seconds as a result. Any guidance is
appreciated.
I have been trying:
Add a “Dummy” transform as the last step of the workflow – it does nothing
but lets you attach downstream steps.
Connect the dummy to a Calculator (or JavaScript) transform.
Inside the calculator, create three new fields:
duration_min Divide by constant ${Internal.Workflow.ExecutionDuration}
/ 60
duration_sec Modulo constant ${Internal.Workflow.ExecutionDuration} % 60
duration_str Concatenate ROUND(duration_min,0) + ' min ' +
ROUND(duration_sec,0) + ' sec'
Now you have a string like "5 min 6 sec" stored in duration_str.
(If you prefer to keep the raw seconds, you can skip this step and just use
${Internal.Workflow.ExecutionDuration} directly.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]