"""pywrkr - A Python HTTP benchmarking tool inspired by wrk and Apache ab."""

__all__ = [
    # pywrkr.config
    "RequestResult",
    "LatencyBreakdown",
    "WorkerStats",
    "BenchmarkConfig",
    "Threshold",
    "AutofindConfig",
    "StepResult",
    "ScenarioStep",
    "Scenario",
    "load_scenario",
    "SSLConfig",
    # pywrkr.traffic_profiles
    "TrafficProfile",
    "SineProfile",
    "StepProfile",
    "SawtoothProfile",
    "SquareProfile",
    "SpikeProfile",
    "BusinessHoursProfile",
    "CsvProfile",
    "parse_traffic_profile",
    "RateLimiter",
    # pywrkr.reporting
    "RICH_AVAILABLE",
    "OTEL_AVAILABLE",
    "format_bytes",
    "format_duration",
    "print_latency_histogram",
    "compute_percentiles",
    "parse_threshold",
    "evaluate_thresholds",
    "_get_metric_value",
    "_compare",
    "print_threshold_results",
    "print_percentiles",
    "print_rps_timeline",
    "build_results_dict",
    "write_csv_output",
    "write_json_output",
    "generate_html_report",
    "generate_gatling_html_report",
    "_html_escape",
    "write_html_report",
    "export_to_otel",
    "export_to_prometheus",
    "print_results",
    "_format_latency_short",
    "print_autofind_summary",
    "print_multi_url_summary",
    "build_multi_url_json",
    # pywrkr.workers
    "LiveDashboard",
    "make_url",
    "_build_request_headers",
    "_merge_all_stats",
    "_create_ssl_context",
    "create_trace_config",
    "aggregate_breakdowns",
    "worker",
    "user_worker",
    "scenario_worker",
    "show_progress",
    "run_benchmark",
    "run_user_simulation",
    "_step_passed",
    "_extract_step_result",
    "run_autofind",
    "_write_autofind_json",
    # pywrkr.distributed
    "_serialize_config",
    "_deserialize_config",
    "_serialize_stats",
    "_deserialize_stats",
    "_send_msg",
    "_recv_msg",
    "merge_worker_stats",
    "run_master",
    "run_worker_node",
    # pywrkr.multi_url
    "UrlEntry",
    "MultiUrlResult",
    "load_url_file",
    "run_multi_url",
    # pywrkr.har_import
    "HarEntry",
    "HarImportConfig",
    "parse_har",
    "filter_entries",
    "har_to_scenario",
    "har_to_url_file",
    "convert_har",
    # pywrkr.main
    "parse_header",
    "cli_main",
    # version
    "__version__",
]

from pywrkr.config import (
    RequestResult,
    LatencyBreakdown,
    WorkerStats,
    BenchmarkConfig,
    Threshold,
    AutofindConfig,
    StepResult,
    ScenarioStep,
    Scenario,
    SSLConfig,
    load_scenario,
)

from pywrkr.traffic_profiles import (
    TrafficProfile,
    SineProfile,
    StepProfile,
    SawtoothProfile,
    SquareProfile,
    SpikeProfile,
    BusinessHoursProfile,
    CsvProfile,
    parse_traffic_profile,
    RateLimiter,
)

from pywrkr.reporting import (
    RICH_AVAILABLE,
    OTEL_AVAILABLE,
    format_bytes,
    format_duration,
    print_latency_histogram,
    compute_percentiles,
    parse_threshold,
    evaluate_thresholds,
    _get_metric_value,
    _compare,
    print_threshold_results,
    print_percentiles,
    print_rps_timeline,
    build_results_dict,
    write_csv_output,
    write_json_output,
    generate_html_report,
    generate_gatling_html_report,
    _html_escape,
    write_html_report,
    export_to_otel,
    export_to_prometheus,
    print_results,
    _format_latency_short,
    print_autofind_summary,
    print_multi_url_summary,
    build_multi_url_json,
)

from pywrkr.workers import (
    LiveDashboard,
    make_url,
    _build_request_headers,
    _merge_all_stats,
    _create_ssl_context,
    create_trace_config,
    aggregate_breakdowns,
    worker,
    user_worker,
    scenario_worker,
    show_progress,
    run_benchmark,
    run_user_simulation,
    _step_passed,
    _extract_step_result,
    run_autofind,
    _write_autofind_json,
)

from pywrkr.distributed import (
    _serialize_config,
    _deserialize_config,
    _serialize_stats,
    _deserialize_stats,
    _send_msg,
    _recv_msg,
    merge_worker_stats,
    run_master,
    run_worker_node,
)

from pywrkr.multi_url import (
    UrlEntry,
    MultiUrlResult,
    load_url_file,
    run_multi_url,
)

from pywrkr.har_import import (
    HarEntry,
    HarImportConfig,
    parse_har,
    filter_entries,
    har_to_scenario,
    har_to_url_file,
    convert_har,
)

from pywrkr.main import parse_header
# Re-export main function under a different name to avoid shadowing pywrkr.main module
from pywrkr.main import main as cli_main

__version__ = "1.1.1"
