Files
ubicloud/spec/model/project_spec.rb
Jeremy Evans c9414bc7fe Optimize Project#current_resource_usage
For VmVCpu, do sum in database instead of Ruby.

For GithubRunnerVCpu, avoid N+1 query issue, use a single query. This
does not do the sum in the database, as it requires looking up
information stored in a YAML config file.

For PostgresVCpu, avoid 2N+1 query issue, and use a single query
that sums in the database.

Update all of the specs that broke due to mocking.
2025-05-30 08:46:07 +09:00

9.1 KiB