Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Sep 12, 2021
1 parent f69f4fb commit c73bee4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/combination/sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ import { groupBy } from '../utils/group.js'

import { COMBINATION_DIMENSIONS } from './dimensions.js'

// Sort combinations based on their `stats.mean`.
// Sort `result.combinations` based on their `stats.mean`.
// Combinations with the same dimension are grouped together in the sorting
// order.
// This sorting order should be used by reporters to sort their rows.
// When grouping dimensions (e.g. using tables columns), some combinations
// of specific ids might be missing
// - This can happen due to:
// - `select` configuration property
// - Variations being runner-specific
// - Those should be filtered out, as opposed to showing empty rows|columns
export const sortCombinations = function (result) {
const sortFunctions = COMBINATION_DIMENSIONS.map(({ idName }) =>
getSortFunction(idName, result.combinations),
Expand Down

0 comments on commit c73bee4

Please sign in to comment.