Skip to content

Commit

Permalink
Generate and show .png as preview instead of .svg
Browse files Browse the repository at this point in the history
  • Loading branch information
dsocolobsky committed Dec 6, 2024
1 parent dbec9c7 commit 88c66f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/flamegraph_reporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ jobs:
- name: Update static page locally with new data
shell: bash
run: |
sudo apt install -y librsvg2-bin
rsvg-convert -w 1024 -h 1024 flamegraph_ethrex.svg -o pages/flamegraph_ethrex.png
rsvg-convert -w 1024 -h 1024 flamegraph_reth.svg -o pages/flamegraph_reth.png
cp -r flamegraph_ethrex.svg pages/
cp -r flamegraph_reth.svg pages/
sed -i "s/{{LAST_UPDATE}}/$(date +'%Y-%m-%dT%H:%M:%S')/g" pages/index.html
Expand Down
11 changes: 5 additions & 6 deletions pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,19 @@ <h1>Ethrex Flamegraph Comparison</h1>
<div class="col-header">
<h2>Ethrex</h2>
<a href="flamegraph_ethrex.svg/flamegraph_ethrex.svg"
download="flamegraph_ethrex.svg/flamegraph_ethrex.svg">Download</a>
download="flamegraph_ethrex.svg/flamegraph_ethrex.svg">Download interactive SVG</a>
</div>
<p class="time-elapsed">Time elapsed: {{ETHREX_TIME}}</p>
<object id="svg1" data="flamegraph_ethrex.svg/flamegraph_ethrex.svg" type="image/svg+xml" width=100%
height=90%"></object>
<img src="flamegraph_ethrex.png/flamegraph_ethrex.png">
</div>
<div class="column">
<div class="col-header">
<h2>Reth</h2>
<a href="flamegraph_reth.svg/flamegraph_reth.svg" download="flamegraph_reth.svg/flamegraph_reth.svg">Download</a>
<a href="flamegraph_reth.svg/flamegraph_reth.svg" download="flamegraph_reth.svg/flamegraph_reth.svg">Download
interactive SVG</a>
</div>
<p class="time-elapsed">Time elapsed: {{RETH_TIME}}</p>
<object id="svg2" data="flamegraph_reth.svg/flamegraph_reth.svg" type="image/svg+xml" width=100%
height=90%></object>
<img src="flamegraph_reth.png/flamegraph_reth.png">
</div>
</main>

Expand Down
2 changes: 0 additions & 2 deletions pages/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ h1 {
img {
width: 80%;
height: auto;
max-width: 200px;
max-height: 150px;
}

h2 {
Expand Down

0 comments on commit 88c66f9

Please sign in to comment.