Synchronization Timing and Performance Monitoring
The OpenConnector SynchronizationService now includes comprehensive timing measurements for external-to-internal synchronization operations. This feature provides detailed insights into performance bottlenecks and helps optimize synchronization processes.
Overview
The timing system tracks the duration of each stage in the synchronization process, providing:
- Stage-by-stage timing: Detailed breakdown of time spent in each synchronization phase
- Object-level metrics: Individual processing times for each synchronized object
- Performance analytics: Statistical analysis including averages, medians, and efficiency ratios
- Bottleneck identification: Automatic detection of the slowest stages
- Rate limiting awareness: Tracking of rate limit impacts on performance
Timing Stages
1. Configuration and Validation
- Purpose: Loading synchronization configuration and validating source settings
- Includes:
- Configuration dot notation processing
- Source mapper operations
- Validation checks
- Typical Duration: 1-10ms
2. Fetch Objects
- Purpose: Retrieving objects from the external source
- Includes:
- API calls to external sources
- Pagination handling
- Rate limit management
- Response parsing
- Typical Duration: 100-5000ms (varies by source and object count)
3. Object Preparation
- Purpose: Preparing the fetched object list for processing
- Includes:
- Object counting
- Result position handling
- Data structure preparation
- Typical Duration: 1-5ms
4. Process Objects
- Purpose: Core synchronization logic for individual objects
- Includes:
- Object validation
- Mapping execution
- Contract synchronization
- Target updates
- Typical Duration: 50-500ms per object
5. Cleanup Invalid
- Purpose: Removing objects that no longer exist in the source
- Includes:
- Contract comparison
- Orphaned object deletion
- Database cleanup
- Typical Duration: 10-100ms
6. Follow-ups
- Purpose: Executing follow-up synchronizations
- Includes:
- Follow-up synchronization execution
- Chained synchronization handling
- Typical Duration: Varies by follow-up complexity