-
Notifications
You must be signed in to change notification settings - Fork 899
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
[WIP] Only collect rollup associations #22609
base: master
Are you sure you want to change the base?
Conversation
WIP: code is done. need to research whether we use any of these other associations |
update:
|
fd43d93
to
14a8029
Compare
update:
|
if defined?(self.class::PERF_ROLLUPS) | ||
self.class::PERF_ROLLUPS | ||
else | ||
self.class::PERF_ROLLUP_CHILDREN.each_with_object({}) { |x, h| h[x] = x } | ||
end |
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.
This makes me think that instead of introducing a new constant that partially duplicates PERF_ROLLUP_CHILDREN that we should just outright change PERF_ROLLUP_CHILDREN.
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.
I understand that they serve 2 different purposes, so perhaps the other option is a better name than PERF_ROLLUPS; perhaps VIM_PERFORMANCE_STATE_ROLLUP_CHILDREN?
outstanding:
thoughts:
|
This pull request is not mergeable. Please rebase and repush. |
This pull request has been automatically closed because it has not been updated for at least 3 months. Feel free to reopen this pull request if these changes are still valid. Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation. |
4507bf0
to
ac70b26
Compare
update:
comments:
|
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
consolidate logic for association names
Kubernetes currently defines this, but making it generic for all child container managers
before, the rollups were limited now, unsure not sure if clearing associations code is still valid
ac70b26
to
5b45f67
Compare
Checked commits kbrock/manageiq@172dcbe~...5b45f67 with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint app/models/metric/ci_mixin/state_finders.rb
|
update: in a WIP state. getting ready to green-red-green that the rollups are correct. all the warnings highlight temporary code that want to remove. |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
1 similar comment
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
VimPerformanceState
are used to represent an object in the past.These records are used for metrics rollups, metric calculations, and chargeback calculations.
Do note, that chargeback calculations do contain some form of a rollup.
We only rollup metrics by the
PERF_ROLLUP_CHILDREN
association.Collecting all these other grow our
VimPerformanceState
table and take up processing timefor collecting vps and downloading vps.
Goal v2
The caching and others assume that the name of the association is the kind of association. so vms is stored in 'Model#vms'. But as seen, sometimes we take vms from all_vms_and_templates and others.
The goal is to define in the model the associations.
From here, hopefully we can prune out any associations that don't make sense. (which will give us a big reduction in speed of creating a VimPerformanceState and the amount of data stored in the database.)