feat: implement CLI interface for headless profiling and report viewing

This commit is contained in:
nvrl committed 2026-02-23 01:35:16 +01:00
1 parent 47452d9330
commit e6c5adca5e
4 files changed
+197 -99

No files matched your search

+14
View File
@@ -92,6 +92,20 @@ function App() {
const [report, setReport] = useState<ProfilingReport | null>(null);
useEffect(() => {
// Check for initial report (from CLI args)
const checkInitialReport = async () => {
try {
const data = await invoke<ProfilingReport | null>('get_initial_report');
if (data) {
setReport(data);
setView('report');
}
} catch (e) {
console.error('Failed to get initial report:', e);
}
};
checkInitialReport();
const fetchStats = async () => {
try {
const isRecording = stats?.is_recording ?? false;