What's new in v0.4.1
Patch release: makes config loading robust on Windows, adds soft startup warnings for unusual daemon-limit values and tightens the bench percentile calculation. No breaking changes.
New
- Startup comfort-zone warnings for daemon limits.
validate_daemon_limitsandvalidate_detection_paramsnow emit a one-shottracing::warn!whenmax_payload_size,max_active_traces,max_events_per_trace,max_retained_findings,trace_ttl_ms, ormax_fanoutfalls outside its recommended comfort zone (e.g.max_active_tracesoutside 1,000-100,000). The warning includes the field name, the value, the boundary crossed, and a one-line explanation of the practical consequence (eviction pressure, ingest latency, detection noise...). Hard caps are unchanged: values inside the hard bounds still parse successfully, the warning is informational only. A newconfig_defaults_sit_inside_every_comfort_zonetest locks the invariant thatConfig::default()never triggers a startup warning.
Fixes
- Windows-style config paths in TOML basic strings. New
normalize_toml_path_stringspre-processor inconfig.rsrewrites bare backslashes inside path-keyed values (hourly_profiles_file,calibration_file,json_socket,tls_cert_path,tls_key_path) sojson_socket = "C:\temp\sock"parses as a literal path instead of triggering a TOML escape error. Already-escaped pairs (C:\\temp\\sock), TOML literal strings ('C:\temp\sock'), and UNC prefixes (\\server\share) round-trip correctly. Falls back transparently to the original input if normalization breaks parsing, with atracing::debug!line for diagnosability. max_retained_findingswas unbounded. A typo likemax_retained_findings = 999999999999would have OOM-ed the daemon at the first stored finding. Now capped at 10,000,000 (with0still documented to disable the store entirely).- Bench
p99off-by-one.compute_latency_percentileswas computingp99_idx = ceil(len * 0.99)(1-based rank) and indexing into the 0-based vector, biasing the reported p99 by one position. Now correctly subtracts 1 withsaturating_sub. The function also guards against empty slices (returns(0.0, 0.0)) and boundsp50_idxsymmetrically withp99_idx. - Daemon-only build broke after
feature = "tempo"gating regression.spawn_one_shot_server,http_200_text, andhttp_statusintest_helpers.rsare now gated underany(feature = "daemon", feature = "tempo")socargo check --features daemon(withouttempo) keeps compiling.http_200_bytesstays undertempoonly since it is the only consumer.
Refactors
escape_toml_path_backslashessplit into three named helpers (copy_until_backslash,skip_backslash_run,backslash_emit_len) to bring SonarCloud cognitive complexity from 20 to under 15.find_basic_string_endrewritten with a linear consecutive-backslash counter instead of a per-quote backward lookbehind. Closes a worst-case O(n²) on inputs full of\. A regression test feeds it a 10,000-backslash run.
Hardening
- UTF-8 safety in
normalize_toml_path_line. The opening"is now pushed explicitly instead of relying on an inclusive byte-range slice that could panic on a multi-byte char before the value.
Tests
- 21 new tests across
config.rsand the bench percentile module: UNC paths (raw + pre-escaped), inline comments after path values, every entry ofTOML_PATH_STRING_KEYS, TOML literal strings, fallback branch, pathological 10k-backslash input, percentile edges (n=1, n=2, n=101, empty), comfort-zone behavior on each daemon limit,max_retained_findings = 0keeps disabling the store, and the defaults-in-comfort-zone invariant.
Docs
docs/CONFIGURATION.mdanddocs/FR/CONFIGURATION-FR.md: hard ranges added to each[daemon]field row, new "Comfort zones and startup warnings" sub-section with a band table per field.docs/design/07-CLI-CONFIG-RELEASE(EN + FR): bench percentile snippet updated to reflect the off-by-one fix.
Install
# Prebuilt binaries (Linux amd64/arm64, macOS arm64, Windows amd64)
curl -LO https://github.com/robintra/perf-sentinel/releases/download/v0.4.1/perf-sentinel-linux-amd64
chmod +x perf-sentinel-linux-amd64
sudo mv perf-sentinel-linux-amd64 /usr/local/bin/perf-sentinel# From crates.io
cargo install perf-sentinel# Docker
docker pull robintrassard/perf-sentinel:0.4.1Also available on GHCR: ghcr.io/robintra/perf-sentinel:0.4.1
Verify the binary against SHA256SUMS.txt:
curl -LO https://github.com/robintra/perf-sentinel/releases/download/v0.4.1/SHA256SUMS.txt
sha256sum -c SHA256SUMS.txt --ignore-missingFull diff: v0.4.0...v0.4.1