Skip to content

Conversation

@stasimus
Copy link
Contributor

Add SequentiallyMetricsF and MeteredSequentiallyF with comprehensive test coverage

  • Add SequentiallyMetricsF: Prometheus metrics tracking for SequentiallyF operations

    • Factory pattern for creating metrics instances with configurable prefixes
    • Queue time and run time metrics recording
    • Support for custom metric names and labels
  • Add MeteredSequentiallyF: Wrapper around SequentiallyF with integrated metrics

    • Delegates to SequentiallyF while adding metrics tracking
    • Supports both apply (Future-based) and applyF (F-based) APIs
    • Records queue and run metrics for all operations
  • Add comprehensive unit tests:

    • SequentiallyMetricsFSpec: 15+ test cases covering factory, metrics recording,
      exception handling, and integration scenarios
    • MeteredSequentiallyFSpec: 13+ test cases covering sequential/parallel execution,
      metrics integration, exception handling, and factory pattern
  • Fix MeteredSequentiallyF compilation issues:

    • Rename second apply method to applyF to avoid ambiguity
    • Fix metrics integration to use applyF instead of apply
    • Properly handle Future-based apply with metrics
  • Add test dependencies:

    • Scalatest % Test to sequentially-ce-metrics module
    • CatsEffect.effect for IO-based testing
  • Rename SequentiallyCatsSpec to SequentiallyFSpec for consistency

All tests compile successfully for Scala 2.13 and 3.3.6.

sshevchenko added 2 commits November 14, 2025 15:00
…test coverage

- Add SequentiallyMetricsF: Prometheus metrics tracking for SequentiallyF operations
  * Factory pattern for creating metrics instances with configurable prefixes
  * Queue time and run time metrics recording
  * Support for custom metric names and labels

- Add MeteredSequentiallyF: Wrapper around SequentiallyF with integrated metrics
  * Delegates to SequentiallyF while adding metrics tracking
  * Supports both apply (Future-based) and applyF (F-based) APIs
  * Records queue and run metrics for all operations

- Add comprehensive unit tests:
  * SequentiallyMetricsFSpec: 15+ test cases covering factory, metrics recording,
    exception handling, and integration scenarios
  * MeteredSequentiallyFSpec: 13+ test cases covering sequential/parallel execution,
    metrics integration, exception handling, and factory pattern

- Fix MeteredSequentiallyF compilation issues:
  * Rename second apply method to applyF to avoid ambiguity
  * Fix metrics integration to use applyF instead of apply
  * Properly handle Future-based apply with metrics

- Add test dependencies:
  * Scalatest % Test to sequentially-ce-metrics module
  * CatsEffect.effect for IO-based testing

- Rename SequentiallyCatsSpec to SequentiallyFSpec for consistency
@coveralls
Copy link

coveralls commented Nov 14, 2025

Pull Request Test Coverage Report for Build 19433498421

Details

  • 4 of 5 (80.0%) changed or added relevant lines in 2 files are covered.
  • 11 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-3.5%) to 65.101%

Changes Missing Coverage Covered Lines Changed/Added Lines %
benchmark/src/main/scala/com/evolutiongaming/concurrent/sequentially/SequentiallyCatsVsAkkaBenchmark.scala 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
sequentially/src/main/scala/com/evolutiongaming/concurrent/sequentially/SequentiallyHandler.scala 1 96.67%
sequentially/src/main/scala/com/evolutiongaming/concurrent/sequentially/Sequentially.scala 1 90.57%
sequentially/src/main/scala/com/evolutiongaming/concurrent/sequentially/SequentiallyAsync.scala 2 73.33%
sequentially-metrics/src/main/scala/com/evolutiongaming/concurrent/SequentiallyMetrics.scala 7 0.0%
Totals Coverage Status
Change from base Build 19264799664: -3.5%
Covered Lines: 194
Relevant Lines: 298

💛 - Coveralls

@stasimus stasimus merged commit 07cb68f into master Nov 17, 2025
5 checks passed
@stasimus stasimus deleted the sequentially-ce-metrics branch November 19, 2025 10:45
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