Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



The runtime package

import "appengine/runtime"

Introduction

Package runtime exposes information about the resource usage of the application. It also provides a way to run code in a new background context of a module.

Index

func RunInBackground(c appengine.Context, f func(c appengine.Context)) error
type Statistics
func Stats(c appengine.Context) (*Statistics, error)

func RunInBackground

func RunInBackground(c appengine.Context, f func(c appengine.Context)) error

RunInBackground runs f in a background goroutine in this process. f is provided a context that may outlast the context provided to RunInBackground. This is only valid to invoke from a manually scaled module.

type Statistics

type Statistics struct {
    // CPU records the CPU consumed by this instance, in megacycles.
    CPU struct {
        Total   float64
        Rate1M  float64 // consumption rate over one minute
        Rate10M float64 // consumption rate over ten minutes
    }
    // RAM records the memory used by the instance, in megabytes.
    RAM struct {
        Current    float64
        Average1M  float64 // average usage over one minute
        Average10M float64 // average usage over ten minutes
    }
}

Statistics represents the system's statistics.

func Stats

func Stats(c appengine.Context) (*Statistics, error)

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.