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.
This package does not work on App Engine "flexible environment".
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 service set to basic or manual scaling.
Statistics
typeStatisticsstruct{// CPU records the CPU consumed by this instance, in megacycles.CPUstruct{Totalfloat64Rate1Mfloat64// consumption rate over one minuteRate10Mfloat64// consumption rate over ten minutes}// RAM records the memory used by the instance, in megabytes.RAMstruct{Currentfloat64Average1Mfloat64// average usage over one minuteAverage10Mfloat64// average usage over ten minutes}}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-17 UTC."],[[["\u003cp\u003eThis documentation covers the \u003ccode\u003eruntime\u003c/code\u003e package (version 2.0.0-rc2) for Google App Engine standard environment, providing tools to monitor application resource usage and manage background processes.\u003c/p\u003e\n"],["\u003cp\u003eThe package includes functions like \u003ccode\u003eRunInBackground\u003c/code\u003e, which allows running code in a new background context, but is only valid for basic or manually scaled services.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eStatistics\u003c/code\u003e type offers insights into an instance's CPU and RAM usage, including total consumption, rates, and averages, via the \u003ccode\u003eStats\u003c/code\u003e function.\u003c/p\u003e\n"],["\u003cp\u003eThis \u003ccode\u003eruntime\u003c/code\u003e package is not supported in the App Engine flexible environment.\u003c/p\u003e\n"],["\u003cp\u003eThe library falls under the Pre-GA Offerings Terms, meaning it may have limited support and could undergo non-compatible changes.\u003c/p\u003e\n"]]],[],null,[]]