Skip to content

Commit 83502f0

Browse files
committed
internal: Add setSmallResponse bench
1 parent 9f13c35 commit 83502f0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/benchmark/core.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
Endpoint,
77
Entity,
88
normalize,
9-
WeakEntityMap,
109
} from './dist/index.js';
1110
import { printStatus } from './printStatus.js';
1211
import {
@@ -160,6 +159,12 @@ export default function addReducerSuite(suite) {
160159
.add('setLongWithSimpleMerge', () => {
161160
return controllerPop.setResponse(getProjectSimple, data);
162161
})
162+
.add('setSmallResponse 500x', () => {
163+
// more commonly we'll be dealing with many usages of simple data
164+
for (let i = 0; i < 500; ++i) {
165+
controller.setResponse(getUser, 'gnoff', userData);
166+
}
167+
})
163168
.on('complete', function () {
164169
if (process.env.SHOW_OPTIMIZATION) {
165170
console.error('reducer bench complete\n');

0 commit comments

Comments
 (0)