Skip to content

Commit

Permalink
set all vars in a single action for the benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviergonz committed Mar 28, 2024
1 parent 00584b3 commit 1e62e7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/benchmark/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { action } from "mobx"
import {
fromSnapshot,
getSnapshot,
Expand Down Expand Up @@ -193,7 +194,7 @@ for (const tcMode of tcModes) {
await waitBetweenBenchmarks()
}

const setVars = (x: any) => {
const setVars = action((x: any) => {
bigModelBigVars.forEach((bmbv) => {
const small = x[bmbv]
smallModelVars.forEach((smv) => {
Expand All @@ -203,7 +204,7 @@ for (const tcMode of tcModes) {
bigModelSmallVars.forEach((bmsv) => {
x["set" + bmsv.toUpperCase()](x[bmsv] + "x")
})
}
})

{
const bm1 = new bigModel({})
Expand Down

0 comments on commit 1e62e7e

Please sign in to comment.