Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make Tagged relevant to materialized tags, not raw tags #438

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

tobz
Copy link
Member

@tobz tobz commented Jan 23, 2025

Context

Prior to this PR, the Tagged trait was something we added to abstract over the numerous possible ways to supply the borrowed tags that get fed in when resolving a context.

This ends up being overkill and unnecessary without the Resolvable machinery, and would be better served as a way to abstract getting the materialized tags from different implementations of tag storage.

Solution

This PR reworks the Tagged trait slightly by moving it under saluki_context::tags, having it give back &Tag instead of &str, and adding implementations for the major tag storage types, TagSet, SharedTagSet, and Context. This gives us a unified approach to visiting tags, regardless of where they're stored.

We've also reverted back, essentially, to the previous method signatures for hashing a context and creating context keys, by simply taking a value that can be turned into an iterator with items that dereference to a string. This more than satisfies the needs of the aforementioned methods, and lets us avoid a second trait related to tags, which would be otherwise confusing.

@tobz tobz changed the title chore: make Tagged relevant to materialized tags, not raw tags chore: make Tagged relevant to materialized tags, not raw tags Jan 23, 2025
@tobz tobz marked this pull request as ready for review January 23, 2025 20:07
@tobz tobz requested review from a team as code owners January 23, 2025 20:07
@pr-commenter
Copy link

pr-commenter bot commented Jan 23, 2025

Regression Detector (DogStatsD)

Regression Detector Results

Run ID: a450ed6f-612a-4acc-b1f2-412d9f44c853

Baseline: 7.62.0-rc.8
Comparison: 7.62.0-rc.8

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
dsd_uds_100mb_3k_contexts ingress throughput +0.01 [-0.03, +0.06] 1
dsd_uds_1mb_3k_contexts_dualship ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_1mb_50k_contexts_memlimit ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_512kb_3k_contexts ingress throughput +0.00 [-0.01, +0.01] 1
dsd_uds_100mb_250k_contexts ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_10mb_3k_contexts ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_1mb_50k_contexts ingress throughput -0.00 [-0.00, +0.00] 1
dsd_uds_1mb_3k_contexts ingress throughput -0.00 [-0.00, +0.00] 1
dsd_uds_40mb_12k_contexts_40_senders ingress throughput -0.00 [-0.00, +0.00] 1
dsd_uds_500mb_3k_contexts ingress throughput -0.00 [-0.01, +0.01] 1
dsd_uds_100mb_3k_contexts_distributions_only memory utilization -0.20 [-0.40, -0.01] 1
quality_gates_idle_rss memory utilization -0.60 [-0.66, -0.53] 1

Bounds Checks: ❌ Failed

perf experiment bounds_check_name replicates_passed links
quality_gates_idle_rss memory_usage 0/10

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

@pr-commenter
Copy link

pr-commenter bot commented Jan 23, 2025

Regression Detector (Saluki)

Regression Detector Results

Run ID: a51e93de-5d26-45ac-af4a-516f05cff10a

Baseline: 507fe24
Comparison: 4009766
Diff

❌ Experiments with missing or malformed data

This is a critical error. No usable optimization goal data was produced by the listed experiments. This may be a result of misconfiguration. Ping #single-machine-performance and we can help out.

  • dsd_uds_100mb_250k_contexts

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
quality_gates_idle_rss memory utilization +0.55 [+0.52, +0.58] 1
dsd_uds_10mb_3k_contexts ingress throughput +0.02 [-0.01, +0.05] 1
dsd_uds_50mb_10k_contexts_no_inlining ingress throughput +0.01 [-0.06, +0.07] 1
dsd_uds_512kb_3k_contexts ingress throughput +0.00 [-0.01, +0.02] 1
dsd_uds_100mb_3k_contexts ingress throughput +0.00 [-0.05, +0.05] 1
dsd_uds_1mb_3k_contexts_dualship ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_50mb_10k_contexts_no_inlining_no_allocs ingress throughput -0.00 [-0.06, +0.06] 1
dsd_uds_1mb_3k_contexts ingress throughput -0.00 [-0.02, +0.01] 1
dsd_uds_1mb_50k_contexts ingress throughput -0.00 [-0.02, +0.01] 1
dsd_uds_40mb_12k_contexts_40_senders ingress throughput -0.03 [-0.06, +0.00] 1
dsd_uds_100mb_3k_contexts_distributions_only memory utilization -0.16 [-0.29, -0.03] 1
dsd_uds_500mb_3k_contexts ingress throughput -0.27 [-0.41, -0.14] 1
dsd_uds_1mb_50k_contexts_memlimit ingress throughput -1.03 [-1.50, -0.57] 1

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed links
quality_gates_idle_rss memory_usage 10/10

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

@pr-commenter
Copy link

pr-commenter bot commented Jan 23, 2025

Regression Detector Links

Experiment Result Links

experiment link(s)
dsd_uds_100mb_250k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_100mb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_100mb_3k_contexts_distributions_only [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_10mb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_1mb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_1mb_3k_contexts_dualship [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_1mb_50k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_1mb_50k_contexts_memlimit [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_40mb_12k_contexts_40_senders [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_500mb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_512kb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
quality_gates_idle_rss [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_50mb_10k_contexts_no_inlining (ADP only) [Profiling (ADP)] [SMP Dashboard]
dsd_uds_50mb_10k_contexts_no_inlining_no_allocs (ADP only) [Profiling (ADP)] [SMP Dashboard]

@tobz tobz force-pushed the tobz/remove-context-tags-mutability branch from df12b22 to de9f7e9 Compare January 27, 2025 14:51
@tobz tobz force-pushed the tobz/refactor-tagged-trait-usage branch from 4009766 to 2162957 Compare January 27, 2025 14:51
Base automatically changed from tobz/remove-context-tags-mutability to main January 27, 2025 14:58
@tobz tobz force-pushed the tobz/refactor-tagged-trait-usage branch from 2162957 to 47c48f3 Compare January 27, 2025 14:58
@tobz tobz merged commit 769ab1b into main Jan 27, 2025
8 of 14 checks passed
@tobz tobz deleted the tobz/refactor-tagged-trait-usage branch January 27, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Core functionality, event model, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants