import React from 'react'; function Section({ title, data }) { const rows = Object.entries(data || {}); if (rows.length === 0) return null; return ( <> {title} {rows.map(([key, s]) => ( {key} {s.count} {s.matches} {s.avg_latency_ms != null ? s.avg_latency_ms.toFixed(3) : '—'} ))} ); } export default function StatsTable({ stats }) { const empty = !stats || stats.total_runs === 0; return (

Performance Statistics

{empty ? (

Run the simulation to collect statistics.

) : ( <>

{stats.total_runs} command evaluation(s), {stats.total_matches} match(es).

KeyRunsMatchesAvg ms
)}
); }