Create project-feature in project factory
What does this MR do?
Builds project feature for a project with assigned transient attributes instead of updating the record after create. That'll allow us to save an update SQL request on every creation of a project factory. For example, for
EVENT_PROF='sql.active_record' FPROF=1 rspec ./spec/models/project_spec.rb
Before
Total events: 75003
After
Total events: 76199
Factories time comparison:
[TEST PROF INFO] Factories usage
total top-level total time time per call top-level time name
756 720 119.6401s 0.1583s 114.1849s project
756 720 113.1802s 0.1497s 107.4402s project
Queries saved: 1196 (at least)
Edited by Igor Drozdov