mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 15:08:24 +00:00
The stabilization acceptance criteria require sustained CPU and memory evidence, but ngit-grasp currently exposes neither through its Prometheus endpoint. Manual systemd sampling is service-specific but does not provide a durable application time series. Enable rust-prometheus's Linux process collector and explicitly register it with ngit-grasp's private registry. Also read the service's cgroup v2 CPU and memory counters so the headline metrics include every child Git process. The process-only metrics remain available to distinguish daemon cost from Git work. Document both levels and the PromQL rate used to derive CPU use. The cgroup metrics are omitted gracefully when the binary is not running in a readable Linux cgroup v2 hierarchy. They follow the existing global metrics switch: no separate configuration surface is added. Host-wide contention and unrelated services remain deliberately excluded. Validated with: - git diff --check - nix develop -c cargo test --lib metrics::tests::test_metrics_with_repository_counting The repository-wide cargo fmt check still reports pre-existing formatting in unrelated sync modules and tests; src/metrics/mod.rs was formatted directly.