countertest

Imports

Imports #

"sync"
"golang.org/x/telemetry/counter"
ic "golang.org/x/telemetry/internal/counter"
"golang.org/x/telemetry/internal/telemetry"
"testing"

Constants & Variables

SupportedPlatform const #

SupportedPlatform reports if this platform supports Open()

const SupportedPlatform = *ast.UnaryExpr

opened var #

var opened bool

openedMu var #

var openedMu sync.Mutex

Functions

Open function #

Open enables telemetry data writing to disk. This is supposed to be called once during the program execution (i.e. typically in TestMain), and must not be used with golang.org/x/telemetry/counter.Open.

func Open(telemetryDir string)

ReadCounter function #

ReadCounter reads the given counter.

func ReadCounter(c *counter.Counter) (count uint64, _ error)

ReadFile function #

ReadFile reads the counters and stack counters from the given file.

func ReadFile(name string) (counters map[string]uint64, stackCounters map[string]uint64, _ error)

ReadStackCounter function #

ReadStackCounter reads the given StackCounter.

func ReadStackCounter(c *counter.StackCounter) (stackCounts map[string]uint64, _ error)

init function #

func init()

isOpen function #

func isOpen() bool

Generated with Arrow