Skip to content

Commit

Permalink
Deploying to gh-pages from @ f92e617 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Calinou committed May 9, 2024
0 parents commit 6e3e27b
Show file tree
Hide file tree
Showing 67 changed files with 2,973 additions and 0 deletions.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
benchmarks.godotengine.org
5 changes: 5 additions & 0 deletions benchmark/2023-12-26_13a0d6e9b/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-13_26b1fd0d8/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-14_26b1fd0d8/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-15_26b1fd0d8/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-16_9e65c5c0f/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-18_96296e476/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-19_2ababdcc0/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-20_0bcc0e92b/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-22_0bcc0e92b/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-23_6fea273ed/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-25_4b6ad3498/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-26_503447861/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-27_17e7f85c0/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-28_17e7f85c0/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-29_17e7f85c0/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-01-30_51991e201/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-02-01_9adb7c7d1/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-02-02_9adb7c7d1/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-02-04_b4e2a24c1/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-02-05_b4e2a24c1/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-02-06_d3352813e/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-02-07_d3352813e/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-02-09_41564aaf7/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-02-10_4e990cd7e/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-02-11_4e990cd7e/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-02-12_4e990cd7e/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-05_655e93d58/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-07_e5b4ef8e9/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-08_e5b4ef8e9/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-09_9d6bdbc56/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-15_b8fa48be0/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-16_4728ff30c/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-17_658e97c93/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-18_3b1806182/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-19_9bc49a66b/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-20_4a0160241/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-21_4a0160241/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-22_4a0160241/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-24_c7f56d327/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-27_6118592c6/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-29_6118592c6/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-04-30_89850d553/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-05-09_cff016d6d/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/2024-05-10_c4279fe3e/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/core-callables/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/core-crypto/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/core-rng/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/core-signal/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/gdscript-allocations/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/gdscript-arrays/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/gdscript-string-checksum/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/gdscript-string-format/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/gdscript-string-manipulations/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/physics/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/rendering-culling/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/rendering-hlod/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/rendering-labels/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/rendering-light-and-meches/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions graph/rendering-polygon-sprite-2d/index.html

Large diffs are not rendered by default.

209 changes: 209 additions & 0 deletions graphs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
function getAllowedMetrics() {
const allowedMetrics = new Set();
Database.benchmarks.forEach((benchmark) => {
benchmark.benchmarks.forEach((instance) => {
Object.entries(instance.results).forEach(([key, value]) => {
allowedMetrics.add(key);
});
});
});
return allowedMetrics;
}

