Python 3.9 is now generally available.

google.appengine.api.runtime.cpu_usage

Returns a SystemStat describing cpu usage, expressed in mcycles.

The returned object has the following accessors:

  • total(): total mcycles consumed by this instance
  • rate1m(): average mcycles consumed per second over the last minute
  • rate10m(): average mcycles consumed per second over the last ten minutes

Functions for converting from mcycles to cpu-seconds are located in the quotas API.