MCPcopy Create free account
hub / github.com/google/gapid / NewProcessor

Function NewProcessor

gapis/perfetto/processor.go:35–44  ·  view source on GitHub ↗
(ctx context.Context, data []byte)

Source from the content-addressed store, hash-verified

33}
34
35func NewProcessor(ctx context.Context, data []byte) (*Processor, error) {
36 p := C.new_processor()
37 log.D(ctx, "[perfetto] Parsing %d bytes", len(data))
38 if !C.parse_data(p, unsafe.Pointer(&data[0]), C.size_t(len(data))) {
39 log.W(ctx, "[perfetto] Parsing failed")
40 C.delete_processor(p)
41 return nil, log.Errf(ctx, nil, "parsing trace failed")
42 }
43 return &Processor{handle: p}, nil
44}
45
46func (p *Processor) Query(q string) (*service.QueryResult, error) {
47 p.mutex.Lock()

Callers

nothing calls this directly

Calls 4

DMethod · 0.80
ErrfMethod · 0.80
PointerMethod · 0.45
WMethod · 0.45

Tested by

no test coverage detected