Skip to content

Commit 4ef946a

Browse files
committed
Add tachyon (provisional) logo
1 parent ba35cd0 commit 4ef946a

File tree

11 files changed

+31
-18
lines changed

11 files changed

+31
-18
lines changed

Doc/library/profiling-sampling.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@
1313

1414
--------------
1515

16-
The :mod:`profiling.sampling` module provides statistical profiling of Python
17-
programs through periodic stack sampling. The profiler can attach to any
18-
running Python process without requiring code changes or restarts, and it can
19-
also launch and profile scripts directly. Because sampling occurs externally
20-
to the target process, overhead is virtually zero, making this profiler
21-
suitable for production environments.
16+
.. image:: tachyon-logo.png
17+
:alt: Tachyon logo
18+
:align: center
19+
:width: 300px
20+
21+
The :mod:`profiling.sampling` module, named **Tachyon**, provides statistical
22+
profiling of Python programs through periodic stack sampling. The profiler can
23+
run scripts directly or attach to any running Python process without requiring
24+
code changes or restarts. Because sampling occurs externally to the target
25+
process, overhead is virtually zero, making this profiler suitable for both
26+
development and production environments.
2227

2328

2429
What Is Statistical Profiling?

Doc/library/tachyon-logo.png

525 KB
Loading

Doc/whatsnew/3.15.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ The :mod:`profile` module is deprecated and will be removed in Python 3.17.
102102
Tachyon: High frequency statistical sampling profiler
103103
-----------------------------------------------------
104104

105+
.. image:: tachyon-logo.png
106+
:alt: Tachyon profiler logo
107+
:align: center
108+
:width: 200px
109+
105110
A new statistical sampling profiler (Tachyon) has been added as
106111
:mod:`profiling.sampling`. This profiler enables low-overhead performance analysis of
107112
running Python processes without requiring code modification or process restart.

Doc/whatsnew/tachyon-logo.png

525 KB
Loading
525 KB
Loading

Lib/profiling/sampling/_flamegraph_assets/flamegraph.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ body.resizing-sidebar {
241241
}
242242

243243
.sidebar-logo-img {
244-
width: 90px;
245-
height: 90px;
244+
width: 220px;
245+
height: 180px;
246246
display: flex;
247247
align-items: center;
248248
justify-content: center;

Lib/profiling/sampling/_heatmap_assets/heatmap_index_template.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<!-- Top Bar -->
1212
<header class="top-bar">
1313
<div class="brand">
14+
<div class="brand-logo"><!-- PYTHON_LOGO --></div>
1415
<span class="brand-text">Tachyon</span>
1516
<span class="brand-divider"></span>
1617
<span class="brand-subtitle">Heatmap Report</span>

Lib/profiling/sampling/_heatmap_assets/heatmap_pyfile_template.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<!-- Top Bar (Code Header) -->
1212
<header class="top-bar">
1313
<div class="brand">
14+
<div class="brand-logo"><!-- PYTHON_LOGO --></div>
1415
<span class="brand-text">Tachyon</span>
1516
<span class="brand-divider"></span>
1617
<span class="brand-subtitle" style="font-family: var(--font-mono); font-size: 13px;"><!-- FILENAME --></span>

Lib/profiling/sampling/_shared_assets/base.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,16 +191,16 @@ body {
191191
display: flex;
192192
align-items: center;
193193
justify-content: center;
194-
width: 28px;
195-
height: 28px;
194+
width: 48px;
195+
height: 40px;
196196
flex-shrink: 0;
197197
}
198198

199199
/* Style the inlined SVG/img inside brand-logo */
200200
.brand-logo svg,
201201
.brand-logo img {
202-
width: 28px;
203-
height: 28px;
202+
width: 48px;
203+
height: 40px;
204204
display: block;
205205
object-fit: contain;
206206
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));

Lib/profiling/sampling/heatmap_collector.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,15 @@ def _load_templates(self):
204204
self.index_js = f"{shared_js}\n{(assets_dir / 'heatmap_index.js').read_text(encoding='utf-8')}"
205205
self.file_js = f"{shared_js}\n{(assets_dir / 'heatmap.js').read_text(encoding='utf-8')}"
206206

207-
# Load Python logo
207+
# Load Tachyon logo
208208
logo_dir = template_dir / "_assets"
209209
try:
210-
png_path = logo_dir / "python-logo-only.png"
210+
png_path = logo_dir / "tachyon-logo.png"
211211
b64_logo = base64.b64encode(png_path.read_bytes()).decode("ascii")
212-
self.logo_html = f'<img src="data:image/png;base64,{b64_logo}" alt="Python logo" class="python-logo"/>'
212+
self.logo_html = f'<img src="data:image/png;base64,{b64_logo}" alt="Tachyon logo" class="python-logo"/>'
213213
except (FileNotFoundError, IOError) as e:
214214
self.logo_html = '<div class="python-logo-placeholder"></div>'
215-
print(f"Warning: Could not load Python logo: {e}")
215+
print(f"Warning: Could not load Tachyon logo: {e}")
216216

217217
except (FileNotFoundError, IOError) as e:
218218
raise RuntimeError(f"Failed to load heatmap template files: {e}") from e
@@ -804,6 +804,7 @@ def _generate_file_html(self, output_path: Path, filename: str,
804804
"<!-- CODE_LINES -->": ''.join(code_lines_html),
805805
"<!-- INLINE_CSS -->": f"<style>\n{self._template_loader.file_css}\n</style>",
806806
"<!-- INLINE_JS -->": f"<script>\n{self._template_loader.file_js}\n</script>",
807+
"<!-- PYTHON_LOGO -->": self._template_loader.logo_html,
807808
}
808809

809810
html_content = self._template_loader.file_template

0 commit comments

Comments
 (0)