gh-140677 Add heatmap visualization to Tachyon sampling profiler (#140680)

Co-authored-by: Ivona Stojanovic <stojanovic.i@hotmail.com>
This commit is contained in:
Pablo Galindo Salgado 2025-12-02 20:33:40 +00:00 committed by GitHub
parent d3c888b4ec
commit 8801c6dec7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 3939 additions and 326 deletions

View file

@ -6,6 +6,7 @@
import linecache
import os
from ._css_utils import get_combined_css
from .collector import Collector
from .string_table import StringTable
@ -331,9 +332,9 @@ def _create_flamegraph_html(self, data):
fg_js_path = d3_flame_graph_dir / "d3-flamegraph.min.js"
fg_tooltip_js_path = d3_flame_graph_dir / "d3-flamegraph-tooltip.min.js"
html_template = (template_dir / "flamegraph_template.html").read_text(encoding="utf-8")
css_content = (template_dir / "flamegraph.css").read_text(encoding="utf-8")
js_content = (template_dir / "flamegraph.js").read_text(encoding="utf-8")
html_template = (template_dir / "_flamegraph_assets" / "flamegraph_template.html").read_text(encoding="utf-8")
css_content = get_combined_css("flamegraph")
js_content = (template_dir / "_flamegraph_assets" / "flamegraph.js").read_text(encoding="utf-8")
# Inline first-party CSS/JS
html_template = html_template.replace(