capture

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2017 License: Apache-2.0 Imports: 21 Imported by: 75

Documentation

Overview

Package capture contains all the core GAPIS functionality for dealing with loaded captures.

Index

Constants

View Source
const (
	// CurrentCaptureVersion is incremented on breaking changes to the capture format.
	// NB: Also update equally named field in spy.cpp
	CurrentCaptureVersion int32 = 0
)

Variables

This section is empty.

Functions

func Captures

func Captures() []*path.Capture

Captures returns all the captures stored by the database by identifier.

func Export

func Export(ctx context.Context, p *path.Capture, w io.Writer) error

Export encodes the given capture and associated resources and writes it to the supplied io.Writer in the pack file format, producing output suitable for use with Import or opening in the trace editor.

func Get

func Get(ctx context.Context) *path.Capture

Get retrieves the capture path from a context previously annotated by Put.

func Import

func Import(ctx context.Context, name string, data []byte) (*path.Capture, error)

Import imports the capture by name and data, and stores it in the database.

func New

func New(ctx context.Context, name string, header *Header, cmds []api.Cmd) (*path.Capture, error)

New returns a path to a new capture with the given name, header and commands. The new capture is stored in the database.

func NewState

func NewState(ctx context.Context) (*api.GlobalState, error)

NewState returns a new, default-initialized State object built for the capture held by the context.

func Put

Put attaches a capture path to a Context.

Types

type Capture

type Capture struct {
	Name     string
	Header   *Header
	Commands []api.Cmd
	APIs     []api.API
	Observed interval.U64RangeList
}

func Resolve

func Resolve(ctx context.Context) (*Capture, error)

Resolve resolves the capture from a context previously annotated by Put.

func ResolveFromID

func ResolveFromID(ctx context.Context, id id.ID) (*Capture, error)

ResolveFromID resolves a single capture with the ID id.

func ResolveFromPath

func ResolveFromPath(ctx context.Context, p *path.Capture) (*Capture, error)

ResolveFromPath resolves a single capture with the path p.

func (*Capture) Export

func (c *Capture) Export(ctx context.Context, w io.Writer) error

Export encodes the given capture and associated resources and writes it to the supplied io.Writer in the .gfxtrace format.

func (*Capture) NewState

func (c *Capture) NewState() *api.GlobalState

NewState returns a new, default-initialized State object built for the capture.

func (*Capture) Service

func (c *Capture) Service(ctx context.Context, p *path.Capture) *service.Capture

Service returns the service.Capture description for this capture.

type ErrUnsupportedVersion added in v0.9.0

type ErrUnsupportedVersion struct{ Version int32 }

func (ErrUnsupportedVersion) Error added in v0.9.0

func (e ErrUnsupportedVersion) Error() string

Jump to

Keyboard shortcuts

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