# Profiling benchmarks
Only ignored benchmark/profiling workloads belong in this repository. Keep workloads next to their owning code and retain only support they use. No unit, integration, doctest or correctness-test CI suites.
## Run one workload
From repository root, copy an exact name from inventory. Confirm one workload ran rather than zero:
```sh
cargo test --locked --release --lib FULL_BENCHMARK_NAME -- --exact --ignored --nocapture --test-threads=1
```
List workloads without running them:
```sh
cargo test --locked --lib -- --ignored --list
```
## Local batch
Review inherited variables before execution. `FFFIND_BENCH_*` and `FFF_CONTENT_BENCH_*` can select another repository, print paths/patterns/results or increase work. `PROFILE_*` and `ISSUE_379_BENCH_REPETITIONS` change workloads. Use default settings in a clean shell; never select private data for shared logs.
```sh
PROFILE_TUI_RENDER_BACKEND=test cargo test --locked --release --lib -- \
--ignored --nocapture --test-threads=1
```
Batch selects 37 local workloads. Execution can take several minutes and uses temporary filesystem fixtures, repository reads and child processes. No benchmark CI workflow. Recheck inventory after changing workloads.
For isolated measurements, see [CPU profiling](cpu-hotspot-profiling.md), [memory profiling](memory-usage-profiling.md), [repeated setup](repeated-setup-benchmarks.md) and [session replay reuse](session-replay-reuse.md). Render aggregate overlaps individual scenarios intentionally; use `--exact` for isolated runs.
## Inventory
| `context::profiling::cache::optimization_harness_measures_large_replay_and_cache_material` | Replay 1,500 tool pairs and build cache material; checks item count and final call. |
| `context::profiling::replay_cache::replay_snapshot_benchmark_growing_sessions` | Compare growing-session replay scans/cache hits; requires at least 25% median speedup. Timing-sensitive; run on an otherwise idle machine. |
| `providers::openai::profiling::optimization_harness_measures_large_chat_body_construction` | Build a 2,000-tool-pair request; checks message count without sending it. |
| `rendering::highlight::profiling::profile_source_highlighting` | Measure cold/warm Rust and Markdown highlighting; checks lossless plain-text projection. |
| `sessions::write::profiling::session_snapshot_size_measurement` | Measure snapshots of 64 KiB, 32 MiB and 128 MiB temporary files. |
| `profiling::profile_harness::content_search::content_search_benchmark_compares_ffgrep_native_and_candidate_engine` | Compare search engines; also checks synthetic match, limit, context and case-sensitivity scenarios before timing. |
| `profiling::profile_harness::find::find_benchmark_measures_cold_warm_filtered_and_baseline` | Measure cold/warm path searches, filters, file/directory kinds and baseline traversal. |
| `profiling::profile_harness::mixed::profile_mixed_massive_activity_render` | Measure 30,000 synthetic activity nodes; in-memory construction, not disk-history loading. |
| `profiling::profile_harness::cpu::profile_cpu_discover_skills` | Measure synthetic skill discovery and first body read; checks discovery counts, diagnostics and successful read. |
| `profiling::profile_harness::cpu::profile_cpu_rendering_heavy_transcript` | Profile rendering from local transcript fixtures. |
| `profiling::profile_harness::cpu::profile_cpu_sse_parser` | Profile local Responses and Chat Completions SSE parsing. |
| `profiling::profile_harness::cpu::profile_cpu_startup_discovery` | Profile local settings, instructions, skills, sessions and cached catalog discovery. |
| `profiling::profile_harness::cpu::profile_cpu_tool_timeout_cleanup` | Profile child-process cleanup; launches a short-lived process, not a provider request. |
| `profiling::profile_harness::cpu::profile_cpu_tui_streaming_simulation` | Profile synthetic assistant/activity updates and caches. |
| `profiling::profile_harness::render::profile_tui_render_pipeline` | Run aggregate render scenarios; retain alongside individual runners for whole-pipeline comparison. |
| `profiling::profile_harness::render::profile_tui_render_pipeline_heavy_transcript` | Isolate heavy transcript rendering. |
| `profiling::profile_harness::render::profile_tui_render_pipeline_idle` | Isolate idle rendering. |
| `profiling::profile_harness::render::profile_tui_render_pipeline_modal` | Isolate modal rendering. |
| `profiling::profile_harness::render::profile_tui_render_pipeline_resize` | Isolate rendering across resized viewports. |
| `profiling::profile_harness::render::profile_tui_render_pipeline_scroll` | Isolate transcript scrolling in the render pipeline. |
| `profiling::profile_harness::render::profile_tui_render_pipeline_streaming` | Isolate rendering during synthetic streaming. |
| `profiling::profile_harness::scroll::profile_scroll_popup_idle` | Measure scrolling an idle subagent timeline. |
| `profiling::profile_harness::scroll::profile_scroll_popup_selected_streaming` | Measure timeline scrolling while selected child streams. |
| `profiling::profile_harness::scroll::profile_scroll_popup_unrelated_streaming` | Measure timeline scrolling while another child streams. |
| `profiling::profile_harness::scroll::profile_scroll_transcript_deep_history` | Measure scrolling through long transcript history. |
| `profiling::profile_harness::scroll::profile_scroll_transcript_long_reply` | Measure scrolling one long assistant reply. |
| `profiling::profile_harness::scroll::profile_scroll_transcript_selection` | Measure deep-history scrolling with active text selection. |
| `profiling::repeated_setup_bench::profile_issue_379_repeated_setup_paths` | Compare startup, profile/config discovery, provider selection and request-schema reuse; provider stub never sends requests. |
| `tools::fs_cache::profiling::filesystem_cache_large_directory_measurement` | Measure cached listing of 10,000 temporary files. |
| `tui::controller::app::profiling::prompt_input::profile_typing_under_streaming_load` | Check draft edits reach rendered prompt while output remains queued; measure idle, streaming and 120-turn history cases. Scripts controller components, not complete event loop or physical display. |
| `tui::controller::pacing::profiling::scroll_coalescing_burst_measurement` | Measure bursts of 8, 128 and 1,023 wheel events; checks bounded coalescing and event accounting. |
| `tui::render::activity::profiling::optimization_harness_measures_large_activity_detail_render` | Render 5,000 output lines; checks retained body length. |
| `tui::render::profiling::text_modal_viewport::text_modal_large_document_workload` | Compare visible-only and full-document rendering at multiple scroll offsets. |
| `tui::render::transcript::profiling::transcript_test_backend_measurement` | Measure 100 warmed frames over a 500-entry transcript. |
| `tui::transcript_cards::profiling::cache::transcript_projection_and_thinking_measurement` | Measure cached frames, focus/width changes, selection and thinking deltas. |
| `tui::transcript_cards::visual_lines::profiling::profile_large_response_first_display_and_resize` | Measure fresh/cached/retained-width projection for large ASCII and Unicode responses; check visible body and text preservation after resizing. |
| `tui::transcript_cards::visual_lines::profiling::streaming_viewport_large_response_workload` | Compare visible-only projection, forced rebuild and full-format reference across small/large ASCII and Unicode responses. |
## Limits
Assertions inside workloads validate measurement inputs; passing measurements do not establish runtime correctness or physical-terminal compatibility. Replay speedup threshold depends on timing; run on an otherwise idle machine. Synthetic profiles cannot qualify private-session loading, authenticated Claude CLI behavior or current TypeSafe service responses.
Prompts exceeding 65,535 logical rows still have a known cursor/hit-testing defect in upstream tui-textarea-2 viewport representation. Benchmark-only policy does not fix that defect.