Module statistics/collector

Skip Data Collection Service

This module provides automated background collection and scheduling of statistics aggregation operations at configurable intervals. It manages the lifecycle of the statistics collection process, ensuring data is regularly processed without requiring user intervention.

Features:

  • Automated background metrics processing with configurable intervals
  • Intelligent scheduling with efficient resource usage
  • Manual trigger capability for immediate processing
  • Comprehensive logging of aggregation activities
  • Graceful error handling with operation continuity
  • Coordination of multiple aggregation processes in the correct sequence
  • Application state-aware processing that respects system resources

The collection service orchestrates the entire statistics pipeline by:

  1. Scheduling regular aggregation runs at defined intervals
  2. Managing the initial aggregation on startup
  3. Providing status reporting for the UI
  4. Handling manual refresh requests
  5. Ensuring proper cleanup on shutdown

Functions

startSkipMetricsCollection
stopSkipMetricsCollection
isSkipMetricsCollectionActive
triggerManualAggregation