mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
polish usage output rate and installer progress
This commit is contained in:
@@ -289,10 +289,9 @@
|
||||
:title="getRecordPerformanceTitle(record)"
|
||||
>
|
||||
<span class="whitespace-nowrap">{{ formatRecordLatencyPair(record) }}</span>
|
||||
<span
|
||||
v-if="getRecordDisplayOutputRate(record) != null"
|
||||
class="text-muted-foreground tabular-nums whitespace-nowrap"
|
||||
>{{ formatOutputRate(getRecordDisplayOutputRate(record)) }}</span>
|
||||
<span class="text-muted-foreground tabular-nums whitespace-nowrap">
|
||||
{{ formatOutputRate(getRecordDisplayOutputRate(record)) }}
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
v-else
|
||||
@@ -751,10 +750,9 @@
|
||||
:title="getRecordPerformanceTitle(record)"
|
||||
>
|
||||
<span class="tabular-nums whitespace-nowrap">{{ formatRecordLatencyPair(record) }}</span>
|
||||
<span
|
||||
v-if="getRecordDisplayOutputRate(record) != null"
|
||||
class="text-muted-foreground tabular-nums whitespace-nowrap"
|
||||
>{{ formatOutputRate(getRecordDisplayOutputRate(record)) }}</span>
|
||||
<span class="text-muted-foreground tabular-nums whitespace-nowrap">
|
||||
{{ formatOutputRate(getRecordDisplayOutputRate(record)) }}
|
||||
</span>
|
||||
</div>
|
||||
<span
|
||||
v-else
|
||||
|
||||
@@ -172,6 +172,27 @@ describe('UsageRecordsTable', () => {
|
||||
expect(titles.join('\n')).not.toContain('首字后生成耗时')
|
||||
})
|
||||
|
||||
it('shows an output speed placeholder when the rate is unavailable', () => {
|
||||
const root = mountUsageRecordsTable([buildRecord({
|
||||
output_tokens: 0,
|
||||
response_time_ms: 1000,
|
||||
first_byte_time_ms: 500,
|
||||
})])
|
||||
|
||||
const performanceCell = root.querySelector('table tbody tr td:last-child') as HTMLElement
|
||||
expect(performanceCell.textContent).toContain('0.50s / 1.00s')
|
||||
expect([...performanceCell.querySelectorAll<HTMLElement>('.text-muted-foreground')]
|
||||
.some((element) => element.textContent?.trim() === '-')).toBe(true)
|
||||
|
||||
const titles = [...root.querySelectorAll<HTMLElement>('[title]')].map((element) => element.title)
|
||||
expect(titles).toContain([
|
||||
'首字: 0.50s',
|
||||
'总耗时: 1.00s',
|
||||
'生成耗时: 0.50s',
|
||||
'输出速度: -',
|
||||
].join('\n'))
|
||||
})
|
||||
|
||||
it('keeps active request latency in one first-byte / live-total line without TPS', () => {
|
||||
const root = mountUsageRecordsTable([buildRecord({
|
||||
status: 'streaming',
|
||||
|
||||
Reference in New Issue
Block a user