compute

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2025 License: Apache-2.0, BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Useful functions for interacting with the compute instance runtime.

Package compute_runtime provides ways to reflect on the operation of the compute runtime in which your application is operating.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVCPUTime

func GetVCPUTime() (time.Duration, error)

Get the amount of time taken on the vCPU.

The resulting time is millisecond-accurate, but we recommend against comparing the absolute values returned across different runs (or builds) of the program.

Because compute guests can run on a variety of different platforms, you should not necessarily expect these values to converge across different sessions. Instead, we strongly recommend using this value to look at the relative cost of various operations in your code base, by taking the time before and after a particular operation and then dividing this by the total amount of vCPU time your program takes. The resulting percentage should be relatively stable across different platforms, and useful in doing A/B testing.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL