"""
Load Test Configuration

Configuration settings for load testing scenarios
"""
from dataclasses import dataclass
from typing import List


@dataclass
class LoadTestScenario:
    """Configuration for a load test scenario"""
    name: str
    num_users: int
    ramp_up_time: int  # Seconds to gradually ramp up users
    max_workers: int = None  # Max concurrent workers (None = unlimited)
    cohort: str = "adolescent"  # Cohort to use
    complete_full_test: bool = False  # If True, complete full test; if False, minimal test


# Predefined load test scenarios
LOAD_TEST_SCENARIOS = {
    "small": LoadTestScenario(
        name="Small Load Test",
        num_users=10,
        ramp_up_time=5,
        max_workers=10,
        complete_full_test=False
    ),
    "medium": LoadTestScenario(
        name="Medium Load Test",
        num_users=50,
        ramp_up_time=10,
        max_workers=50,
        complete_full_test=False
    ),
    "large": LoadTestScenario(
        name="Large Load Test",
        num_users=100,
        ramp_up_time=20,
        max_workers=100,
        complete_full_test=False
    ),
    "xlarge": LoadTestScenario(
        name="Extra Large Load Test",
        num_users=200,
        ramp_up_time=30,
        max_workers=200,
        complete_full_test=False
    ),
    "stress": LoadTestScenario(
        name="Stress Test",
        num_users=500,
        ramp_up_time=60,
        max_workers=500,
        complete_full_test=False
    ),
    "full_test_small": LoadTestScenario(
        name="Full Test - Small Load",
        num_users=10,
        ramp_up_time=5,
        max_workers=10,
        complete_full_test=True  # Complete full test flow
    ),
}

# Default scenario
DEFAULT_SCENARIO = "medium"

# Load test thresholds
SUCCESS_RATE_THRESHOLD = 80.0  # Minimum success rate percentage
MAX_AVG_DURATION = 300  # Maximum average duration in seconds
MAX_P95_DURATION = 600  # Maximum 95th percentile duration in seconds






