tidb: github.com/pingcap/tidb/util/profile Index | Files

package profile

import "github.com/pingcap/tidb/util/profile"


Package Files

flamegraph.go profile.go trackerRecorder.go


var CPUProfileInterval = 30 * time.Second

CPUProfileInterval represents the duration of sampling CPU

func HeapProfileForGlobalMemTracker Uses

func HeapProfileForGlobalMemTracker(d time.Duration)

HeapProfileForGlobalMemTracker record heap profile data into each global function memory tracker

type Collector Uses

type Collector struct{}

Collector is used to collect the profile results

func (*Collector) ParseGoroutines Uses

func (c *Collector) ParseGoroutines(reader io.Reader) ([][]types.Datum, error)

ParseGoroutines returns the groutine list for given string representation

func (*Collector) ProfileGraph Uses

func (c *Collector) ProfileGraph(name string) ([][]types.Datum, error)

ProfileGraph returns the CPU/memory/mutex/allocs/block profile flamegraph which is organized by tree form

func (*Collector) ProfileReaderToDatums Uses

func (c *Collector) ProfileReaderToDatums(f io.Reader) ([][]types.Datum, error)

ProfileReaderToDatums reads data from reader and returns the flamegraph which is organized by tree form.

Package profile imports 17 packages (graph) and is imported by 3 packages. Updated 2020-06-01. Refresh now. Tools for package owners.