Skip to content

Commit

Permalink
Move addToHistory()
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jan 9, 2022
1 parent 89ca82a commit 00012a7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/run/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ export const performRun = async function ({
} = await reportStart(result, historyA, config)

try {
const {
rawResult: rawResultA,
programmaticResult,
contents,
} = await previewAndMeasure({
const { programmaticResult, contents } = await previewAndMeasure({
rawResult,
result: resultA,
sinceResult,
Expand All @@ -53,7 +49,6 @@ export const performRun = async function ({
config: configA,
})
await reportPrint(contents)
await addToHistory(rawResultA, config)
return programmaticResult
} finally {
await reportEnd(configA)
Expand Down Expand Up @@ -88,6 +83,7 @@ const previewAndMeasure = async function ({
noDimensions,
})
const rawResultA = normalizeMeasuredResult({ ...rawResult, combinations })
await addToHistory(rawResultA, config)
const resultA = updateCombinationsStats(result, combinations)
const { programmaticResult, contents } = await reportCompute({
result: resultA,
Expand All @@ -96,7 +92,7 @@ const previewAndMeasure = async function ({
config,
})
await endPreview(previewStateA)
return { rawResult: rawResultA, programmaticResult, contents }
return { programmaticResult, contents }
} catch (error) {
await endPreview(previewStateA, error)
throw error
Expand Down

0 comments on commit 00012a7

Please sign in to comment.