from typing import Any
from dataclasses import dataclass


@dataclass
class Result:
    data: Any


@dataclass
class Metrics:
    time: int
    resources: dict[str, int]


@dataclass
class ComparisonReport:
    improvements: dict[str, float]


class TestScenario:
    def __init__(self, id: str, name: str, configuration: dict[str, Any]) -> None:
        self.id = id
        self.name = name
        self.configuration = configuration
    
    def execute(self) -> Result:
        pass


class Optimizer:
    def optimize(self, scenario: TestScenario) -> TestScenario:
        pass


class MetricsCollector:
    def collect_metrics(self, result: Result) -> Metrics:
        pass


class ComparisonTool:
    def compare(self, before: Metrics, after: Metrics) -> ComparisonReport:
        pass


class RecommendationGenerator:
    def generate_recommendations(self, report: ComparisonReport) -> list[str]:
        pass


class WebPortal:
    def show_results(self, report: ComparisonReport) -> None:
        pass
    
    def show_recommendations(self, recommendations: list[str]) -> None:
        pass 