From 242f2b78c2f6b1f795a4da172f3f0842f8995c7d Mon Sep 17 00:00:00 2001 From: IanShaw027 Date: Fri, 7 Aug 2026 11:10:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(channel-monitor-v2):=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E6=88=90=E5=8A=9F=E7=8E=87=E3=80=81=E9=A6=96?= =?UTF-8?q?=20Token=E3=80=81=E6=AF=8F=E7=A7=92=20Token=20=E4=B8=8E?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 矩阵摘要列补齐每秒 Token(TPM÷60)与缓存率;KPI/模型表/用户榜同步为 成功率·首 Token·每秒 Token·缓存率,吞吐相关列仍受 hide_throughput 控制。 --- .../channel-monitor-v2/RelayPulseMatrix.vue | 73 +++++++++++---- .../__tests__/RelayPulseMatrix.spec.ts | 14 ++- .../__tests__/monitorFormat.spec.ts | 9 ++ .../channel-monitor-v2/monitorFormat.ts | 13 +++ .../src/i18n/locales/en/channelMonitorV2.ts | 23 ++++- .../src/i18n/locales/zh/channelMonitorV2.ts | 23 ++++- .../src/views/user/ChannelStatusV2View.vue | 92 +++++++++---------- 7 files changed, 175 insertions(+), 72 deletions(-) diff --git a/frontend/src/features/channel-monitor-v2/RelayPulseMatrix.vue b/frontend/src/features/channel-monitor-v2/RelayPulseMatrix.vue index b030b60bcb..ad44a93e93 100644 --- a/frontend/src/features/channel-monitor-v2/RelayPulseMatrix.vue +++ b/frontend/src/features/channel-monitor-v2/RelayPulseMatrix.vue @@ -36,10 +36,15 @@ @wheel="onMatrixWheel" >
-
+
{{ t('channelMonitorV2.matrix.dimension') }} {{ t('channelMonitorV2.metrics.successRate') }} {{ t('channelMonitorV2.metrics.ttft') }} + {{ t('channelMonitorV2.metrics.tps') }} + {{ t('channelMonitorV2.metrics.cacheRate') }} {{ axisStart }} {{ axisEnd }} @@ -49,6 +54,7 @@ v-for="entry in alignedRows" :key="rowKey(entry.row)" class="matrix-row border-b border-gray-100/80 dark:border-dark-700/60" + :class="showThroughput ? 'matrix-row--with-tps' : ''" >
@@ -63,6 +69,18 @@ > {{ formatMs(entry.row.metrics.ttft.p50_ms) }} + + {{ formatTps(entry.row.metrics.tpm) }} + + + {{ formatPercent(entry.row.metrics.cache_rate) }} +
{{ formatBucketRange(slot.start) }} {{ t('channelMonitorV2.matrix.scoreLine', { score: formatScore(slot.bucket.health) }) }} {{ t('channelMonitorV2.metrics.successRateValue', { value: successRate(slot.bucket.metrics) }) }} + {{ t('channelMonitorV2.metrics.ttftValue', { value: latencyPrivacy(slot.bucket.metrics.ttft) }) }} + {{ t('channelMonitorV2.metrics.tpsValue', { value: formatTps(slot.bucket.metrics.tpm) }) }} + {{ t('channelMonitorV2.metrics.cacheRateValue', { value: formatPercent(slot.bucket.metrics.cache_rate) }) }} {{ t('channelMonitorV2.metrics.errorRateValue', { value: formatPercent(slot.bucket.metrics.error_rate) }) }} {{ t('channelMonitorV2.metrics.rpmValue', { value: formatRate(slot.bucket.metrics.rpm) }) }} - {{ t('channelMonitorV2.metrics.tpmValue', { value: formatRate(slot.bucket.metrics.tpm) }) }} - {{ t('channelMonitorV2.metrics.ttftValue', { value: latencyPrivacy(slot.bucket.metrics.ttft) }) }} {{ t('channelMonitorV2.metrics.durationValue', { value: latencyPrivacy(slot.bucket.metrics.duration) }) }} - {{ t('channelMonitorV2.metrics.cacheRateValue', { value: formatPercent(slot.bucket.metrics.cache_rate) }) }}