Skip to content

Commit

Permalink
docs: Update legacy benchmark to properly perform date conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
ntucker committed Dec 18, 2023
1 parent 5885eb9 commit 604502e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/benchmark/old-normalizr/normalizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ export default function addNormlizrSuite(suite) {
})
.add('denormalizeShort donotcache 500x', () => {
for (let i = 0; i < 500; ++i) {
denormalize('gnoff', User, githubState.entities);
const user = denormalize('gnoff', User, githubState.entities);
// legacy normalizr doesn't convert this for us, so we must do manually afterward.
user.createdAt = new Date(user.createdAt);
user.updatedAt = new Date(user.updatedAt);
}
})
.on('complete', function () {
Expand Down

0 comments on commit 604502e

Please sign in to comment.