github robintra/perf-sentinel v0.9.13

latest releases: chart-v0.9.14, v0.9.14, chart-v0.9.13...
one day ago

What's new in v0.9.13

v0.9.13 turns perf-sentinel's I/O waste ratio into a measured database energy figure. When Alumet measures the database cgroup, the watch daemon reports how many kilowatt-hours of that measured energy the avoidable SQL is responsible for. Everything here is daemon-only and opt-in, so nothing changes at upgrade time unless an operator enables it, with one exception: an unknown key under [green.alumet] now fails config load instead of being silently ignored.

Database energy waste

[green.alumet.database] declares the database cgroup Alumet measures (label_value, optional region). A database emits no spans, so it can never appear in service_mappings and its energy is invisible to per-service attribution. Each scoring window the daemon multiplies that cgroup's measured window energy by the SQL-only waste ratio and reports green_summary.database_waste: the measured kWh, the waste kWh, the SQL waste ratio, and a gCO2 conversion when a region is declared. The figure is a CPU-only lower bound computed from a count-based ratio, so it stays informational, excluded from energy_kwh, from co2, and from the public disclosure. The formula, its bounds, and the intensity fallbacks are documented in docs/METHODOLOGY.md and docs/LIMITATIONS.md#alumet-precision-bounds.

SQL share of the I/O op counts

green_summary gains total_sql_io_ops and avoidable_sql_io_ops, the SQL-only share of total_io_ops and avoidable_io_ops, with the same dedup semantics restricted to the SQL finding types. They are what the database figure multiplies internally, and they also let an operator apply the SQL-only waste ratio to an externally measured database energy reading without the built-in path. Both are additive and parse as 0 when an older baseline is diffed against a new report.

Operator-visible behavior change

Unknown keys and subsection names under [green.alumet] are now rejected at config load instead of being silently dropped, so a typo like [green.alumet.databse] fails loudly rather than disabling a feature without a word. A configuration that carried a stray or mistyped key under that section stops loading after the upgrade, remove the key. The query monitor Energy tab also gains a database waste line next to the window energy, with the region rendered through the terminal sanitizer.

Why this is a patch and not a minor

The database figure is daemon-only and absent from the default configuration, so no existing deployment produces it at upgrade time. The two new green_summary fields are additive and default to 0 on older baselines, and database_waste is an optional object excluded from every total, so a consumer that ignores it parses unchanged. The one behavior change at upgrade is the stricter [green.alumet] parsing, which only affects a configuration that already carried an unknown key under that single section.

Validation

The release was validated in the simulation lab, twelve of thirteen checks passing with one skip. The database figure was exercised end to end against a synthetic Alumet exposition: the measured energy, the recomputed waste kWh and SQL ratio, the gCO2 conversion, and the exclusion from every total and from the disclosure. The energy accounting held under load, the measured energy stayed conserved across analysis windows while the daemon shed batches without running out of memory, and the live figure aged out after a scraper death instead of pinning a dead measurement. The five config misconfigurations all failed loudly, and an unknown-but-valid region warned rather than rejecting. The single skip is the live query monitor TUI, which has no headless mode, its rendering is covered by unit tests instead. The full Rust suite passes green, clippy is clean at -D warnings on Rust 1.97.1, and the default and --no-default-features builds both pass.

Verifying this release

# Binary integrity via SLSA Build L3 attestation
gh attestation verify perf-sentinel-linux-amd64 \
  --repo robintra/perf-sentinel

# A periodic disclosure produced by this binary
perf-sentinel verify-hash --report perf-sentinel-report.json \
  --expected-identity "https://github.com/robintra/perf-sentinel/.github/workflows/release.yml@refs/tags/v0.9.13" \
  --expected-issuer "https://token.actions.githubusercontent.com"

gh CLI 2.49 or newer required for gh attestation verify.

Full Changelog: v0.9.12...v0.9.13

Don't miss a new perf-sentinel release

NewReleases is sending notifications on new releases.