Skip to content
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

Enhance /v3/organizations/:guid/usage_summary #3513

Conversation

kathap
Copy link
Contributor

@kathap kathap commented Nov 17, 2023

It would be nice to get org usage info for (nearly) all resources that are restricted by an org quota plan, beside memory in mb and started instances, which are already implemented.

GET /v3/organizations/:guid/usage_summary returns now in addition to memory_in_mb and started_instances also: routes, service_instances, reserved_ports, domains, per_app_tasks, service_keys

With this change it is possible to get org usage info for all resources that are restricted by an org quota plan.

log_rate_limit_in_bytes_per_second will be skipped for now, as it would introduce a dependency to diego.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

@kathap kathap marked this pull request as draft November 17, 2023 14:00
@kathap kathap force-pushed the enhance_organizations_usage_summary branch 4 times, most recently from 4af54c2 to aab84cb Compare November 29, 2023 16:41
@kathap kathap marked this pull request as ready for review November 30, 2023 08:07
@philippthun philippthun self-assigned this Nov 30, 2023
@kathap kathap force-pushed the enhance_organizations_usage_summary branch from 5cfbc52 to 5f2829e Compare December 6, 2023 09:14
@philippthun philippthun self-requested a review December 8, 2023 13:30
It would be nice to get org usage info for (nearly) all resources that are restricted by an org quota plan, beside memory in mb and started instances, which are already implemented.

In the course of the change running_and_pending_tasks_count was refactored from nested selects to joins. Joins are generally more efficient than nested selects, especially when dealing with large datasets.

Co-authored-by: Philipp Thun <[email protected]>
@kathap kathap force-pushed the enhance_organizations_usage_summary branch from 8317229 to c70e1c5 Compare December 13, 2023 09:55
@philippthun philippthun merged commit 772033d into cloudfoundry:main Dec 14, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants