chore: apply pending code updates
This commit is contained in:
@@ -4,6 +4,7 @@ This module tests the performance characteristics of batch NFO creation
|
||||
including concurrent operations, TMDB API request optimization, and memory usage.
|
||||
"""
|
||||
import asyncio
|
||||
import logging
|
||||
import time
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
@@ -15,6 +16,8 @@ from src.core.services.nfo_service import NFOService
|
||||
from src.server.api.nfo import batch_create_nfo
|
||||
from src.server.models.nfo import NFOBatchCreateRequest
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TestConcurrentNFOCreation:
|
||||
"""Test performance of concurrent NFO creation operations."""
|
||||
@@ -83,8 +86,11 @@ class TestConcurrentNFOCreation:
|
||||
# Concurrent should take roughly (num_series / 5) * 0.1 = 0.2s
|
||||
assert elapsed_time < 1.0, "Concurrency not providing speedup"
|
||||
|
||||
print(f"\nPerformance: {num_series} series in {elapsed_time:.2f}s")
|
||||
print(f"Rate: {num_series / elapsed_time:.2f} series/second")
|
||||
logger.info("Batch NFO creation completed", extra={"num_series": num_series, "elapsed_s": elapsed_time})
|
||||
logger.debug(
|
||||
"Batch NFO creation rate",
|
||||
extra={"series_per_second": num_series / elapsed_time},
|
||||
)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_concurrent_nfo_creation_50_series(self):
|
||||
|
||||
Reference in New Issue
Block a user