Skip to content

Conversation

@madawei2699
Copy link
Contributor

This PR introduces a new flow execution statistics feature without breaking existing APIs. It is the first phase of implementing execution limits and monitoring capabilities.

Key Changes

  • Add ExecutionStats module for tracking flow execution metrics
  • Integrate statistics collection within Flow module with zero API changes
  • Track important metrics:
    • Steps executed
    • Signal type frequencies
    • Handler call frequencies
    • State size over time
    • Execution duration
  • Add tests covering both basic functionality and edge cases
  • All statistics are collected automatically for every flow execution
  • Statistics can be accessed via Flow.get_last_execution_stats/0

Future Enhancements

This lays the foundation for future phases:

  • Flow execution limits and constraints
  • Performance monitoring and optimization
  • Debugging and tracing tools

The changes are implemented in a backward-compatible manner, ensuring existing code continues to work without modification while enabling new monitoring capabilities.

@madawei2699 madawei2699 merged commit bd85fb5 into main Mar 25, 2025
1 check passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 3ff6c10190ba671e234d76aebc6471aabc2523d8-PR-4

Details

  • 29 of 29 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.5%) to 89.489%

Totals Coverage Status
Change from base Build 1851f3c01f2527c0a0de27dbafae060c0cef189a: 1.5%
Covered Lines: 315
Relevant Lines: 352

💛 - Coveralls

@madawei2699 madawei2699 deleted the feature/execution-stats branch March 25, 2025 11:15
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.

3 participants