from pathlib import Path

from benchmark.attrs_benchmark.benchmark import AttrsBenchmark
from benchmark.factories import create_test_file
from benchmark.msgspec_benchmark.benchmark import MsgSpecBenchmark
from benchmark.pydantic_benchmark.benchmark import PydanticBenchmark


TEST_DATA_FILE = Path("test_data.json")
BIG_TEST_DATA_FILE = Path("test_data-big.json")


def main(test_file: Path) -> None:
    pydantic_benchmark = PydanticBenchmark(test_file)
    pydantic_benchmark.execute()

    attrs_benchmark = AttrsBenchmark(test_file)
    attrs_benchmark.execute()

    msgspec_benchmark = MsgSpecBenchmark(test_file)
    msgspec_benchmark.execute()


if __name__ == "__main__":
    # create_test_file(BIG_TEST_DATA_FILE)
    main(BIG_TEST_DATA_FILE)
