-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[NDMII-2360] Replace the profile map with a profile provider #31210
Conversation
9ef2a4f
to
d014838
Compare
d014838
to
65cc2ac
Compare
Regression DetectorRegression Detector ResultsMetrics dashboard Baseline: 681517f Optimization Goals: ✅ No significant changes detected
|
perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
---|---|---|---|---|---|---|
➖ | basic_py_check | % cpu utilization | +2.68 | [-1.28, +6.64] | 1 | Logs |
➖ | quality_gate_idle_all_features | memory utilization | +1.42 | [+1.29, +1.54] | 1 | Logs bounds checks dashboard |
➖ | file_tree | memory utilization | +1.22 | [+1.07, +1.36] | 1 | Logs |
➖ | file_to_blackhole_1000ms_latency | egress throughput | +0.43 | [-0.37, +1.23] | 1 | Logs |
➖ | otel_to_otel_logs | ingress throughput | +0.30 | [-0.40, +1.00] | 1 | Logs |
➖ | file_to_blackhole_500ms_latency | egress throughput | +0.09 | [-0.67, +0.85] | 1 | Logs |
➖ | file_to_blackhole_1000ms_latency_linear_load | egress throughput | +0.03 | [-0.43, +0.50] | 1 | Logs |
➖ | file_to_blackhole_300ms_latency | egress throughput | +0.02 | [-0.61, +0.66] | 1 | Logs |
➖ | uds_dogstatsd_to_api | ingress throughput | +0.00 | [-0.10, +0.10] | 1 | Logs |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | -0.00 | [-0.01, +0.01] | 1 | Logs |
➖ | file_to_blackhole_100ms_latency | egress throughput | -0.02 | [-0.75, +0.71] | 1 | Logs |
➖ | file_to_blackhole_0ms_latency | egress throughput | -0.10 | [-1.01, +0.81] | 1 | Logs |
➖ | quality_gate_idle | memory utilization | -0.49 | [-0.54, -0.45] | 1 | Logs bounds checks dashboard |
➖ | pycheck_lots_of_tags | % cpu utilization | -0.70 | [-4.08, +2.69] | 1 | Logs |
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | -0.74 | [-1.47, -0.00] | 1 | Logs |
➖ | tcp_syslog_to_blackhole | ingress throughput | -0.93 | [-1.00, -0.86] | 1 | Logs |
Bounds Checks: ❌ Failed
perf | experiment | bounds_check_name | replicates_passed | links |
---|---|---|---|---|
❌ | file_to_blackhole_0ms_latency | lost_bytes | 8/10 | |
❌ | file_to_blackhole_500ms_latency | lost_bytes | 9/10 | |
✅ | file_to_blackhole_0ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_1000ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_1000ms_latency_linear_load | memory_usage | 10/10 | |
✅ | file_to_blackhole_100ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_100ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_300ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_300ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_500ms_latency | memory_usage | 10/10 | |
✅ | quality_gate_idle | memory_usage | 10/10 | bounds checks dashboard |
✅ | quality_gate_idle_all_features | memory_usage | 10/10 | bounds checks dashboard |
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:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
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.
-
Its configuration does not mark it "erratic".
CI Pass/Fail Decision
✅ Passed. All Quality Gates passed.
- quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
65cc2ac
to
4e339be
Compare
e0370fb
to
6ad5b9d
Compare
Test changes on VMUse this command from test-infra-definitions to manually test this PR changes on a VM: inv aws.create-vm --pipeline-id=50868614 --os-family=ubuntu Note: This applies to commit e1c9a66 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR looks great to me, nice job on it !
I've just left a few questions and naming questions
@@ -331,15 +330,15 @@ func (d *DeviceCheck) detectMetricsToMonitor(sess session.Session) error { | |||
if err != nil { | |||
return fmt.Errorf("failed to fetch sysobjectid: %s", err) | |||
} | |||
profile, err := profile.GetProfileForSysObjectID(d.config.Profiles, sysObjectID) | |||
profile, err := d.config.Profiles.GetProfileNameForSysObjectID(sysObjectID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a custom GetProfileForSysObjectID
instead ?
This avoid the repetition of getting the profile name, then getting the profile with a potential error which should never happen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behavior right now is:
- If a profile name is hard-coded in the config, we set
.ProfileName
when the config is loaded - When we start looking for metrics, if there isn't a hard-coded profile, we fetch the sysobjectid and then set
.ProfileName
to the name of the profile that best matches the sysobjectid. - In both cases, after setting
.ProfileName
, we fetch the profile in question from the provider and recomputeconfig.OidConfig
based on it.
So if we want to fetch the profile directly instead of having the name as an intermediate step, we'll still need to handle the case where it's been hardcoded in the config.
Now that I think about it, though, it would be a good idea to do that - we shouldn't be caching the name of the best matching profile, because the best match could change when RC updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making this change proved a little complicated, so I'm going to put it in a separate PR (I'm removing the caching fields .Metrics
, .MetricTags
, .ProfileTags
, .Metadata
, and .OidConfig
from the CheckConfig
type and making them a separate object that is held by the DeviceCheck
and recomputed when it detects that the sysobjectid or the profile manager has changed).
} | ||
|
||
func (s *staticProvider) GetAllProfiles() ProfileConfigMap { | ||
return s.configMap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ question: There's a slight risk here (and in GetProfile) that the caller can modify the content of the profiles. Did you see it and would you think it's worth to mitigate it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For GetAllProfiles it seemed excessive to clone them all; now that we don't have that anymore, it's just GetProfile
that has this risk. I didn't want to copy them because I thought it would be wasteful to copy a profile every time we access it, but maybe that's just me thinking too much like a Python programmer - probably the time needed to duplicate a profile is tiny enough that we can just go ahead and do it every time. Do you think it would be better to just duplicate the profile every time GetProfile()
is called?
23c3b37
to
e1c9a66
Compare
Package size comparisonComparison with ancestor Diff per package
Decision✅ Passed |
/merge |
Devflow running:
|
What does this PR do?
This PR changes the SNMP check to use a
profile.Provider
type for looking up profiles instead of a plainmap[string]ProfileConfig
. The overall behavior of the integration shouldn't change, as the only implementation ofProvider
in this PR is a static one that just provides profiles from amap[string]ProfileConfig
.Motivation
This is part of converting the SNMP integration to receive profiles via Remote Configuration - the first step is ensuring that profiles are fetched from a controlled source instead of being redundantly cached in a variety of places, so that I can add a new
Provider
type that listens for RC updates and rebuilds the internal configuration mapping.Describe how to test/QA your changes
Unit tests have been updated; the behavior of the agent shouldn't change.