LLM inference in C/C++
C++ ggml
webui: Use toLocaleString() format consistently across chat message statistics (#27990)
Giovanni Rivera9d853bb36a15
diff --git a/tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatistics.svelte b/tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatistics.svelteindex 4d8b1da2b1..51cc4b029a 100644--- a/tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatistics.svelte+++ b/tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatistics.svelte@@ -124,6 +124,11 @@);let formattedAgenticTotalTime = $derived(formatPerformanceTime(agenticTotalTimeMs));++ const fixedFormatter = new Intl.NumberFormat(undefined, {+ maximumFractionDigits: 2,+ minimumFractionDigits: 2+ });</script>{#snippet viewButton(opts: {@@ -223,14 +228,14 @@class="bg-transparent"icon={Gauge}tooltipLabel="Generation speed"- value="{tokensPerSecond.toFixed(2)} t/s"+ value="{fixedFormatter.format(tokensPerSecond)} t/s"/>{:else if activeView === ChatMessageStatsView.TOOLS && hasAgenticStats}<ChatMessageStatisticsBadgeclass="bg-transparent"icon={Wrench}tooltipLabel="Tool calls executed"- value="{agenticTimings!.toolCallsCount} calls"+ value="{agenticTimings!.toolCallsCount.toLocaleString()} calls"/><ChatMessageStatisticsBadge@@ -244,14 +249,14 @@class="bg-transparent"icon={Gauge}tooltipLabel="Tool execution rate"- value="{agenticToolsPerSecond.toFixed(2)} calls/s"+ value="{fixedFormatter.format(agenticToolsPerSecond)} calls/s"/>{:else if activeView === ChatMessageStatsView.SUMMARY && hasAgenticStats}<ChatMessageStatisticsBadgeclass="bg-transparent"icon={Layers}tooltipLabel="Agentic turns (LLM calls)"- value="{agenticTimings!.turns} turns"+ value="{agenticTimings!.turns.toLocaleString()} turns"/><ChatMessageStatisticsBadge@@ -272,7 +277,7 @@class="bg-transparent"icon={WholeWord}tooltipLabel="Prompt tokens"- value="{promptTokens} tokens"+ value="{promptTokens?.toLocaleString()} tokens"/><ChatMessageStatisticsBadge@@ -286,7 +291,7 @@class="bg-transparent"icon={Gauge}tooltipLabel="Prompt processing speed"- value="{promptTokensPerSecond!.toFixed(2)} tokens/s"+ value="{fixedFormatter.format(promptTokensPerSecond!)} tokens/s"/>{/if}</div>