v.io: v.io/v23/services/pprof Index | Files

package pprof

import "v.io/v23/services/pprof"

Package pprof defines an interface for accessing runtime profiling data in the format expected by the pprof visualization tool. For more information about pprof, see http://code.google.com/p/google-perftools/. nolint:golint

Index

Package Files

pprof.vdl.go

Variables

var PProfDesc rpc.InterfaceDesc = descPProf

PProfDesc describes the PProf interface.

type PProfClientMethods Uses

type PProfClientMethods interface {
    // CmdLine returns the command-line arguments of the server, including
    // the name of the executable.
    CmdLine(*context.T, ...rpc.CallOpt) ([]string, error)
    // Profiles returns the list of available profiles.
    Profiles(*context.T, ...rpc.CallOpt) ([]string, error)
    // Profile streams the requested profile. The debug parameter enables
    // additional output. Passing debug=0 includes only the hexadecimal
    // addresses that pprof needs. Passing debug=1 adds comments translating
    // addresses to function names and line numbers, so that a programmer
    // can read the profile without tools.
    Profile(_ *context.T, name string, debug int32, _ ...rpc.CallOpt) (PProfProfileClientCall, error)
    // CpuProfile enables CPU profiling for the requested duration and
    // streams the profile data.
    CpuProfile(_ *context.T, seconds int32, _ ...rpc.CallOpt) (PProfCpuProfileClientCall, error)
    // Symbol looks up the program counters and returns their respective
    // function names.
    Symbol(_ *context.T, programCounters []uint64, _ ...rpc.CallOpt) ([]string, error)
}

PProfClientMethods is the client interface containing PProf methods.

type PProfClientStub Uses

type PProfClientStub interface {
    PProfClientMethods
}

PProfClientStub embeds PProfClientMethods and is a placeholder for additional management operations.

func PProfClient Uses

func PProfClient(name string) PProfClientStub

PProfClient returns a client stub for PProf.

type PProfCpuProfileClientCall Uses

type PProfCpuProfileClientCall interface {
    PProfCpuProfileClientStream
    // Finish blocks until the server is done, and returns the positional return
    // values for call.
    //
    // Finish returns immediately if the call has been canceled; depending on the
    // timing the output could either be an error signaling cancelation, or the
    // valid positional return values from the server.
    //
    // Calling Finish is mandatory for releasing stream resources, unless the call
    // has been canceled or any of the other methods return an error.  Finish should
    // be called at most once.
    Finish() error
}

PProfCpuProfileClientCall represents the call returned from PProf.CpuProfile.

type PProfCpuProfileClientStream Uses

type PProfCpuProfileClientStream interface {
    // RecvStream returns the receiver side of the PProf.CpuProfile client stream.
    RecvStream() interface {
        // Advance stages an item so that it may be retrieved via Value.  Returns
        // true iff there is an item to retrieve.  Advance must be called before
        // Value is called.  May block if an item is not available.
        Advance() bool
        // Value returns the item that was staged by Advance.  May panic if Advance
        // returned false or was not called.  Never blocks.
        Value() []byte
        // Err returns any error encountered by Advance.  Never blocks.
        Err() error
    }
}

PProfCpuProfileClientStream is the client stream for PProf.CpuProfile.

type PProfCpuProfileServerCall Uses

type PProfCpuProfileServerCall interface {
    rpc.ServerCall
    PProfCpuProfileServerStream
}

PProfCpuProfileServerCall represents the context passed to PProf.CpuProfile.

type PProfCpuProfileServerCallStub Uses

type PProfCpuProfileServerCallStub struct {
    rpc.StreamServerCall
}

PProfCpuProfileServerCallStub is a wrapper that converts rpc.StreamServerCall into a typesafe stub that implements PProfCpuProfileServerCall.

func (*PProfCpuProfileServerCallStub) Init Uses

func (s *PProfCpuProfileServerCallStub) Init(call rpc.StreamServerCall)

Init initializes PProfCpuProfileServerCallStub from rpc.StreamServerCall.

func (*PProfCpuProfileServerCallStub) SendStream Uses

func (s *PProfCpuProfileServerCallStub) SendStream() interface {
    Send(item []byte) error
}

SendStream returns the send side of the PProf.CpuProfile server stream.

type PProfCpuProfileServerStream Uses

type PProfCpuProfileServerStream interface {
    // SendStream returns the send side of the PProf.CpuProfile server stream.
    SendStream() interface {
        // Send places the item onto the output stream.  Returns errors encountered
        // while sending.  Blocks if there is no buffer space; will unblock when
        // buffer space is available.
        Send(item []byte) error
    }
}

PProfCpuProfileServerStream is the server stream for PProf.CpuProfile.

type PProfProfileClientCall Uses

type PProfProfileClientCall interface {
    PProfProfileClientStream
    // Finish blocks until the server is done, and returns the positional return
    // values for call.
    //
    // Finish returns immediately if the call has been canceled; depending on the
    // timing the output could either be an error signaling cancelation, or the
    // valid positional return values from the server.
    //
    // Calling Finish is mandatory for releasing stream resources, unless the call
    // has been canceled or any of the other methods return an error.  Finish should
    // be called at most once.
    Finish() error
}

