diff --git a/admin/app/services/benchmark_service.ts b/admin/app/services/benchmark_service.ts index 5aeb6f5..e37b38c 100644 --- a/admin/app/services/benchmark_service.ts +++ b/admin/app/services/benchmark_service.ts @@ -223,14 +223,29 @@ export class BenchmarkService { } } - // Get GPU model (prefer discrete GPU) + // Get GPU model (prefer discrete GPU with dedicated VRAM) let gpuModel: string | null = null if (graphics.controllers && graphics.controllers.length > 0) { - const discreteGpu = graphics.controllers.find( - (g) => !g.vendor?.toLowerCase().includes('intel') && - !g.vendor?.toLowerCase().includes('amd') || - (g.vram && g.vram > 0) - ) + // First, look for discrete GPUs (NVIDIA, AMD discrete, or any with significant VRAM) + const discreteGpu = graphics.controllers.find((g) => { + const vendor = g.vendor?.toLowerCase() || '' + const model = g.model?.toLowerCase() || '' + // NVIDIA GPUs are always discrete + if (vendor.includes('nvidia') || model.includes('geforce') || model.includes('rtx') || model.includes('quadro')) { + return true + } + // AMD discrete GPUs (Radeon, not integrated APU graphics) + if ((vendor.includes('amd') || vendor.includes('ati')) && + (model.includes('radeon') || model.includes('rx ') || model.includes('vega')) && + !model.includes('graphics')) { + return true + } + // Any GPU with dedicated VRAM > 512MB is likely discrete + if (g.vram && g.vram > 512) { + return true + } + return false + }) gpuModel = discreteGpu?.model || graphics.controllers[0]?.model || null } diff --git a/admin/inertia/components/InfoTooltip.tsx b/admin/inertia/components/InfoTooltip.tsx new file mode 100644 index 0000000..136c0b0 --- /dev/null +++ b/admin/inertia/components/InfoTooltip.tsx @@ -0,0 +1,35 @@ +import { InformationCircleIcon } from '@heroicons/react/24/outline' +import { useState } from 'react' + +interface InfoTooltipProps { + text: string + className?: string +} + +export default function InfoTooltip({ text, className = '' }: InfoTooltipProps) { + const [isVisible, setIsVisible] = useState(false) + + return ( + + + {isVisible && ( +
+
+ {text} +
+
+
+ )} + + ) +} diff --git a/admin/inertia/components/systeminfo/CircularGauge.tsx b/admin/inertia/components/systeminfo/CircularGauge.tsx index 288d060..2be7c47 100644 --- a/admin/inertia/components/systeminfo/CircularGauge.tsx +++ b/admin/inertia/components/systeminfo/CircularGauge.tsx @@ -31,23 +31,24 @@ export default function CircularGauge({ const displayValue = animated ? animatedValue : value + // Size configs: container size must match SVG size (2 * (radius + strokeWidth)) const sizes = { sm: { - container: 'w-32 h-32', + container: 'w-28 h-28', // 112px = 2 * (48 + 8) strokeWidth: 8, radius: 48, fontSize: 'text-xl', labelSize: 'text-xs', }, md: { - container: 'w-40 h-40', + container: 'w-[140px] h-[140px]', // 140px = 2 * (60 + 10) strokeWidth: 10, radius: 60, fontSize: 'text-2xl', labelSize: 'text-sm', }, lg: { - container: 'w-60 h-60', + container: 'w-[244px] h-[244px]', // 244px = 2 * (110 + 12) strokeWidth: 12, radius: 110, fontSize: 'text-4xl', @@ -60,10 +61,11 @@ export default function CircularGauge({ const offset = circumference - (displayValue / 100) * circumference const getColor = () => { - if (value >= 90) return 'desert-red' - if (value >= 75) return 'desert-orange' - if (value >= 50) return 'desert-tan' - return 'desert-olive' + // For benchmarks: higher scores = better = green + if (value >= 75) return 'desert-green' + if (value >= 50) return 'desert-olive' + if (value >= 25) return 'desert-orange' + return 'desert-red' } const color = getColor() diff --git a/admin/inertia/pages/settings/benchmark.tsx b/admin/inertia/pages/settings/benchmark.tsx index bbcb89d..040b5f5 100644 --- a/admin/inertia/pages/settings/benchmark.tsx +++ b/admin/inertia/pages/settings/benchmark.tsx @@ -6,6 +6,7 @@ import CircularGauge from '~/components/systeminfo/CircularGauge' import InfoCard from '~/components/systeminfo/InfoCard' import Alert from '~/components/Alert' import StyledButton from '~/components/StyledButton' +import InfoTooltip from '~/components/InfoTooltip' import { ChartBarIcon, CpuChipIcon, @@ -521,7 +522,10 @@ export default function BenchmarkPage(props: {
{latestResult.ai_tokens_per_second.toFixed(1)}
-
Tokens per Second
+
+ Tokens per Second + +
@@ -532,7 +536,10 @@ export default function BenchmarkPage(props: {
{latestResult.ai_time_to_first_token?.toFixed(0) || 'N/A'} ms
-
Time to First Token
+
+ Time to First Token + +