mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
perf(ui-trajectory): avoid locale formatting in hot path
This commit is contained in:
@@ -116,7 +116,8 @@ export function trajectoryRecordId(cell: TrajectoryCellProps): string {
|
||||
*/
|
||||
export function formatDurationMillis(milliseconds: number | null): string {
|
||||
if (milliseconds === null || !Number.isFinite(milliseconds)) return '—'
|
||||
return `${Math.round(milliseconds).toLocaleString('en-US')} ms`
|
||||
const integer = String(Math.round(milliseconds))
|
||||
return `${integer.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} ms`
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user