-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance: Change Schema.normalize interface #3134
Conversation
🦋 Changeset detectedLatest commit: 4096ece The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3134 +/- ##
=======================================
Coverage 98.79% 98.79%
=======================================
Files 127 126 -1
Lines 2243 2249 +6
Branches 455 460 +5
=======================================
+ Hits 2216 2222 +6
Misses 16 16
Partials 11 11 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
Benchmark suite | Current: 4096ece | Previous: 7bd322d | Ratio |
---|---|---|---|
normalizeLong |
503 ops/sec (±0.65% ) |
450 ops/sec (±1.81% ) |
0.89 |
infer All |
9696 ops/sec (±0.47% ) |
9576 ops/sec (±1.57% ) |
0.99 |
denormalizeLong |
342 ops/sec (±1.29% ) |
328 ops/sec (±2.51% ) |
0.96 |
denormalizeLong donotcache |
889 ops/sec (±0.52% ) |
888 ops/sec (±1.56% ) |
1.00 |
denormalizeShort donotcache 500x |
1355 ops/sec (±0.23% ) |
1351 ops/sec (±0.14% ) |
1.00 |
denormalizeShort 500x |
973 ops/sec (±0.22% ) |
986 ops/sec (±0.26% ) |
1.01 |
denormalizeShort 500x withCache |
4821 ops/sec (±0.18% ) |
4966 ops/sec (±0.33% ) |
1.03 |
denormalizeLong with mixin Entity |
301 ops/sec (±0.27% ) |
302 ops/sec (±0.30% ) |
1.00 |
denormalizeLong withCache |
7129 ops/sec (±0.17% ) |
7339 ops/sec (±0.24% ) |
1.03 |
denormalizeLong All withCache |
6690 ops/sec (±0.30% ) |
6888 ops/sec (±0.17% ) |
1.03 |
denormalizeLong Query-sorted withCache |
6612 ops/sec (±0.59% ) |
6540 ops/sec (±0.97% ) |
0.99 |
denormalizeLongAndShort withEntityCacheOnly |
1488 ops/sec (±0.53% ) |
1571 ops/sec (±0.42% ) |
1.06 |
getResponse |
5946 ops/sec (±1.09% ) |
6046 ops/sec (±1.32% ) |
1.02 |
getResponse (null) |
5346945 ops/sec (±0.84% ) |
6178925 ops/sec (±0.96% ) |
1.16 |
getResponse (clear cache) |
292 ops/sec (±0.26% ) |
297 ops/sec (±0.34% ) |
1.02 |
getSmallResponse |
2593 ops/sec (±0.16% ) |
2683 ops/sec (±0.53% ) |
1.03 |
getSmallInferredResponse |
2069 ops/sec (±0.24% ) |
2027 ops/sec (±0.61% ) |
0.98 |
getResponse Query-sorted |
6553 ops/sec (±0.66% ) |
6579 ops/sec (±0.76% ) |
1.00 |
getResponse Collection |
6308 ops/sec (±1.13% ) |
6281 ops/sec (±1.16% ) |
1.00 |
get Collection |
5517 ops/sec (±1.01% ) |
5455 ops/sec (±1.11% ) |
0.99 |
setLong |
507 ops/sec (±0.24% ) |
454 ops/sec (±1.98% ) |
0.90 |
setLongWithMerge |
194 ops/sec (±0.47% ) |
188 ops/sec (±1.48% ) |
0.97 |
setLongWithSimpleMerge |
205 ops/sec (±0.54% ) |
195 ops/sec (±1.35% ) |
0.95 |
setSmallResponse 500x |
871 ops/sec (±0.51% ) |
831 ops/sec (±1.14% ) |
0.95 |
This comment was automatically generated by workflow using github-action-benchmark.
4a96d27
to
c43db74
Compare
157a636
to
151602e
Compare
8e25661
to
2f5d1d8
Compare
Motivation
Schema methods should have limitations in args sent
Recursive calls should not require re-passing functions
Ordering of args should be as consistent as possible to help with readability
Solution
Open questions
Args order: There are legit cases where it's nice to not specify args because there are none. This means we should place args last to give it a default. However, this makes ordering inconsistent with other functions like query which always has an args.