461 lines
13 KiB
HTML
461 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>SGLang Performance Dashboard</title>
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns"></script>
|
|
<style>
|
|
:root {
|
|
--bg-primary: #0d1117;
|
|
--bg-secondary: #161b22;
|
|
--bg-tertiary: #21262d;
|
|
--text-primary: #c9d1d9;
|
|
--text-secondary: #8b949e;
|
|
--border-color: #30363d;
|
|
--accent-color: #58a6ff;
|
|
--accent-green: #3fb950;
|
|
--accent-orange: #d29922;
|
|
--accent-red: #f85149;
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
|
|
background-color: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 20px 0;
|
|
border-bottom: 1px solid var(--border-color);
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
h1 svg {
|
|
width: 32px;
|
|
height: 32px;
|
|
}
|
|
|
|
.header-actions {
|
|
display: flex;
|
|
gap: 12px;
|
|
align-items: center;
|
|
}
|
|
|
|
.btn {
|
|
padding: 8px 16px;
|
|
border-radius: 6px;
|
|
border: 1px solid var(--border-color);
|
|
background: var(--bg-secondary);
|
|
color: var(--text-primary);
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.btn:hover {
|
|
background: var(--bg-tertiary);
|
|
border-color: var(--text-secondary);
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--accent-color);
|
|
border-color: var(--accent-color);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: #4a9eff;
|
|
}
|
|
|
|
.filters {
|
|
display: flex;
|
|
gap: 16px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 24px;
|
|
padding: 16px;
|
|
background: var(--bg-secondary);
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.filter-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
.filter-group label {
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
font-weight: 500;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
select {
|
|
padding: 8px 12px;
|
|
border-radius: 6px;
|
|
border: 1px solid var(--border-color);
|
|
background: var(--bg-tertiary);
|
|
color: var(--text-primary);
|
|
font-size: 14px;
|
|
min-width: 180px;
|
|
}
|
|
|
|
select:focus {
|
|
outline: none;
|
|
border-color: var(--accent-color);
|
|
}
|
|
|
|
.tabs {
|
|
display: flex;
|
|
gap: 4px;
|
|
margin-bottom: 24px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
padding-bottom: 0;
|
|
}
|
|
|
|
.tab {
|
|
padding: 12px 20px;
|
|
cursor: pointer;
|
|
border-radius: 6px 6px 0 0;
|
|
background: transparent;
|
|
color: var(--text-secondary);
|
|
border: 1px solid transparent;
|
|
border-bottom: none;
|
|
transition: all 0.2s;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.tab:hover {
|
|
color: var(--text-primary);
|
|
background: var(--bg-secondary);
|
|
}
|
|
|
|
.tab.active {
|
|
background: var(--bg-secondary);
|
|
color: var(--text-primary);
|
|
border-color: var(--border-color);
|
|
border-bottom: 1px solid var(--bg-secondary);
|
|
margin-bottom: -1px;
|
|
}
|
|
|
|
.charts-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
|
|
gap: 24px;
|
|
}
|
|
|
|
.chart-card {
|
|
background: var(--bg-secondary);
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border-color);
|
|
padding: 20px;
|
|
}
|
|
|
|
.chart-card h3 {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
margin-bottom: 16px;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.chart-container {
|
|
position: relative;
|
|
height: 300px;
|
|
}
|
|
|
|
.loading {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-height: 400px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.spinner {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 3px solid var(--border-color);
|
|
border-top-color: var(--accent-color);
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
.error {
|
|
background: rgba(248, 81, 73, 0.1);
|
|
border: 1px solid var(--accent-red);
|
|
border-radius: 8px;
|
|
padding: 20px;
|
|
text-align: center;
|
|
color: var(--accent-red);
|
|
}
|
|
|
|
.stats-row {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 16px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.stat-card {
|
|
background: var(--bg-secondary);
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border-color);
|
|
padding: 16px;
|
|
}
|
|
|
|
.stat-card .label {
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
text-transform: uppercase;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.stat-card .value {
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.stat-card .change {
|
|
font-size: 12px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.stat-card .change.positive {
|
|
color: var(--accent-green);
|
|
}
|
|
|
|
.stat-card .change.negative {
|
|
color: var(--accent-red);
|
|
}
|
|
|
|
.data-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-top: 24px;
|
|
}
|
|
|
|
.data-table th,
|
|
.data-table td {
|
|
padding: 12px;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.data-table th {
|
|
background: var(--bg-tertiary);
|
|
font-weight: 600;
|
|
color: var(--text-secondary);
|
|
font-size: 12px;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.data-table tr:hover {
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.run-link {
|
|
color: var(--accent-color);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.run-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.no-data {
|
|
text-align: center;
|
|
padding: 60px 20px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.no-data h3 {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.model-badge {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: 12px;
|
|
font-size: 12px;
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.metric-section {
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.batch-charts-container {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
|
|
gap: 16px;
|
|
}
|
|
|
|
.batch-chart-wrapper {
|
|
background: var(--bg-tertiary);
|
|
border-radius: 6px;
|
|
padding: 12px;
|
|
}
|
|
|
|
.batch-chart-title {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 8px;
|
|
text-align: center;
|
|
}
|
|
|
|
footer {
|
|
margin-top: 48px;
|
|
padding: 24px 0;
|
|
border-top: 1px solid var(--border-color);
|
|
text-align: center;
|
|
color: var(--text-secondary);
|
|
font-size: 14px;
|
|
}
|
|
|
|
footer a {
|
|
color: var(--accent-color);
|
|
text-decoration: none;
|
|
}
|
|
|
|
footer a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<header>
|
|
<h1>
|
|
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M12 2L2 7L12 12L22 7L12 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
<path d="M2 17L12 22L22 17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
<path d="M2 12L12 17L22 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
</svg>
|
|
SGLang Performance Dashboard
|
|
</h1>
|
|
<div class="header-actions">
|
|
<button class="btn" onclick="refreshData()">Refresh</button>
|
|
<a href="https://github.com/sgl-project/sglang/actions/workflows/nightly-test-nvidia.yml?query=event%3Aschedule" target="_blank" class="btn">
|
|
View Workflow
|
|
</a>
|
|
</div>
|
|
</header>
|
|
|
|
<div id="loading" class="loading">
|
|
<div class="spinner"></div>
|
|
</div>
|
|
|
|
<div id="content" style="display: none;">
|
|
<div class="stats-row" id="stats-row"></div>
|
|
|
|
<div class="filters">
|
|
<div class="filter-group">
|
|
<label>GPU Configuration</label>
|
|
<select id="gpu-filter" onchange="handleGpuFilterChange()">
|
|
</select>
|
|
</div>
|
|
<div class="filter-group">
|
|
<label>Model</label>
|
|
<select id="model-filter" onchange="handleModelFilterChange(this.value)">
|
|
</select>
|
|
</div>
|
|
<div class="filter-group">
|
|
<label>Variant</label>
|
|
<select id="variant-filter" onchange="updateCharts()">
|
|
<option value="all">All Variants</option>
|
|
</select>
|
|
</div>
|
|
<div class="filter-group">
|
|
<label>Input/Output Length</label>
|
|
<select id="io-len-filter" onchange="updateCharts()">
|
|
<option value="all">All Lengths</option>
|
|
</select>
|
|
</div>
|
|
<div class="filter-group">
|
|
<label>Batch Size</label>
|
|
<select id="batch-filter" onchange="updateCharts()">
|
|
<option value="all">All Batch Sizes</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tabs" id="metric-tabs"></div>
|
|
|
|
<div class="metric-section">
|
|
<div class="chart-card">
|
|
<h3 id="metric-title">Overall Throughput (tokens/sec)</h3>
|
|
<div class="batch-charts-container" id="charts-container">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="chart-card" style="margin-top: 24px;">
|
|
<h3>Recent Benchmark Runs</h3>
|
|
<table class="data-table" id="runs-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Run ID</th>
|
|
<th>Commit</th>
|
|
<th>Branch</th>
|
|
<th>Models Tested</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="runs-table-body">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="error" class="error" style="display: none;">
|
|
<h3>Failed to load performance data</h3>
|
|
<p id="error-message"></p>
|
|
</div>
|
|
|
|
<footer>
|
|
<p>
|
|
SGLang Performance Dashboard -
|
|
<a href="https://github.com/sgl-project/sglang" target="_blank">GitHub</a> |
|
|
<a href="https://sgl-project.github.io/sglang" target="_blank">Documentation</a>
|
|
</p>
|
|
</footer>
|
|
</div>
|
|
|
|
<script src="app.js"></script>
|
|
</body>
|
|
</html>
|