perf sentineldocs
FRGitHub
Documentation / Design index

Design documentation index

Deep design documentation for perf-sentinel. These documents explain why each decision was made, not just what the code does. They are intended for contributors and maintainers who need to understand the rationale behind the implementation.

For user-facing documentation, see the Documentation index.

Table of contents

DocumentTopics
01: Pipeline and TypesPipeline vs hexagonal architecture, type chain, workspace split, deterministic output, quality gate
02: NormalizationSQL state machine, HTTP normalizer, micro-optimizations (batch push, IN-list skip, hand-coded UUID)
03: Correlation and StreamingBatch HashMap grouping, LRU cache, ring buffer, TTL eviction, memory budget
04: DetectionN+1, redundant and slow detection algorithms, borrowed keys, iterator-based window, cross-trace correlation
05: GreenOps and CarbonIIS formula, waste ratio dedup, CO2 conversion, SCI alignment
06: Ingestion and DaemonOTLP conversion, daemon event loop, sampling, security hardening, query API, Prometheus pg_stat
07: CLI, Config and ReleaseBench, query, report, diff subcommands. HTML dashboard sink, CSV export, deep-link hash, cheatsheet modal, vim-style tab shortcuts. Config parsing, release profile, distribution, source location
08: Periodic DisclosureSchema v1.0 determinism, G1/G2 granularity, collect-all validator, per-service attribution, daemon archive writer, disclose CLI dispatcher
09: Carbon AttributionPer-service energy + carbon at scoring time, region attribution, model precedence, aggregator runtime-vs-proxy branching
10: Sigstore and SLSAIn-toto v1 predicate, Sigstore cosign signature flow, SLSA Build L3 build provenance, verify-hash chain, privacy on Rekor public

Source file mapping

Source FileDesign Doc
lib.rs01: Pipeline
event.rs01: Pipeline
pipeline.rs01: Pipeline
quality_gate.rs01: Pipeline
normalize/sql.rs02: Normalization
normalize/http.rs02: Normalization
normalize/mod.rs02: Normalization
correlate/mod.rs03: Correlation
correlate/window.rs03: Correlation
detect/mod.rs04: Detection
detect/n_plus_one.rs04: Detection
detect/redundant.rs04: Detection
detect/slow.rs04: Detection
detect/correlate_cross.rs04: Detection
detect/fanout.rs04: Detection
detect/chatty.rs04: Detection
detect/pool_saturation.rs04: Detection
detect/serialized.rs04: Detection
detect/sanitizer_aware.rs04: Detection
detect/suggestions.rs04: Detection
score/mod.rs05: GreenOps, 09: Carbon Attribution
score/carbon.rs05: GreenOps
score/carbon_compute.rs05: GreenOps, 09: Carbon Attribution
score/region_breakdown.rs05: GreenOps
ingest/mod.rs06: Ingestion
ingest/json.rs06: Ingestion
ingest/otlp.rs06: Ingestion
ingest/pg_stat.rs06: Ingestion
daemon/mod.rs06: Ingestion
daemon/event_loop.rs06: Ingestion
daemon/listeners.rs06: Ingestion
daemon/tls.rs06: Ingestion
daemon/json_socket.rs06: Ingestion
daemon/sampling.rs06: Ingestion
daemon/findings_store.rs06: Ingestion
daemon/query_api.rs06: Ingestion
config.rs07: CLI/Config, 08: Periodic Disclosure
report/mod.rs, json.rs01: Pipeline
report/metrics.rs06: Ingestion
report/periodic/*08: Periodic Disclosure
daemon/archive.rs08: Periodic Disclosure
sentinel-cli/src/main.rs07: CLI/Config
sentinel-cli/src/disclose.rs08: Periodic Disclosure
sentinel-cli/src/tui.rs07: CLI/Config