Readme
This commit is contained in:
@ -5,6 +5,8 @@ Libs used for benchmark:
|
|||||||
- [pydantic 2.4.2](https://docs.pydantic.dev/latest/)
|
- [pydantic 2.4.2](https://docs.pydantic.dev/latest/)
|
||||||
- [msgspec 0.18.4](https://jcristharif.com/msgspec/index.html)
|
- [msgspec 0.18.4](https://jcristharif.com/msgspec/index.html)
|
||||||
|
|
||||||
|
Note that Pydantic used in benchmark is v2 which should be dozen of times faster than Pydantic v1. I have no time to waste benchmarking Pydantic v1.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Install virtual environment
|
### Install virtual environment
|
||||||
@ -50,4 +52,11 @@ Finished in 1.725s
|
|||||||
╚██╔╝ ██║ ██║██║ ██║ ╚════██║██║ ██║██║ ██╔═██╗ ██╔══██╗██╔══██║██║ ██║ ╚════██║
|
╚██╔╝ ██║ ██║██║ ██║ ╚════██║██║ ██║██║ ██╔═██╗ ██╔══██╗██╔══██║██║ ██║ ╚════██║
|
||||||
██║ ╚██████╔╝╚██████╔╝ ███████║╚██████╔╝╚██████╗██║ ██╗ ██████╔╝██║ ██║███████╗███████╗███████║
|
██║ ╚██████╔╝╚██████╔╝ ███████║╚██████╔╝╚██████╗██║ ██╗ ██████╔╝██║ ██║███████╗███████╗███████║
|
||||||
╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝
|
╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝
|
||||||
|
|
||||||
|
██████╗ ██╗ ██████╗ ████████╗██╗███╗ ███╗███████╗
|
||||||
|
██╔══██╗██║██╔════╝ ╚══██╔══╝██║████╗ ████║██╔════╝
|
||||||
|
██████╔╝██║██║ ███╗ ██║ ██║██╔████╔██║█████╗
|
||||||
|
██╔══██╗██║██║ ██║ ██║ ██║██║╚██╔╝██║██╔══╝
|
||||||
|
██████╔╝██║╚██████╔╝ ██║ ██║██║ ╚═╝ ██║███████╗
|
||||||
|
╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝
|
||||||
```
|
```
|
||||||
|
|||||||
@ -6,8 +6,4 @@ from benchmark.msgspec_benchmark.models import PlanogramsBulkInputPayload
|
|||||||
class MsgSpecBenchmark(BenchmarkBase):
|
class MsgSpecBenchmark(BenchmarkBase):
|
||||||
def _benchmark(self) -> None:
|
def _benchmark(self) -> None:
|
||||||
test_data = self._read_test_file()
|
test_data = self._read_test_file()
|
||||||
|
|
||||||
# decoder = msgspec.json.Decoder(PlanogramsBulkInputPayload).decode
|
|
||||||
# decoder.loads(test_data)
|
|
||||||
|
|
||||||
data = msgspec.json.decode(test_data, type=PlanogramsBulkInputPayload)
|
data = msgspec.json.decode(test_data, type=PlanogramsBulkInputPayload)
|
||||||
|
|||||||
Reference in New Issue
Block a user