Skip to content

Add sds_excluded_namespace tag to multipass excluded match metric#348

Merged
vinckama merged 1 commit intomainfrom
vincent.roy/3585
Apr 10, 2026
Merged

Add sds_excluded_namespace tag to multipass excluded match metric#348
vinckama merged 1 commit intomainfrom
vincent.roy/3585

Conversation

@vinckama
Copy link
Copy Markdown
Contributor

@vinckama vinckama commented Apr 9, 2026

SDS-2471

Adds sds_excluded_namespace tag to false_positive.multipass.excluded_match metric when enable_debug_observability is enabled. Zero-cost when disabled.

Benchmark (multipass_excluded_scan, ~260 paths):

Stage Time vs baseline
main (no changes) 69.3 µs
Regression (into_static() every call) 80.2 µs +15.7%
This PR (reference + conditional) 70.1 µs +1.2% (noise)

When debug observability is enabled, the false_positive.multipass.excluded_match
metric now includes an sds_excluded_namespace tag identifying which excluded
path contributed the match that caused the false positive.

Changes:
- excluded_matches changed from AHashSet<String> to AHashMap<String, String>
  to track the contributing path as a pre-formatted string
- TruePositiveSearch stores a &Path reference (zero-cost) and only calls
  to_string() at the insert point when debug observability is enabled;
  otherwise stores an empty string (no allocation)
- Added multipass_excluded_scan benchmark to catch performance regressions

Benchmark (multipass_excluded_scan):
  main (baseline): 27.0 µs
  this branch:     26.7 µs (no regression)
@vinckama vinckama marked this pull request as ready for review April 10, 2026 08:00
@vinckama vinckama requested a review from a team as a code owner April 10, 2026 08:00
@vinckama vinckama merged commit 5e8557f into main Apr 10, 2026
4 checks passed
@vinckama vinckama deleted the vincent.roy/3585 branch April 10, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants