Memoize list of legacy HLL Redis keys
What does this MR do and why?
Memoize list of legacy HLL Redis keys
This memoizes the contents of
lib/gitlab/usage_data_counters/hll_redis_key_overrides.yml
to prevent
reading its contents every time a EventSelectionRule
resolves to a
Redis key.
This speeds up event selection rule redis key lookup by a few
milliseconds, which compounds to around one minute in the
spec/tasks/gitlab/usage_data_rake_spec.rb
spec file.
References
This is a result from my investigation in !206374 (closed). See also Mock sleep in gitlab:usage_data task spec (!206568 - merged), which also affects this spec file.
How to test
Run bundle exec rspec spec/tasks/gitlab/usage_data_rake_spec.rb
and notice that it runs around 1 minute faster than on the master
branch.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.