Package com.google.apphosting.api
Class ApiStats
- java.lang.Object
-
- com.google.apphosting.api.ApiStats
-
public abstract class ApiStats extends Object
Represents automatic statistics collected by the ApiProxy. If present, this object will be stored under the KEY-variable in an Environment's property. This object is basically a pojo, a simple container for collected values.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ApiStats(ApiProxy.Environment env)
Creates a new ApiStats object and binds it to a given Environment.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ApiStats
get(ApiProxy.Environment env)
For a given environment, return the corresponding ApiStats object.abstract long
getApiTimeInMegaCycles()
abstract long
getCpuTimeInMegaCycles()
-
-
-
Constructor Detail
-
ApiStats
protected ApiStats(ApiProxy.Environment env)
Creates a new ApiStats object and binds it to a given Environment.- Parameters:
env
- the Environment object to bind this object to.- Throws:
IllegalStateException
- if an object is already bound
-
-
Method Detail
-
get
public static ApiStats get(ApiProxy.Environment env)
For a given environment, return the corresponding ApiStats object. If the environment does not have an ApiStats object, null will be returned.
-
getApiTimeInMegaCycles
public abstract long getApiTimeInMegaCycles()
- Returns:
- the overall time spent in API cycles, as returned by the system. Unit is megacycles.
-
getCpuTimeInMegaCycles
public abstract long getCpuTimeInMegaCycles()
- Returns:
- the overall time spent in CPU processing. Unit is megacycles.
-
-