Skip to content

Conversation

@quickattach0-tech
Copy link
Owner

Description

Adds comprehensive metrics collection and performance tracking to WorkflowManager for visibility into workflow execution performance and bottleneck identification.

Changes

  • ✅ New WorkflowMetrics class for performance analytics
  • ✅ New StageMetrics class for individual stage metrics
  • ✅ GetWorkflowMetrics() method calculates:
    • Total workflow duration
    • Average stage duration
    • Slowest stage identification
    • Percentage breakdown per stage
  • ✅ SaveMetricsToFile() exports metrics to JSON
  • ✅ DisplayMetrics() shows metrics summary in console
  • ✅ Metrics data includes execution order and success status

Capabilities

  • Identify pipeline bottlenecks
  • Monitor system health over time
  • Generate performance reports
  • Track metrics trending

Example Output

WORKFLOW METRICS: ci-pipeline
Total Duration: 9.50s
Average Stage Duration: 2.38s
Slowest Stage: Testing Stage (5.80s)

STAGE BREAKDOWN:
  Build Stage:
    Duration: 2.50s
    Success: ✓
    Percentage: 26.3%
  Testing Stage:
    Duration: 5.80s
    Success: ✓
    Percentage: 61.1%

Testing

  • ✅ Build succeeds (0 errors)
  • ✅ All existing tests pass

Closes

Closes #4

- Add WorkflowMetrics class to track performance analytics
- Add StageMetrics class for individual stage metrics
- Implement GetWorkflowMetrics() to calculate:
  - Total workflow duration
  - Average stage duration
  - Slowest stage identification
  - Percentage breakdown per stage
- Add SaveMetricsToFile() to export metrics to JSON
- Add DisplayMetrics() to show metrics summary in console
- Metrics include: stage order, duration, success flag, % of total
- Supports performance trending and bottleneck identification
- Closes #4
@quickattach0-tech quickattach0-tech merged commit a0880bb into main Jan 25, 2026
4 checks passed
@quickattach0-tech quickattach0-tech deleted the feature/add-workflow-metrics branch January 25, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add workflow metrics and performance tracking

2 participants