Skip to content

Commit

Permalink
Fix errors in deeply nested models implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinitto committed Jul 20, 2024
1 parent e14c94d commit a3876ba
Show file tree
Hide file tree
Showing 10 changed files with 314 additions and 231 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,6 @@ cython_debug/

env3.7/
/lua_scripts/
.DS_Store
.DS_Store

*.lua
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Added

### Changed

- Added support for deeply nested models beyond level-1 deep including:
- dictionaries of lists of ... of nested models
- lists of tuples of lists .... of nested models

### Fixed


## [0.6.0] - 2024-07-01

### Added
Expand Down
55 changes: 27 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,36 +88,35 @@ benchmark_bulk_insert[redis_store] 721.2247 (6.19) 6
---------------------------------------------------------------------------------------------------------------------
```

# >=v0.7 (with fully-fledged nested models)
# >=v0.7 (with deeply nested models)

```
--------------------------------------------------- benchmark: 22 tests ----------------------------------------------------
Name (time in us) Mean Min Max
----------------------------------------------------------------------------------------------------------------------------
test_benchmark_delete[redis_store-Wuthering Heights] 124.5440 (1.01) 109.3710 (1.0) 579.7810 (1.39)
test_benchmark_bulk_delete[redis_store] 122.9285 (1.0) 113.7120 (1.04) 492.2730 (1.18)
test_benchmark_select_columns_for_one_id[redis_store-book1] 182.3891 (1.48) 154.9150 (1.42) 441.2820 (1.06)
test_benchmark_select_columns_for_one_id[redis_store-book2] 183.2679 (1.49) 156.6830 (1.43) 462.6000 (1.11)
test_benchmark_select_columns_for_one_id[redis_store-book0] 181.6972 (1.48) 157.2330 (1.44) 459.2930 (1.10)
test_benchmark_select_columns_for_one_id[redis_store-book3] 183.0834 (1.49) 160.1250 (1.46) 416.8570 (1.0)
test_benchmark_select_all_for_one_id[redis_store-book1] 203.9491 (1.66) 183.3080 (1.68) 469.4700 (1.13)
test_benchmark_select_all_for_one_id[redis_store-book2] 206.7124 (1.68) 184.1920 (1.68) 490.6700 (1.18)
test_benchmark_select_all_for_one_id[redis_store-book0] 207.3341 (1.69) 184.2210 (1.68) 443.9260 (1.06)
test_benchmark_select_all_for_one_id[redis_store-book3] 210.6874 (1.71) 185.0600 (1.69) 696.9330 (1.67)
test_benchmark_select_columns_for_some_items[redis_store] 236.5783 (1.92) 215.7490 (1.97) 496.0540 (1.19)
test_benchmark_select_columns_paginated[redis_store] 248.5335 (2.02) 218.3450 (2.00) 522.1270 (1.25)
test_benchmark_update[redis_store-Wuthering Heights-data0] 282.1803 (2.30) 239.5410 (2.19) 541.5220 (1.30)
test_benchmark_select_some_items[redis_store] 298.2036 (2.43) 264.0860 (2.41) 599.3010 (1.44)
test_benchmark_single_insert[redis_store-book0] 316.0245 (2.57) 269.8110 (2.47) 596.0940 (1.43)
test_benchmark_single_insert[redis_store-book2] 314.1899 (2.56) 270.9780 (2.48) 560.5280 (1.34)
test_benchmark_select_default_paginated[redis_store] 305.2798 (2.48) 277.8170 (2.54) 550.5110 (1.32)
test_benchmark_single_insert[redis_store-book1] 312.5839 (2.54) 279.5660 (2.56) 578.7070 (1.39)
test_benchmark_single_insert[redis_store-book3] 316.9207 (2.58) 284.8630 (2.60) 567.0120 (1.36)
test_benchmark_select_columns[redis_store] 369.1538 (3.00) 331.5770 (3.03) 666.0470 (1.60)
test_benchmark_select_default[redis_store] 553.9420 (4.51) 485.3700 (4.44) 1,235.8540 (2.96)
test_benchmark_bulk_insert[redis_store] 777.4058 (6.32) 730.4280 (6.68) 1,012.7780 (2.43)
----------------------------------------------------------------------------------------------------------------------------
------------------------------------------------- benchmark: 22 tests -------------------------------------------------
Name (time in us) Mean Min Max
-----------------------------------------------------------------------------------------------------------------------
benchmark_delete[redis_store-Wuthering Heights] 123.2946 (1.02) 107.9690 (1.0) 502.6140 (1.33)
benchmark_bulk_delete[redis_store] 120.5815 (1.0) 111.9320 (1.04) 378.8660 (1.0)
benchmark_select_columns_for_one_id[redis_store-book2] 208.2612 (1.73) 180.4660 (1.67) 470.9860 (1.24)
benchmark_select_columns_for_one_id[redis_store-book1] 207.9143 (1.72) 180.6440 (1.67) 489.6890 (1.29)
benchmark_select_columns_for_one_id[redis_store-book0] 204.2471 (1.69) 183.4360 (1.70) 485.2500 (1.28)
benchmark_select_columns_for_one_id[redis_store-book3] 209.5764 (1.74) 189.5780 (1.76) 462.5650 (1.22)
benchmark_select_all_for_one_id[redis_store-book0] 226.4569 (1.88) 207.4920 (1.92) 499.9470 (1.32)
benchmark_select_all_for_one_id[redis_store-book3] 241.5488 (2.00) 210.5230 (1.95) 504.5150 (1.33)
benchmark_select_all_for_one_id[redis_store-book1] 234.4014 (1.94) 210.6420 (1.95) 501.2470 (1.32)
benchmark_select_all_for_one_id[redis_store-book2] 228.9277 (1.90) 212.0090 (1.96) 509.5740 (1.34)
benchmark_update[redis_store-Wuthering Heights-data0] 276.3908 (2.29) 238.3390 (2.21) 704.9450 (1.86)
benchmark_single_insert[redis_store-book3] 311.0476 (2.58) 262.2940 (2.43) 589.3940 (1.56)
benchmark_select_columns_for_some_items[redis_store] 291.2779 (2.42) 266.0960 (2.46) 564.3510 (1.49)
benchmark_select_columns_paginated[redis_store] 300.4108 (2.49) 269.4740 (2.50) 552.8510 (1.46)
benchmark_single_insert[redis_store-book1] 304.5771 (2.53) 274.1740 (2.54) 547.5210 (1.45)
benchmark_single_insert[redis_store-book2] 317.2681 (2.63) 275.6170 (2.55) 641.5440 (1.69)
benchmark_single_insert[redis_store-book0] 313.0004 (2.60) 277.3190 (2.57) 558.2160 (1.47)
benchmark_select_some_items[redis_store] 343.2569 (2.85) 311.9140 (2.89) 624.6600 (1.65)
benchmark_select_default_paginated[redis_store] 359.8463 (2.98) 325.8310 (3.02) 623.2360 (1.65)
benchmark_select_columns[redis_store] 486.6047 (4.04) 429.3250 (3.98) 867.8780 (2.29)
benchmark_select_default[redis_store] 631.3835 (5.24) 584.7630 (5.42) 1,033.5990 (2.73)
benchmark_bulk_insert[redis_store] 761.0832 (6.31) 724.1240 (6.71) 1,034.2950 (2.73)
-----------------------------------------------------------------------------------------------------------------------
```

## Contributions
Expand Down
Loading

0 comments on commit a3876ba

Please sign in to comment.