Managing the Backend
The ncprof backend manages the logic related to processing traces and registering tracepoints. This page details the various commands available to start, stop and check status of the backend.
Managing the Backend
All backend commands are accessed via Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
- Start:
NCProf: Start Profiler Backend (Docker)- First start: Docker images pull (a few minutes), creates
.cache/ncompass/directory - Subsequent starts: Much faster (images cached)
- First start: Docker images pull (a few minutes), creates
- Stop:
NCProf: Stop Profiler Backend(preserves data in.cache/ncompass/) - Restart:
NCProf: Restart Profiler Backend(equivalent to stop + start) - Status:
NCProf: Check NCProf Backend Status(shows container status)
ℹ️
Stopping the backend doesn’t delete registered tracepoints or configurations - they remain in .cache/ncompass/.
Healthy backend status:
NAME STATUS
nc-ncprof-redis Up 2 minutes
nc-ncprof-server Up 2 minutes (healthy)
nc-ncprof-register Up 2 minutes (healthy)Auto-Start Configuration
Enable automatic backend startup when opening VS Code:
- Settings UI: Open Settings (
Ctrl+,) → Search “ncprof backend” → Checkncprof.backend.autoStart - settings.json: Add
"ncprof.backend.autoStart": true
Understanding the Cache Directory
Location and Structure
The backend stores data in your workspace:
<workspace>/.cache/ncompass/
├── profiles/ # Profile configurations
│ └── .default/ # Default profile
│ └── .default/
│ ├── current/ # Symlink to latest session
│ │ └── config.json
│ ├── 20240101_120000_000000/ # Timestamped session 1
│ │ └── config.json
│ └── 20240102_130000_000000/ # Timestamped session 2
│ └── config.json
└── (other cache data)What’s Stored
- Profile configurations: Generated
config.jsonfiles with instrumentation details - Session history: Timestamped directories for each profiling session
- Current symlink: Points to the most recent configuration
Next Steps
- Settings & Commands: Complete reference of backend-related settings
- Detailed breakdown of profiling workflow: Learn how to use the backend for profiling
Last updated on