Skip to content

Improve runtime of usage data core specs

Alper Akgun requested to merge 241260-core-improve-spec-runtime-for-core into master

What does this MR do?

Improve runtime of usage data core specs and also refactor with subject to make some spec more concise

Issue #241260 (closed)

Before

$ bundle exec rspec -fd spec/lib/gitlab/usage_data_spec.rb
Finished in 2 minutes 51.1 seconds (files took 24.09 seconds to load)
65 examples, 0 failures

After moving hash key checks to one example

Finished in 2 minutes 34.3 seconds (files took 22.99 seconds to load)

Queries saved: 5850

Screenshots

screenshot-2020-09-08-12-13-57

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by John Hope

Merge request reports