docs(perf): document Tier C ScarfMon measure points + fetchSessionPreviews instrumentation

Alan Wizemann
2026-05-05 20:03:20 +02:00
parent 37266f3efc
commit 9149d06404
+5
@@ -74,7 +74,12 @@ For a full export, hit **Copy as JSON**. Each line is one sample with `category`
| `sqlite` | `sqlite.query` / `sqlite.queryBatch` | [RemoteSQLiteBackend](https://github.com/awizemann/scarf/tree/main/scarf/Packages/ScarfCore/Sources/ScarfCore/Services/Backends/RemoteSQLiteBackend.swift) | Per-call latency over SSH (carries row count + stdout bytes) | | `sqlite` | `sqlite.query` / `sqlite.queryBatch` | [RemoteSQLiteBackend](https://github.com/awizemann/scarf/tree/main/scarf/Packages/ScarfCore/Sources/ScarfCore/Services/Backends/RemoteSQLiteBackend.swift) | Per-call latency over SSH (carries row count + stdout bytes) |
| `transport` | `ssh.streamScript` (iOS) / `ssh.run` (Mac) | [CitadelServerTransport](https://github.com/awizemann/scarf/tree/main/scarf/Packages/ScarfIOS/Sources/ScarfIOS/CitadelServerTransport.swift), [SSHScriptRunner](https://github.com/awizemann/scarf/tree/main/scarf/Packages/ScarfCore/Sources/ScarfCore/Transport/SSHScriptRunner.swift) | SSH round-trip time | | `transport` | `ssh.streamScript` (iOS) / `ssh.run` (Mac) | [CitadelServerTransport](https://github.com/awizemann/scarf/tree/main/scarf/Packages/ScarfIOS/Sources/ScarfIOS/CitadelServerTransport.swift), [SSHScriptRunner](https://github.com/awizemann/scarf/tree/main/scarf/Packages/ScarfCore/Sources/ScarfCore/Transport/SSHScriptRunner.swift) | SSH round-trip time |
| `transport` | `ssh.cancelled` | [SSHScriptRunner](https://github.com/awizemann/scarf/tree/main/scarf/Packages/ScarfCore/Sources/ScarfCore/Transport/SSHScriptRunner.swift) | Parent task cancellation reached the ssh subprocess (v2.8) — terminated within 100ms instead of running to its 30s deadline | | `transport` | `ssh.cancelled` | [SSHScriptRunner](https://github.com/awizemann/scarf/tree/main/scarf/Packages/ScarfCore/Sources/ScarfCore/Transport/SSHScriptRunner.swift) | Parent task cancellation reached the ssh subprocess (v2.8) — terminated within 100ms instead of running to its 30s deadline |
| `sessionLoad` | `mac.fetchSessionPreviews` / `.rows` / `.transportError` | [HermesDataService](https://github.com/awizemann/scarf/tree/main/scarf/Packages/ScarfCore/Sources/ScarfCore/Services/HermesDataService.swift) | Sidebar preview fetch — already substr-bounded, instrumented in v2.8 for visibility |
| `diskIO` | `loadConfig` / `loadCronJobs` | [HermesFileService](https://github.com/awizemann/scarf/tree/main/scarf/scarf/Core/Services/HermesFileService.swift) | Hot disk reads. `loadConfig` also logs caller stack frames in Full mode | | `diskIO` | `loadConfig` / `loadCronJobs` | [HermesFileService](https://github.com/awizemann/scarf/tree/main/scarf/scarf/Core/Services/HermesFileService.swift) | Hot disk reads. `loadConfig` also logs caller stack frames in Full mode |
| `diskIO` | `memory.load` / `.bytes` | [MemoryViewModel](https://github.com/awizemann/scarf/tree/main/scarf/scarf/Features/Memory/ViewModels/MemoryViewModel.swift) | Memory tab open — 4 sequential SFTP reads on remote (config + profiles + memory + user). v2.8 instrumented. |
| `diskIO` | `cron.load` / `.jobs` | [CronViewModel](https://github.com/awizemann/scarf/tree/main/scarf/scarf/Features/Cron/ViewModels/CronViewModel.swift) | Cron tab open — jobs.json + skills walk + selected job's output. v2.8 instrumented. |
| `diskIO` | `skills.load` / `.count` | [SkillsViewModel](https://github.com/awizemann/scarf/tree/main/scarf/Packages/ScarfCore/Sources/ScarfCore/ViewModels/SkillsViewModel.swift) | Skills tab open — full SkillsScanner walk (one stat + SKILL.md read per skill dir). v2.8 instrumented. |
| `diskIO` | `curator.load` / `.bytes` | [CuratorViewModel](https://github.com/awizemann/scarf/tree/main/scarf/Packages/ScarfCore/Sources/ScarfCore/ViewModels/CuratorViewModel.swift) | Curator tab open — `hermes curator status` CLI + state file + REPORT.md. v2.8 instrumented. |
Adding a new measure point is two lines (see Developer Guide below). Adding a new measure point is two lines (see Developer Guide below).