Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleRead_readingOneMetric (0.15 sec)

  1. src/runtime/metrics/example_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package metrics_test
    
    import (
    	"fmt"
    	"runtime/metrics"
    )
    
    func ExampleRead_readingOneMetric() {
    	// Name of the metric we want to read.
    	const myMetric = "/memory/classes/heap/free:bytes"
    
    	// Create a sample for the metric.
    	sample := make([]metrics.Sample, 1)
    	sample[0].Name = myMetric
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 08 16:09:01 UTC 2021
    - 2.6K bytes
    - Viewed (0)
Back to top