Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions Lib/profiling/sampling/_flamegraph_assets/flamegraph.css
Original file line number Diff line number Diff line change
Expand Up @@ -329,34 +329,44 @@ body.resizing-sidebar {
gap: 8px;
padding: 8px 10px;
background: var(--bg-primary);
border: 1px solid var(--border);
border: 2px solid var(--border);
border-radius: 8px;
transition: all var(--transition-fast);
animation: slideUp 0.4s ease-out backwards;
animation-delay: calc(var(--i, 0) * 0.05s);
animation-delay: calc(var(--i, 0) * 0.08s);
overflow: hidden;
position: relative;
}

.summary-card:nth-child(1) { --i: 0; }
.summary-card:nth-child(2) { --i: 1; }
.summary-card:nth-child(3) { --i: 2; }
.summary-card:nth-child(4) { --i: 3; }
.summary-card:nth-child(1) { --i: 0; --card-color: 55, 118, 171; }
.summary-card:nth-child(2) { --i: 1; --card-color: 40, 167, 69; }
.summary-card:nth-child(3) { --i: 2; --card-color: 255, 193, 7; }
.summary-card:nth-child(4) { --i: 3; --card-color: 111, 66, 193; }

.summary-card:hover {
border-color: var(--accent);
background: var(--accent-glow);
border-color: rgba(var(--card-color), 0.6);
background: linear-gradient(135deg, rgba(var(--card-color), 0.08) 0%, var(--bg-primary) 100%);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(var(--card-color), 0.15);
}

.summary-icon {
font-size: 16px;
font-size: 14px;
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg-tertiary);
background: linear-gradient(135deg, rgba(var(--card-color), 0.15) 0%, rgba(var(--card-color), 0.05) 100%);
border: 1px solid rgba(var(--card-color), 0.2);
border-radius: 6px;
flex-shrink: 0;
transition: all var(--transition-fast);
}

.summary-card:hover .summary-icon {
transform: scale(1.05);
background: linear-gradient(135deg, rgba(var(--card-color), 0.25) 0%, rgba(var(--card-color), 0.1) 100%);
}

.summary-data {
Expand All @@ -368,8 +378,8 @@ body.resizing-sidebar {
.summary-value {
font-family: var(--font-mono);
font-size: 13px;
font-weight: 700;
color: var(--accent);
font-weight: 800;
color: rgb(var(--card-color));
line-height: 1.2;
white-space: nowrap;
overflow: hidden;
Expand Down
32 changes: 32 additions & 0 deletions Lib/profiling/sampling/_flamegraph_assets/flamegraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,27 @@ function restoreUIState() {
}
}

// ============================================================================
// Logo/Favicon Setup
// ============================================================================

function setupLogos() {
const logo = document.querySelector('.sidebar-logo-img img');
if (!logo) return;

const navbarLogoContainer = document.getElementById('navbar-logo');
if (navbarLogoContainer) {
const navbarLogo = logo.cloneNode(true);
navbarLogoContainer.appendChild(navbarLogo);
}

const favicon = document.createElement('link');
favicon.rel = 'icon';
favicon.type = 'image/png';
favicon.href = logo.src;
document.head.appendChild(favicon);
}

// ============================================================================
// Status Bar
// ============================================================================
Expand All @@ -198,6 +219,11 @@ function updateStatusBar(nodeData, rootValue) {
const timeMs = (nodeData.value / 1000).toFixed(2);
const percent = rootValue > 0 ? ((nodeData.value / rootValue) * 100).toFixed(1) : "0.0";

const brandEl = document.getElementById('status-brand');
const taglineEl = document.getElementById('status-tagline');
if (brandEl) brandEl.style.display = 'none';
if (taglineEl) taglineEl.style.display = 'none';

const locationEl = document.getElementById('status-location');
const funcItem = document.getElementById('status-func-item');
const timeItem = document.getElementById('status-time-item');
Expand Down Expand Up @@ -230,6 +256,11 @@ function clearStatusBar() {
const el = document.getElementById(id);
if (el) el.style.display = 'none';
});

const brandEl = document.getElementById('status-brand');
const taglineEl = document.getElementById('status-tagline');
if (brandEl) brandEl.style.display = 'flex';
if (taglineEl) taglineEl.style.display = 'flex';
}

// ============================================================================
Expand Down Expand Up @@ -1061,6 +1092,7 @@ function exportSVG() {
function initFlamegraph() {
ensureLibraryLoaded();
restoreUIState();
setupLogos();

let processedData = EMBEDDED_DATA;
if (EMBEDDED_DATA.strings) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tachyon Profiler - Flamegraph</title>
<title>Tachyon Profiler - Flamegraph Report</title>
<!-- INLINE_VENDOR_D3_JS -->
<!-- INLINE_VENDOR_FLAMEGRAPH_CSS -->
<!-- INLINE_VENDOR_FLAMEGRAPH_JS -->
Expand All @@ -15,9 +15,10 @@
<!-- Top Bar -->
<header class="top-bar">
<div class="brand">
<div class="brand-logo" id="navbar-logo"></div>
<span class="brand-text">Tachyon</span>
<span class="brand-divider"></span>
<span class="brand-subtitle">Profiler</span>
<span class="brand-subtitle">Flamegraph Report</span>
</div>
<div class="search-wrapper">
<input
Expand Down Expand Up @@ -286,6 +287,12 @@ <h3 class="section-title">Heat Map</h3>

<!-- Status Bar -->
<footer class="status-bar">
<span class="status-item" id="status-brand">
<span class="status-value">Tachyon Profiler</span>
</span>
<span class="status-item" id="status-tagline">
<span class="status-label">Python Sampling Profiler</span>
</span>
<span class="status-item" id="status-location" style="display: none;">
<span class="status-label">File:</span>
<span class="status-value" id="status-file">--</span>
Expand Down
18 changes: 0 additions & 18 deletions Lib/profiling/sampling/_heatmap_assets/heatmap.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,6 @@
z-index: 100;
}

/* Back link in toolbar */
.back-link {
color: white;
text-decoration: none;
padding: 6px 14px;
background: rgba(255, 255, 255, 0.12);
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 6px;
font-size: 13px;
font-weight: 500;
transition: all var(--transition-fast);
}

.back-link:hover {
background: rgba(255, 255, 255, 0.22);
border-color: rgba(255, 255, 255, 0.35);
}

/* --------------------------------------------------------------------------
Main Content Area
-------------------------------------------------------------------------- */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<span class="brand-subtitle" style="font-family: var(--font-mono); font-size: 13px;"><!-- FILENAME --></span>
</div>
<div class="toolbar">
<a href="index.html" class="back-link">Back to Index</a>
<a href="index.html" class="toolbar-btn" title="Back to Index" aria-label="Back to Index">&#8962;</a>
<button
class="toolbar-btn theme-toggle"
onclick="toggleTheme()"
Expand Down
4 changes: 3 additions & 1 deletion Lib/profiling/sampling/_shared_assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ body {
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 6px;
cursor: pointer;
text-decoration: none;
transition: all var(--transition-fast);
}

Expand Down Expand Up @@ -385,7 +386,8 @@ body {

button:focus-visible,
select:focus-visible,
input:focus-visible {
input:focus-visible,
a.toolbar-btn:focus-visible {
outline: 2px solid var(--python-gold);
outline-offset: 2px;
}
Expand Down
Loading