runtime

package
v2.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 4 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package runtime implements runtime stats collection convenience functions.

Index

Constants

This section is empty.

Variables

View Source
var DefaultRuntimeInterval = 10 * time.Second

DefaultRuntimeInterval is the default runtime collection interval.

Functions

func Collect

func Collect(s *statter.Statter)

Collect collects runtime metrics periodically sending them to s.

Collect blocks until the process exits. To stop collection, use CollectWithContext instead.

func CollectEvery

func CollectEvery(s *statter.Statter, d time.Duration)

CollectEvery collects runtime metrics at interval d sending them to s.

CollectEvery blocks until the process exits. To stop collection, use CollectWithContext instead.

func CollectWithContext added in v2.9.0

func CollectWithContext(ctx context.Context, s *statter.Statter, d time.Duration)

CollectWithContext collects runtime metrics at interval d sending them to s, stopping when ctx is done.

Types

This section is empty.

Jump to

Keyboard shortcuts

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