Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ModulePath ¶
func ModulePath() string
ModulePath returns the path of the module this pkg belongs to.
func NewFileWriter ¶
func NewFileWriter(name string) io.WriteCloser
NewFileWriter returns a io.WriteCloser.
func WriteNopCloser ¶
func WriteNopCloser(w io.Writer) io.WriteCloser
WriteNopCloser returns an io.WriteCloser that writes to w and does nothing when Close() is called. Go's stdlib unfortunately only provides io.NopCloser for io.Reader, see: https://github.com/golang/go/issues/22823
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder implements a small subset of the "Trace Event Format" spec needed to make fgtrace output data that can be displayed by perfetto.dev. https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview
func (*Encoder) CustomMeta ¶
type Event ¶
type Event struct {
Name string `json:"name,omitempty"`
Ph string `json:"ph,omitempty"`
// Ts is the tracing clock timestamp of the event. The timestamps are
// provided at microsecond granularity.
Ts float64 `json:"ts"`
Pid int64 `json:"pid,omitempty"`
Tid int64 `json:"tid,omitempty"`
Args map[string]interface{} `json:"args,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.