Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jan 2, 2022
1 parent 7461597 commit 9f1a3b9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/history/normalize/compress.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const compressRawResult = function ({
}) {
const system = compressSystem(systems)
const combinationsA = combinations.map((combination) =>
compressCombination({ combination }),
compressCombination(combination),
)
return { ...rawResult, system, combinations: combinationsA }
}
Expand All @@ -23,12 +23,10 @@ const compressSystem = function ([{ dimensions, ...system }]) {
}

const compressCombination = function ({
combination: {
dimensions,
stats,
stats: { histogram, quantiles, mean },
...combination
},
dimensions,
stats,
stats: { histogram, quantiles, mean },
...combination
}) {
const dimensionsA = mapObj(dimensions, compressDimension)
const histogramA = compressHistogram(histogram, mean)
Expand Down

0 comments on commit 9f1a3b9

Please sign in to comment.