How to check App Engine quota?

Is there any way to check Google App Engine quota? I need to check the quota using Java Api. How can i do this?

Thank.

+3
source share
1 answer

Take a look at the com.google.appengine.api.quota package.
It provides the QuotaService interface (with implementation and factory) in several ways to check and monitor Google App Engine quotas.

import com.google.appengine.api.quota.QuotaService;
import com.google.appengine.api.quota.QuotaServiceFactory;

...
QuotaService qs = QuotaServiceFactory.getQuotaService();
long start = qs.getCpuTimeInMegaCycles();
doSomethingExpensive();
long end = qs.getCpuTimeInMegaCycles();
double cpuSeconds = qs.convertMegacyclesToCpuSeconds(end - start);
+4
source

All Articles