PProfProfileClientCall represents the call returned from PProf.Profile.

type PProfProfileClientStream Uses

type PProfProfileClientStream interface {
    // RecvStream returns the receiver side of the PProf.Profile client stream.
    RecvStream() interface {
        // Advance stages an item so that it may be retrieved via Value.  Returns
        // true iff there is an item to retrieve.  Advance must be called before
        // Value is called.  May block if an item is not available.
        Advance() bool
        // Value returns the item that was staged by Advance.  May panic if Advance
        // returned false or was not called.  Never blocks.
        Value() []byte
        // Err returns any error encountered by Advance.  Never blocks.
        Err() error
    }
}

PProfProfileClientStream is the client stream for PProf.Profile.

type PProfProfileServerCall Uses

type PProfProfileServerCall interface {
    rpc.ServerCall
    PProfProfileServerStream
}

PProfProfileServerCall represents the context passed to PProf.Profile.

type PProfProfileServerCallStub Uses

type PProfProfileServerCallStub struct {
    rpc.StreamServerCall
}

PProfProfileServerCallStub is a wrapper that converts rpc.StreamServerCall into a typesafe stub that implements PProfProfileServerCall.

func (*PProfProfileServerCallStub) Init Uses

func (s *PProfProfileServerCallStub) Init(call rpc.StreamServerCall)

Init initializes PProfProfileServerCallStub from rpc.StreamServerCall.

func (*PProfProfileServerCallStub) SendStream Uses

func (s *PProfProfileServerCallStub) SendStream() interface {
    Send(item []byte) error
}

SendStream returns the send side of the PProf.Profile server stream.

type PProfProfileServerStream Uses

type PProfProfileServerStream interface {
    // SendStream returns the send side of the PProf.Profile server stream.
    SendStream() interface {
        // Send places the item onto the output stream.  Returns errors encountered
        // while sending.  Blocks if there is no buffer space; will unblock when
        // buffer space is available.
        Send(item []byte) error
    }
}

PProfProfileServerStream is the server stream for PProf.Profile.

type PProfServerMethods Uses

type PProfServerMethods interface {
    // CmdLine returns the command-line arguments of the server, including
    // the name of the executable.
    CmdLine(*context.T, rpc.ServerCall) ([]string, error)
    // Profiles returns the list of available profiles.
    Profiles(*context.T, rpc.ServerCall) ([]string, error)
    // Profile streams the requested profile. The debug parameter enables
    // additional output. Passing debug=0 includes only the hexadecimal
    // addresses that pprof needs. Passing debug=1 adds comments translating
    // addresses to function names and line numbers, so that a programmer
    // can read the profile without tools.
    Profile(_ *context.T, _ PProfProfileServerCall, name string, debug int32) error
    // CpuProfile enables CPU profiling for the requested duration and
    // streams the profile data.
    CpuProfile(_ *context.T, _ PProfCpuProfileServerCall, seconds int32) error
    // Symbol looks up the program counters and returns their respective
    // function names.
    Symbol(_ *context.T, _ rpc.ServerCall, programCounters []uint64) ([]string, error)
}

PProfServerMethods is the interface a server writer implements for PProf.

type PProfServerStub Uses

type PProfServerStub interface {
    PProfServerStubMethods
    // DescribeInterfaces the PProf interfaces.
    Describe__() []rpc.InterfaceDesc
}

PProfServerStub adds universal methods to PProfServerStubMethods.

func PProfServer Uses

func PProfServer(impl PProfServerMethods) PProfServerStub

PProfServer returns a server stub for PProf. It converts an implementation of PProfServerMethods into an object that may be used by rpc.Server.

type PProfServerStubMethods Uses

type PProfServerStubMethods interface {
    // CmdLine returns the command-line arguments of the server, including
    // the name of the executable.
    CmdLine(*context.T, rpc.ServerCall) ([]string, error)
    // Profiles returns the list of available profiles.
    Profiles(*context.T, rpc.ServerCall) ([]string, error)
    // Profile streams the requested profile. The debug parameter enables
    // additional output. Passing debug=0 includes only the hexadecimal
    // addresses that pprof needs. Passing debug=1 adds comments translating
    // addresses to function names and line numbers, so that a programmer
    // can read the profile without tools.
    Profile(_ *context.T, _ *PProfProfileServerCallStub, name string, debug int32) error
    // CpuProfile enables CPU profiling for the requested duration and
    // streams the profile data.
    CpuProfile(_ *context.T, _ *PProfCpuProfileServerCallStub, seconds int32) error
    // Symbol looks up the program counters and returns their respective
    // function names.
    Symbol(_ *context.T, _ rpc.ServerCall, programCounters []uint64) ([]string, error)
}

PProfServerStubMethods is the server interface containing PProf methods, as expected by rpc.Server. The only difference between this interface and PProfServerMethods is the streaming methods.

Package pprof imports 6 packages (graph) and is imported by 8 packages. Updated 2020-10-13. Refresh now. Tools for package owners.