Standard library / runtime/metrics
metrics.All()
Lists supported metric descriptions, including names with units, kinds and cumulative flags. The inventory can change across Go versions. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func All() []DescriptionReturn Value
[]Description
Descriptions of the supported metrics.
Working Example
Example Snippetgo
package main
import ( "fmt" "runtime/metrics")
func main() { fmt.Println(len(metrics.All()) > 0) }