Skip to content

Commit

Permalink
fix: access parent correctly in perf test
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Apr 30, 2021
1 parent 8d50a60 commit bfcb8ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ export default Route.extend({
const payload = await fetch('./fixtures/destroy.json').then((r) => r.json());

performance.mark('start-push-payload');
const result = this.store.push(payload);
const parent = this.store.push(payload);
performance.mark('start-destroy-records');
const parent = result[0];
const childrenPromise = all(
parent
.get('children')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ export default Route.extend({
performance.mark('start-data-generation');
const payload = await fetch('./fixtures/unload.json').then((r) => r.json());
performance.mark('start-push-payload');
const result = this.store.push(payload);
const parent = this.store.push(payload);
performance.mark('start-unload-records');
const parent = result[0];
run(() => {
parent
.get('children')
Expand Down

0 comments on commit bfcb8ae

Please sign in to comment.