DataDog / saluki

An experimental toolkit for building telemetry data planes in Rust.
Apache License 2.0
12 stars 2 forks source link

[APR-205] chore: switch to enum for origin entity tag cardinality #224

Closed tobz closed 2 weeks ago

tobz commented 2 weeks ago

Context

In #223, we detailed the state of the size of the MetricMetadata struct in memory, and the contribution of string fields, in particular the cardinality field on OriginEntity, towards the overall size of MetricMetadata.

Every metric that flows through the system must be allocated at a certain size, regardless of whether or not many of these fields are set, which means larger allocations, more bytes to copy around, and so on.

Solution

This PR makes the cardinality field use an enum now instead of a raw string. As noted in #223, the original point of using a string was to allow for separation between saluki-event and saluki-env... but I no longer believe the trade-off is worth it, and we can slim down things today by shifting the enum from saluki-env to saluki-event, which is what this PR does.

Fixes #223.

pr-commenter[bot] commented 2 weeks ago

Regression Detector (DogStatsD)

Regression Detector Results

Run ID: 59e2f935-bf1d-4409-bfb8-d0d8d7b80348

Baseline: 7.55.2 Comparison: 7.55.3

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

No significant changes in experiment optimization goals

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

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Fine details of change detection per experiment

| perf | experiment | goal | Δ mean % | Δ mean % CI | links | |------|----------------------------------------------|--------------------|----------|----------------|-------| | ➖ | dsd_uds_10mb_3k_contexts | ingress throughput | +0.02 | [-0.01, +0.05] | | | ➖ | dsd_uds_512kb_3k_contexts | ingress throughput | +0.02 | [-0.03, +0.06] | | | ➖ | dsd_uds_1mb_50k_contexts | ingress throughput | +0.02 | [+0.00, +0.03] | | | ➖ | dsd_uds_100mb_250k_contexts | ingress throughput | +0.00 | [-0.04, +0.04] | | | ➖ | dsd_uds_1mb_3k_contexts | ingress throughput | -0.00 | [-0.08, +0.08] | | | ➖ | dsd_uds_500mb_3k_contexts | ingress throughput | -0.00 | [-0.01, -0.00] | | | ➖ | dsd_uds_100mb_3k_contexts | ingress throughput | -0.01 | [-0.02, -0.01] | | | ➖ | dsd_uds_1mb_50k_contexts_memlimit | ingress throughput | -0.02 | [-0.04, +0.01] | | | ➖ | dsd_uds_100mb_3k_contexts_distributions_only | memory utilization | -1.87 | [-2.09, -1.64] | |

Explanation

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[bot] commented 2 weeks ago

Regression Detector (Saluki)

Regression Detector Results

Run ID: 48366763-6585-4409-989e-3a34738db22f

Baseline: 439b8fde23576ae5a93d87860729283fe481e6f9 Comparison: 953934a5d770b7d71b4a7ba368bed48a1c81b5b6

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

Significant changes in experiment optimization goals

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

perf experiment goal Δ mean % Δ mean % CI links
dsd_uds_1mb_50k_contexts_memlimit ingress throughput +5.21 [+1.88, +8.54]

Fine details of change detection per experiment

| perf | experiment | goal | Δ mean % | Δ mean % CI | links | |------|-------------------------------------------------|--------------------|----------|----------------|-------| | ✅ | dsd_uds_1mb_50k_contexts_memlimit | ingress throughput | +5.21 | [+1.88, +8.54] | | | ➖ | dsd_uds_500mb_3k_contexts | ingress throughput | +1.17 | [+1.08, +1.27] | | | ➖ | dsd_uds_1mb_3k_contexts | ingress throughput | +0.07 | [-0.00, +0.13] | | | ➖ | dsd_uds_1mb_50k_contexts | ingress throughput | +0.05 | [+0.03, +0.07] | | | ➖ | dsd_uds_50mb_10k_contexts_no_inlining | ingress throughput | +0.00 | [-0.00, +0.00] | | | ➖ | dsd_uds_100mb_3k_contexts | ingress throughput | -0.00 | [-0.01, +0.01] | | | ➖ | dsd_uds_50mb_10k_contexts_no_inlining_no_allocs | ingress throughput | -0.00 | [-0.03, +0.02] | | | ➖ | dsd_uds_100mb_250k_contexts | ingress throughput | -0.01 | [-0.26, +0.25] | | | ➖ | dsd_uds_512kb_3k_contexts | ingress throughput | -0.01 | [-0.07, +0.05] | | | ➖ | dsd_uds_10mb_3k_contexts | ingress throughput | -0.06 | [-0.13, +0.02] | | | ➖ | dsd_uds_100mb_3k_contexts_distributions_only | memory utilization | -2.63 | [-2.77, -2.49] | |

Explanation

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[bot] commented 2 weeks ago

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_50k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_1mb_50k_contexts_memlimit [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]
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]