Version: v0.0.0-...-6719cd2 Latest Latest

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

Go to latest
Published: Jul 18, 2019 License: Apache-2.0 Imports: 5 Imported by: 0



Package profiling assists in gathering CPU profiles.



This section is empty.


This section is empty.


func CPUProfileForDuration

func CPUProfileForDuration(outputFilename string, duration time.Duration) error

CPUProfileForDuration will start generating a CPU profile (via pprof) to the supplied file. The profiling will run for the supplied duration and then stop. Only one profile can be running at a time, if you attempt to start a profile while profiling is already running, an error will be returned.

func StartupProfile

func StartupProfile(filename string, view View)

StartupProfile will create a CPU profile to the supplied name, it'll run until the Views LastApplied() results is >= an initial LastLogIndex result. You can use this to easily profile the startup/catchup phase of a view


type View

type View interface {
	LastLogIndex() (uint64, error)
	LastApplied() uint64

View defines an abstract way for the StartupProfile function to see where in the log the current processed point is.

Jump to

Keyboard shortcuts

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