Skip to content

Commit

Permalink
prettier format
Browse files Browse the repository at this point in the history
  • Loading branch information
oflatt committed Oct 29, 2024
1 parent fc540fd commit 13be69d
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions infra/nightly-resources/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ function getBrilPathForBenchmark(benchmark) {

// calculates the geometric mean over a list of ratios
function geometricMean(values) {
return Math.pow(values.reduce((a, b) => a * b, 1), 1 / values.length);
return Math.pow(
values.reduce((a, b) => a * b, 1),
1 / values.length,
);
}

function getOverallStatistics() {
Expand Down Expand Up @@ -104,7 +107,10 @@ function getDataForBenchmark(benchmark) {
?.filter((row) => row.benchmark === benchmark)
.map((row) => {
const baseline = getRow(benchmark, BASELINE_MODE);
const comparisonCycles = getComparison(row.benchmark, row.runMethod)?.cycles;
const comparisonCycles = getComparison(
row.benchmark,
row.runMethod,
)?.cycles;
const cycles = row["cycles"];
const rowData = {
runMethod: row.runMethod,
Expand All @@ -115,11 +121,21 @@ function getDataForBenchmark(benchmark) {
max: { class: "", value: tryRound(max_cycles(cycles)) },
maxVsBaseline: getDifference(cycles, comparisonCycles, max_cycles),
median: { class: "", value: tryRound(median_cycles(cycles)) },
medianVsBaseline: getDifference(cycles, comparisonCycles, median_cycles),
medianVsBaseline: getDifference(
cycles,
comparisonCycles,
median_cycles,
),
stddev: { class: "", value: tryRound(median_cycles(cycles)) },
eggccCompileTimeSecs: { class: "", value: tryRound(row.eggccCompileTimeSecs) },
llvmCompileTimeSecs: { class: "", value: tryRound(row.llvmCompileTimeSecs) },
speedup: { class: "", value: tryRound(speedup(row, baseline)) },
eggccCompileTimeSecs: {
class: "",
value: tryRound(row.eggccCompileTimeSecs),
},
llvmCompileTimeSecs: {
class: "",
value: tryRound(row.llvmCompileTimeSecs),
},
speedup: { class: "", value: tryRound(speedup(row, baseline)) },
};
if (shouldHaveLlvm(row.runMethod)) {
rowData.runMethod = `<a target="_blank" rel="noopener noreferrer" href="llvm.html?benchmark=${benchmark}&runmode=${row.runMethod}">${row.runMethod}</a>`;
Expand Down

0 comments on commit 13be69d

Please sign in to comment.