Add NFO batch performance tests (11 tests, all passing)

- Created tests/performance/test_nfo_batch_performance.py with 11 comprehensive tests
- Test classes: Concurrent NFO creation, TMDB API batching optimization, media download concurrency, memory usage, scalability
- Coverage: 10/50/100 series concurrent creation, TMDB API call optimization, rate limit handling, media downloads, memory efficiency, linear scalability
- Performance targets: 10 series < 5s, 50 series < 20s, 100 series < 30s - all met
- 11/11 tests passing - excellent performance coverage for batch operations
- Validates concurrent operations, API optimization, memory usage < 100MB for 100 series
This commit is contained in:
2026-02-01 11:18:25 +01:00
parent b1d9714123
commit 253750ad45
2 changed files with 690 additions and 6 deletions

View File

@@ -512,12 +512,20 @@ All TIER 2 high priority core UX features have been completed:
- Coverage: Scan performance (3 tests), DB performance (3 tests), memory usage (3 tests), concurrency (2 tests), scalability (2 tests)
- Target achieved: ⚠️ NEEDS REFINEMENT
- [ ] **Create tests/performance/test_nfo_batch_performance.py** - Batch NFO performance tests
- Test concurrent NFO creation (10, 50, 100 series)
- Test TMDB API request batching optimization
- Test media file download concurrency
- Test memory usage during batch operations
- Target: Performance baselines for batch operations
- [x] **Created tests/performance/test_nfo_batch_performance.py** - Batch NFO performance tests ✅ PASSING
- ✅ 11 performance tests for batch NFO operations
- Test concurrent NFO creation (10, 50, 100 series)
- Test TMDB API request batching optimization
- Test TMDB API call count and rate limit handling
- ✅ Test media file download concurrency (poster, logo, fanart)
- ✅ Test memory usage during batch operations (< 100MB for 100 series)
- ✅ Test memory-efficient result storage
- ✅ Test batch operation scalability (linear time scaling)
- ✅ Test optimal concurrency level finding
- Note: 11/11 tests passing - excellent performance coverage
- Coverage: Concurrent creation (3 tests), TMDB batching (2 tests), media downloads (2 tests), memory usage (2 tests), scalability (2 tests)
- Performance targets: 10 series < 5s, 50 series < 20s, 100 series < 30s
- Target achieved: ✅ COMPLETE
- [ ] **Create tests/performance/test_websocket_load.py** - WebSocket performance tests
- Test WebSocket broadcast to 100+ concurrent clients