Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
oflatt committed Feb 11, 2025
1 parent 72e50dd commit 20ea70e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions infra/nightly-resources/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ function geometricMean(values) {
);
}

// suite can be undefined, in which case it uses all
// suite can be undefined, in which case it uses all
// enabled benchmarks
function getOverallStatistics(suite) {
var benchmarks = enabledBenchmarks();
if (typeof(suite) !== 'undefined') {
if (typeof suite !== "undefined") {
benchmarks = benchmarksInSuite(suite);
}

Expand Down
25 changes: 15 additions & 10 deletions infra/nightly-resources/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ function addTableTo(element, data, title) {
}

function benchmarksInSuite(suite) {
return enabledBenchmarks()
.filter((benchmark) => getRow(benchmark, BASELINE_MODE).suite === suite)
return enabledBenchmarks().filter(
(benchmark) => getRow(benchmark, BASELINE_MODE).suite === suite,
);
}

function tableForSuite(suite) {
const byBench = {};
benchmarksInSuite(suite)
.forEach((benchmark) => {
byBench[benchmark] = getDataForBenchmark(benchmark);
});
benchmarksInSuite(suite).forEach((benchmark) => {
byBench[benchmark] = getDataForBenchmark(benchmark);
});
const tableData = Object.keys(byBench).map((bench) => ({
name: `<a target="_blank" rel="noopener noreferrer" href="https://github.com/egraphs-good/eggcc/tree/main/${getBrilPathForBenchmark(
bench,
Expand Down Expand Up @@ -121,15 +121,20 @@ function refreshView() {
addTableTo(document.getElementById("tables"), overallStats, "Overall Stats");

var latexMacros = "";
latexMacros = latexMacros + jsonToLatexMacros(overallStats, "runMethod", "overall");
latexMacros =
latexMacros + jsonToLatexMacros(overallStats, "runMethod", "overall");

for (const suite of getSuites()) {
const tableData = getOverallStatistics(suite);
addTableTo(document.getElementById("tables"), tableData, suite + " Overall Stats");
latexMacros = latexMacros + jsonToLatexMacros(tableData, "runMethod", suite);
addTableTo(
document.getElementById("tables"),
tableData,
suite + " Overall Stats",
);
latexMacros =
latexMacros + jsonToLatexMacros(tableData, "runMethod", suite);
}


for (const suite of getSuites()) {
const tableData = tableForSuite(suite);
addTableTo(document.getElementById("tables"), tableData, suite + " Stats");
Expand Down

0 comments on commit 20ea70e

Please sign in to comment.