Skip to content

Comments

[v8] Use embedded process instances for "cf apps" summary#3725

Draft
jochenehret wants to merge 1 commit intocloudfoundry:v8from
sap-contributions:v8_apps_cmd_process_instances
Draft

[v8] Use embedded process instances for "cf apps" summary#3725
jochenehret wants to merge 1 commit intocloudfoundry:v8from
sap-contributions:v8_apps_cmd_process_instances

Conversation

@jochenehret
Copy link
Contributor

Description of the Change

Use the new "embedded process instances" cloud controller feature to speed up the cf apps command, in particular on spaces with a larger number of apps. Instead of calling the individual /stats endpoint per process, use this request once per space:
GET /v3/processes?space_guids=:guid&embed=process_instances

Why Is This PR Valuable?

Time comparison on a test space with 100 apps and 2 instances each:

# old implementation
cf apps  0.18s user 0.07s system 1% cpu 12.572 total

# new implementation
cf apps  0.07s user 0.03s system 6% cpu 1.453 total

Applicable Issues

cloudfoundry/cloud_controller_ng#4796

How Urgent Is The Change?

Not super-urgent.

* use "/v3/processes?space_guids=:guid&embed=process_instances" to get processes and process instances in one request
* see cloudfoundry/cloud_controller_ng#4796
@jochenehret jochenehret force-pushed the v8_apps_cmd_process_instances branch from c4b3d1c to dea08a9 Compare February 23, 2026 10:42
@jochenehret jochenehret marked this pull request as ready for review February 23, 2026 10:50
@jochenehret jochenehret changed the title Use embedded process instances for "cf apps" summary [v8] Use embedded process instances for "cf apps" summary Feb 23, 2026
@jochenehret jochenehret marked this pull request as draft February 23, 2026 13:44
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.

1 participant