Feature Request:
Problem Description
Currently, workflow execution durations (makespan) are calculated dynamically using the minimum started_at and maximum ended_at times across all its associated tasks. However, this dynamic calculation has several drawbacks:
- Inaccurate Makespan: It misses overhead occurring before the first task starts and after the last task finishes (e.g., orchestration overhead, message transport, garbage collection).
- Missing Tasks: If a workflow executes but fails to capture any tasks (or is a telemetry-only run), it is impossible to determine its duration.
- Query Overhead: Aggregating task-level timestamps to compute workflow duration requires expensive DB queries or pandas operations (e.g., grouping by
workflow_id).
Proposed Solution
Introduce explicit started_at and ended_at timestamps to the WorkflowObject class and capture them via the with Flowcept(): context manager and controller APIs.
-
Update WorkflowObject:
Add started_at and ended_at fields to flowcept/src/flowcept/commons/flowcept_dataclasses/workflow_object.py.
-
Track in Flowcept Controller:
- Record the workflow start time when
Flowcept.start() is called or when the context manager is entered.
- Record the workflow end time when
Flowcept.stop() is called.
- Update/re-send the
WorkflowObject at stopping time, or publish a final workflow status update message.
Reported by @brianetz
Feature Request:
Problem Description
Currently, workflow execution durations (makespan) are calculated dynamically using the minimum
started_atand maximumended_attimes across all its associated tasks. However, this dynamic calculation has several drawbacks:workflow_id).Proposed Solution
Introduce explicit
started_atandended_attimestamps to theWorkflowObjectclass and capture them via thewith Flowcept():context manager and controller APIs.Update
WorkflowObject:Add
started_atandended_atfields to flowcept/src/flowcept/commons/flowcept_dataclasses/workflow_object.py.Track in
FlowceptController:Flowcept.start()is called or when the context manager is entered.Flowcept.stop()is called.WorkflowObjectat stopping time, or publish a final workflow status update message.Reported by @brianetz