Files
pydantic-vs-msgspec/benchmark/msgspec_benchmark/benchmark.py
2023-10-11 21:07:02 +02:00

14 lines
440 B
Python

import msgspec
from benchmark.base import BenchmarkBase
from benchmark.msgspec_benchmark.models import PlanogramsBulkInputPayload
class MsgSpecBenchmark(BenchmarkBase):
def _benchmark(self) -> None:
test_data = self._read_test_file()
# decoder = msgspec.json.Decoder(PlanogramsBulkInputPayload).decode
# decoder.loads(test_data)
data = msgspec.json.decode(test_data, type=PlanogramsBulkInputPayload)