-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update deployed page with generated flamegraphs
- Loading branch information
1 parent
73c5edf
commit b128f48
Showing
6 changed files
with
165 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,48 @@ | ||
<html> | ||
<head></head> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Ethrex Flamegraph Comparison</title> | ||
<link rel="stylesheet" type="text/css" href="style.css"/> | ||
</head> | ||
<body> | ||
<h1>Flamegraphs</h1> | ||
<img src="flamegraph.svg" alt="A flamegraph"/> | ||
<header> | ||
<h1>Ethrex Flamegraph Comparison</h1> | ||
<p class="last-updated">Last update: {{LAST_UPDATE}}</p> | ||
</header> | ||
<main class="container"> | ||
<div class="column"> | ||
<div class="col-header"> | ||
<h2>Ethrex</h2> | ||
<a href="flamegraph_ethrex.svg" download="flamegraph_ethrex.svg">Download</a> | ||
</div> | ||
<object id="svg1" data="flamegraph_ethrex.svg" type="image/svg+xml" width=90% height=90%"></object> | ||
</div> | ||
<div class="column"> | ||
<div class="col-header"> | ||
<h2>Reth</h2> | ||
<a href="flamegraph_reth.svg" download="flamegraph_reth.svg">Download</a> | ||
</div> | ||
<object id="svg2" data="flamegraph_reth.svg" type="image/svg+xml" width=90% height=90%></object> | ||
</div> | ||
</main> | ||
|
||
<script> | ||
// We need this so that the SVG can scale to the container. | ||
function adjustViewBox(objectId) { | ||
const object = document.getElementById(objectId); | ||
object.addEventListener('load', () => { | ||
const svgDocument = object.contentDocument; | ||
const svgElement = svgDocument.querySelector('svg'); | ||
if (svgElement) { | ||
svgElement.setAttribute('viewBox', '0 0 1000 1000'); | ||
} | ||
}); | ||
} | ||
|
||
adjustViewBox('svg1'); | ||
adjustViewBox('svg2'); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
body { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
min-height: 100vh; | ||
margin: 0; | ||
font-family: Arial, sans-serif; | ||
background-color: #f9f9f9; | ||
} | ||
|
||
header { | ||
text-align: center; | ||
margin-bottom: 1.5em; | ||
} | ||
|
||
h1 { | ||
margin-bottom: 0; | ||
} | ||
|
||
.last-updated { | ||
margin-top: 0.5em; | ||
font-weight: lighter; | ||
color: dimgray; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
gap: 10px; | ||
width: 90%; | ||
} | ||
|
||
.column { | ||
flex: 1; | ||
text-align: center; | ||
background: #fff; | ||
border: 1px solid #ddd; | ||
border-radius: 8px; | ||
padding: 5px; | ||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: space-between; | ||
height: 80vh; | ||
} | ||
|
||
img { | ||
width: 80%; | ||
height: auto; | ||
max-width: 200px; | ||
max-height: 150px; /* Prevent SVGs from being too tall */ | ||
} | ||
|
||
h2 { | ||
margin-bottom: 5px; | ||
font-size: 1.5rem; | ||
} | ||
|
||
.col-header { | ||
margin-bottom: 2em; | ||
} |