From 726fd94e075d73e85b243b017f80ec75129e7d0b Mon Sep 17 00:00:00 2001 From: ssongliu Date: Fri, 6 Nov 2026 23:44:30 +0800 Subject: [PATCH] fix(dashboard): improve vLLM monitoring display and preserve samples (#14326) --- frontend/src/lang/modules/en.ts | 4 ++-- frontend/src/lang/modules/es-es.ts | 4 ++-- frontend/src/lang/modules/fa.ts | 4 ++-- frontend/src/lang/modules/ja.ts | 4 ++-- frontend/src/lang/modules/ko.ts | 4 ++-- frontend/src/lang/modules/lo.ts | 4 ++-- frontend/src/lang/modules/ms.ts | 4 ++-- frontend/src/lang/modules/pt-br.ts | 4 ++-- frontend/src/lang/modules/ru.ts | 4 ++-- frontend/src/lang/modules/tr.ts | 4 ++-- frontend/src/lang/modules/zh-Hant.ts | 4 ++-- frontend/src/lang/modules/zh.ts | 4 ++-- frontend/src/views/home/index.vue | 22 ++++++++++++++++------ 13 files changed, 40 insertions(+), 30 deletions(-) diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 6fde7f0ce..43bf61282 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1743,8 +1743,8 @@ const message = { running: 'Running requests', waiting: 'Waiting requests', cacheUsage: 'KV cache usage', - promptThroughput: 'Input token throughput', - generationThroughput: 'Output token throughput', + promptThroughput: 'Input throughput', + generationThroughput: 'Output throughput', requestThroughput: 'Completed requests', timeToFirstToken: 'Mean time to first token', timePerOutputToken: 'Mean inter-token latency', diff --git a/frontend/src/lang/modules/es-es.ts b/frontend/src/lang/modules/es-es.ts index 0377fc8b8..aba5a32cd 100644 --- a/frontend/src/lang/modules/es-es.ts +++ b/frontend/src/lang/modules/es-es.ts @@ -1754,8 +1754,8 @@ const message = { running: 'Solicitudes en ejecución', waiting: 'Solicitudes en espera', cacheUsage: 'Uso de caché KV', - promptThroughput: 'Rendimiento de tokens de entrada', - generationThroughput: 'Rendimiento de tokens de salida', + promptThroughput: 'Rendimiento de entrada', + generationThroughput: 'Rendimiento de salida', requestThroughput: 'Solicitudes completadas', timeToFirstToken: 'Latencia media del primer token', timePerOutputToken: 'Latencia media entre tokens', diff --git a/frontend/src/lang/modules/fa.ts b/frontend/src/lang/modules/fa.ts index 922d0bec7..a1dd4d29f 100644 --- a/frontend/src/lang/modules/fa.ts +++ b/frontend/src/lang/modules/fa.ts @@ -1719,8 +1719,8 @@ const message = { running: 'درخواست‌های در حال اجرا', waiting: 'درخواست‌های در انتظار', cacheUsage: 'مصرف حافظه نهان KV', - promptThroughput: 'گذردهی توکن ورودی', - generationThroughput: 'گذردهی توکن خروجی', + promptThroughput: 'گذردهی ورودی', + generationThroughput: 'گذردهی خروجی', requestThroughput: 'نرخ درخواست‌های تکمیل‌شده', timeToFirstToken: 'میانگین تأخیر توکن اول', timePerOutputToken: 'میانگین تأخیر بین توکن‌ها', diff --git a/frontend/src/lang/modules/ja.ts b/frontend/src/lang/modules/ja.ts index 5279afd10..96b82b59f 100644 --- a/frontend/src/lang/modules/ja.ts +++ b/frontend/src/lang/modules/ja.ts @@ -1726,8 +1726,8 @@ const message = { running: '実行中のリクエスト', waiting: '待機中のリクエスト', cacheUsage: 'KVキャッシュ使用率', - promptThroughput: '入力トークンスループット', - generationThroughput: '出力トークンスループット', + promptThroughput: '入力スループット', + generationThroughput: '出力スループット', requestThroughput: '完了リクエスト数/秒', timeToFirstToken: '平均初回トークン遅延', timePerOutputToken: '平均トークン間遅延', diff --git a/frontend/src/lang/modules/ko.ts b/frontend/src/lang/modules/ko.ts index 3be0f409c..475b5bb82 100644 --- a/frontend/src/lang/modules/ko.ts +++ b/frontend/src/lang/modules/ko.ts @@ -1707,8 +1707,8 @@ const message = { running: '실행 중인 요청', waiting: '대기 중인 요청', cacheUsage: 'KV 캐시 사용률', - promptThroughput: '입력 토큰 처리량', - generationThroughput: '출력 토큰 처리량', + promptThroughput: '입력 처리량', + generationThroughput: '출력 처리량', requestThroughput: '완료 요청 속도', timeToFirstToken: '평균 첫 토큰 지연', timePerOutputToken: '평균 토큰 간 지연', diff --git a/frontend/src/lang/modules/lo.ts b/frontend/src/lang/modules/lo.ts index cadc22e3f..720404153 100644 --- a/frontend/src/lang/modules/lo.ts +++ b/frontend/src/lang/modules/lo.ts @@ -1696,8 +1696,8 @@ const message = { running: 'ຄຳຮ້ອງຂໍທີ່ກຳລັງເຮັດວຽກ', waiting: 'ຄຳຮ້ອງຂໍທີ່ກຳລັງລໍຖ້າ', cacheUsage: 'ການໃຊ້ງານແຄດ KV', - promptThroughput: 'ອັດຕາ Token ຂາເຂົ້າ', - generationThroughput: 'ອັດຕາ Token ຂາອອກ', + promptThroughput: 'ອັດຕາຂາເຂົ້າ', + generationThroughput: 'ອັດຕາຂາອອກ', requestThroughput: 'ອັດຕາຄຳຮ້ອງຂໍສຳເລັດ', timeToFirstToken: 'ເວລາລໍຖ້າສະເລ່ຍຂອງ Token ທຳອິດ', timePerOutputToken: 'ເວລາລໍຖ້າສະເລ່ຍລະຫວ່າງ Token', diff --git a/frontend/src/lang/modules/ms.ts b/frontend/src/lang/modules/ms.ts index 9a03bdc76..8ce942cf5 100644 --- a/frontend/src/lang/modules/ms.ts +++ b/frontend/src/lang/modules/ms.ts @@ -1757,8 +1757,8 @@ const message = { running: 'Permintaan berjalan', waiting: 'Permintaan menunggu', cacheUsage: 'Penggunaan cache KV', - promptThroughput: 'Daya pemprosesan token input', - generationThroughput: 'Daya pemprosesan token output', + promptThroughput: 'Daya pemprosesan input', + generationThroughput: 'Daya pemprosesan output', requestThroughput: 'Kadar permintaan selesai', timeToFirstToken: 'Purata kependaman token pertama', timePerOutputToken: 'Purata kependaman antara token', diff --git a/frontend/src/lang/modules/pt-br.ts b/frontend/src/lang/modules/pt-br.ts index fe515ab72..f35e687af 100644 --- a/frontend/src/lang/modules/pt-br.ts +++ b/frontend/src/lang/modules/pt-br.ts @@ -1754,8 +1754,8 @@ const message = { running: 'Solicitações em execução', waiting: 'Solicitações em espera', cacheUsage: 'Uso do cache KV', - promptThroughput: 'Taxa de tokens de entrada', - generationThroughput: 'Taxa de tokens de saída', + promptThroughput: 'Taxa de entrada', + generationThroughput: 'Taxa de saída', requestThroughput: 'Solicitações concluídas', timeToFirstToken: 'Latência média do primeiro token', timePerOutputToken: 'Latência média entre tokens', diff --git a/frontend/src/lang/modules/ru.ts b/frontend/src/lang/modules/ru.ts index 5a33f24ea..d0a87de2e 100644 --- a/frontend/src/lang/modules/ru.ts +++ b/frontend/src/lang/modules/ru.ts @@ -1747,8 +1747,8 @@ const message = { running: 'Выполняемые запросы', waiting: 'Ожидающие запросы', cacheUsage: 'Использование KV-кэша', - promptThroughput: 'Скорость входных токенов', - generationThroughput: 'Скорость выходных токенов', + promptThroughput: 'Скорость ввода', + generationThroughput: 'Скорость вывода', requestThroughput: 'Завершённые запросы', timeToFirstToken: 'Среднее время до первого токена', timePerOutputToken: 'Средняя задержка между токенами', diff --git a/frontend/src/lang/modules/tr.ts b/frontend/src/lang/modules/tr.ts index 1558511cc..b304e82bd 100644 --- a/frontend/src/lang/modules/tr.ts +++ b/frontend/src/lang/modules/tr.ts @@ -1750,8 +1750,8 @@ const message = { running: 'Çalışan istekler', waiting: 'Bekleyen istekler', cacheUsage: 'KV önbellek kullanımı', - promptThroughput: 'Girdi token hızı', - generationThroughput: 'Çıktı token hızı', + promptThroughput: 'Girdi hızı', + generationThroughput: 'Çıktı hızı', requestThroughput: 'Tamamlanan istek hızı', timeToFirstToken: 'Ortalama ilk token gecikmesi', timePerOutputToken: 'Ortalama token arası gecikme', diff --git a/frontend/src/lang/modules/zh-Hant.ts b/frontend/src/lang/modules/zh-Hant.ts index a5014db53..aebfc921c 100644 --- a/frontend/src/lang/modules/zh-Hant.ts +++ b/frontend/src/lang/modules/zh-Hant.ts @@ -1636,8 +1636,8 @@ const message = { running: '執行中請求', waiting: '等待中請求', cacheUsage: 'KV Cache 使用率', - promptThroughput: '輸入 Token 吞吐', - generationThroughput: '輸出 Token 吞吐', + promptThroughput: '輸入吞吐', + generationThroughput: '輸出吞吐', requestThroughput: '完成請求速率', timeToFirstToken: '平均首 Token 延遲', timePerOutputToken: '平均 Token 間延遲', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index b7698e40b..2478136f9 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1649,8 +1649,8 @@ const message = { running: '运行中请求', waiting: '等待中请求', cacheUsage: 'KV Cache 使用率', - promptThroughput: '输入 Token 吞吐', - generationThroughput: '输出 Token 吞吐', + promptThroughput: '输入吞吐', + generationThroughput: '输出吞吐', requestThroughput: '完成请求速率', timeToFirstToken: '平均首 Token 延迟', timePerOutputToken: '平均 Token 间延迟', diff --git a/frontend/src/views/home/index.vue b/frontend/src/views/home/index.vue index 82da1797b..e90751efc 100644 --- a/frontend/src/views/home/index.vue +++ b/frontend/src/views/home/index.vue @@ -622,6 +622,14 @@ const vllmChartOption = computed(() => ({ grid: monitorChartGrid, legend: monitorChartLegend, formatStr: 'tokens/s', + yAxis: [ + { + type: 'value', + name: '( tokens/s )', + min: 0, + max: ({ max }: { max: number }) => (max > 0 ? undefined : 1), + }, + ], tooltip: { trigger: 'axis', valueFormatter: (value: number | null) => `${formatVllmMetric(value)} tokens/s`, @@ -648,12 +656,14 @@ const loadVllmOptions = async () => { } }; -const stopVllmMonitor = () => { +const stopVllmMonitor = (resetData = true) => { clearTimeout(vllmTimer); vllmController?.abort(); - vllmCurrent.value = undefined; - vllmPoints.value = []; - vllmLoadFailed.value = false; + if (resetData) { + vllmCurrent.value = undefined; + vllmPoints.value = []; + vllmLoadFailed.value = false; + } }; const refreshVllmMonitor = async () => { @@ -1364,8 +1374,8 @@ watch( { immediate: true, flush: 'sync' }, ); -watch([chartOption, vllmInstallID, isActive], () => { - stopVllmMonitor(); +watch([chartOption, vllmInstallID, isActive], ([, installID], [, previousInstallID]) => { + stopVllmMonitor(installID !== previousInstallID); if (chartOption.value === 'vllm' && hasVllm.value && vllmInstallID.value && isActive.value) { void refreshVllmMonitor(); }