Skip to content

Commit

Permalink
Move minLoopDuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Nov 28, 2021
1 parent 3b9582a commit a919bd5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/run/measure/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,14 @@ const runMainEvents = async function (args) {
}

try {
const minLoopDuration = await getMinLoopDuration(args)
const startStat = startRunDuration()
await beforeCombination(args.server)
const stats = await getCombinationStats({ ...args, startStat })
const stats = await getCombinationStats({
...args,
startStat,
minLoopDuration,
})
await afterCombination(args)
return endRunDuration(startStat, stats)
} catch (error) {
Expand Down Expand Up @@ -89,8 +94,7 @@ const beforeCombination = async function (server) {

const getCombinationStats = async function (args) {
try {
const minLoopDuration = await getMinLoopDuration(args)
return await performMeasureLoop({ ...args, minLoopDuration })
return await performMeasureLoop(args)
} catch (error) {
await silentAfterCombination(args)
throw error
Expand Down

0 comments on commit a919bd5

Please sign in to comment.