function displayGraph(targetDivID, graphID, type = "full", filter = "") {
if (!["full", "compact"].includes(type)) {
throw Error("Unknown chart type");
}

// Include benchmark data JSON to generate graphs.
const allBenchmarks = Database.benchmarks.sort(
(a, b) => `${a.date}.${a.commit}` > `${b.date}.${b.commit}`,
);
const graph = Database.graphs.find((g) => g.id == graphID);
if (!graph) {
throw new Error("Invalid graph ID");
}
// Group by series.
const xAxis = [];
const series = new Map();
const processResult = (path, data, process) => {
Object.entries(data).forEach(([key, value]) => {
if (typeof value === "object") {
processResult(path + "/" + key, value, process);
} else {
// Number
process(path + "/" + key, value);
}
});
};

// Get list all series and fill it in.
allBenchmarks.forEach((benchmark, count) => {
// Process a day/commit
xAxis.push(benchmark.date + "." + benchmark.commit);

// Get all series.
benchmark.benchmarks.forEach((instance) => {
let instanceKey = instance.path.join("/");
if (!instanceKey.startsWith(graph["benchmark-path-prefix"])) {
return;
}
instanceKey = instanceKey.slice(
graph["benchmark-path-prefix"].length + 1,
);

processResult(instanceKey, instance.results, (path, value) => {
// Filter out paths that do not fit the filter
if (filter && !path.includes(filter)) {
return;
}
if (!series.has(path)) {
series.set(path, Array(count).fill(null));
}
series.get(path).push(value);
});
});
});

let customColor = undefined;

if (type === "compact") {
// Kind of "normalize" the series, dividing by the average.
series.forEach((serie, key) => {
let count = 0;
let mean = 0.0;
serie.forEach((el) => {
if (el != null) {
mean += el;
count += 1;
}
});
mean = mean / count;

//const std = Math.sqrt(input.map(x => Math.pow(x - mean, 2)).reduce((a, b) => a + b) / n)
series.set(
key,
serie.map((v) => {
if (v != null) {
return v / mean; // Devide by the mean.
}
return null;
}),
);
});
// Combine all into a single, averaged serie.
const outputSerie = [];
for (let i = 0; i < allBenchmarks.length; i++) {
let count = 0;
let sum = 0;
series.forEach((serie, key) => {
if (serie[i] != null) {
count += 1;
sum += serie[i];
}
});
let point = null;
if (count >= 1) {
point = Math.round((sum * 1000) / count) / 10; // Round to 3 decimals.
}
outputSerie.push(point);
}
series.clear();
series.set("Average", outputSerie);

// Detect whether we went down or not on the last 10 benchmarks.
const lastElementsCount = 3;
const totalConsideredCount = 10;
const lastElements = outputSerie.slice(-lastElementsCount);
const comparedTo = outputSerie.slice(
-totalConsideredCount,
-lastElementsCount,
);
const avgLast = lastElements.reduce((a, b) => a + b) / lastElements.length;
const avgComparedTo =
comparedTo.reduce((a, b) => a + b) / comparedTo.length;
const trend = avgLast - avgComparedTo;

if (trend > 10) {
customColor = "#E20000";
} else if (trend < -10) {
customColor = "#00E200";
}
}

var options = {
series: Array.from(series.entries()).map(([key, value]) => ({
name: key,
data: value,
})),
chart: {
foreColor: "var(--text-bright)",
background: "var(--background)",
height: type === "compact" ? 200 : 600,
type: "line",
zoom: {
enabled: false,
},
toolbar: {
show: false,
},
animations: {
enabled: false,
},
},
tooltip: {
theme: "dark",
y: {
formatter: (value, opts) => (type === "compact" ? value + "%" : value),
},
},
dataLabels: {
enabled: false,
},
stroke: {
curve: "straight",
width: 2,
},
theme: {
palette: "palette4",
},
fill:
type === "compact"
? {
type: "gradient",
gradient: {
shade: "dark",
gradientToColors: ["#4ecdc4"],
shadeIntensity: 1,
type: "horizontal",
opacityFrom: 1,
opacityTo: 1,
stops: [0, 100],
},
}
: {},
colors:
type === "compact"
? customColor
? [customColor]
: ["#4ecdc4"]
: undefined,
xaxis: {
categories: xAxis,
labels: {
show: type !== "compact",
},
},
yaxis: {
tickAmount: 4,
min: type === "compact" ? 0 : undefined,
max: type === "compact" ? 200 : undefined,
},
legend: {
show: type !== "compact",
},
};

var chart = new ApexCharts(document.querySelector(targetDivID), options);
chart.render();
}
13 changes: 13 additions & 0 deletions index.html

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* See `thirdparty/water.css` for CSS variables that can be used here. */

p, li {
line-height: 1.6;
}

footer {
text-align: center;
}

header {
background-color: var(--background);
border-radius: 0 0 6px 6px;
padding: .75rem 2rem;
margin-top: -1.25rem;
margin-bottom: 2rem;
}


.site-title {
color: var(--text-bright);
font-weight: bold;
font-size: 1.25rem;
border-radius: 6px;
}

/* Automatically resize the left column to take as little space as required. */
.table-first-column-align-right {
width: auto;
}

/* Align first column to the right to improve readability in some situations. */
.table-first-column-align-right tr td:first-of-type {
text-align: right;
width: 1%;
white-space: nowrap;
/* Style the first column as headings. */
font-weight: bold;
}
12 changes: 12 additions & 0 deletions site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"short_name": "Godot Benchmarks",
"name": "Godot Benchmarks",
"icons": [{
"src": "icon.png",
"type": "image/png",
"sizes": "192x192"
}],
"start_url": "/godot-benchmarks/",
"background_color": "#223",
"theme_color": "#3d8fcc"
}
Loading

0 comments on commit 6e3e27b

Please sign in to comment.