22 lines
602 B
Python
22 lines
602 B
Python
from pathlib import Path
|
|
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()
|
|
|
|
msgspec_benchmark = MsgSpecBenchmark(test_file)
|
|
msgspec_benchmark.execute()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
# create_test_file(TEST_DATA_FILE)
|
|
main(TEST_DATA_FILE)
|