citisensor
citisensor

Reputation: 31

Resource Utilisation

I have created an compute engine instance in Google Cloud environment. The instance hosts a service. Using some script I load tested the service by sending http requests at different load level. Now I want to visualize the resource utilization in R. Is there a simple API that I can use to fetch CPU utilization between X and Y time? X & Y are load test time. Thanks

Upvotes: 3

Views: 260

Answers (1)

Kamran
Kamran

Reputation: 3527

Use Google Cloud Monitoring API.

Thecompute.googleapis.com/instance/cpu/utilization metric returns the percentage of the allocated CPU that is currently in use on the instance.

Thecompute.googleapis.com/instance/cpu/usage_time metric is a delta type and you can specify the time interval for CPU usage. You can try these APIs at this link or at Google API Explorer.

Upvotes: 1

Related Questions