Documentation ¶
Index ¶
- Variables
- func ConvertFile(path string) ([]byte, error)
- func Marshal(trace model.Trace) ([]byte, error)
- func NewTree(tr Trace) augmentedtree.Tree
- type EventFrame
- type Trace
- func (x Trace) AddDurationOffset(td time.Duration) Trace
- func (x Trace) AddTimestampOffset(ts int64) Trace
- func (x Trace) Adjust() (Trace, error)
- func (tr *Trace) Combine(other Trace)
- func (x Trace) DeleteIgnoredEvents() (Trace, error)
- func (x Trace) HashID() int64
- func (t Trace) Len() int
- func (t Trace) Less(i, j int) bool
- func (x Trace) MaxEvent() TraceEvent
- func (x Trace) MinEvent() TraceEvent
- func (t Trace) Swap(i, j int)
- func (x Trace) ZeroOut() Trace
- type TraceEvent
- type TraceEvents
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultDisplayTimeUnit = "ms"
)
Functions ¶
func ConvertFile ¶
func NewTree ¶
func NewTree(tr Trace) augmentedtree.Tree
Types ¶
type EventFrame ¶
type Trace ¶
type Trace struct { ID string `json:"id,omitempty"` StartTime time.Time `json:"start_time,omitempty"` EndTime time.Time `json:"end_time,omitempty"` TraceEvents TraceEvents `json:"traceEvents,omitempty"` DisplayTimeUnit string `json:"displayTimeUnit,omitempty"` Frames map[string]EventFrame `json:"stackFrames"` TimeUnit string `json:"timeUnit,omitempty"` }
func (Trace) AddTimestampOffset ¶
func (Trace) DeleteIgnoredEvents ¶
func (Trace) MaxEvent ¶
func (x Trace) MaxEvent() TraceEvent
func (Trace) MinEvent ¶
func (x Trace) MinEvent() TraceEvent
type TraceEvent ¶
type TraceEvent struct { Name string `json:"name,omitempty"` EventType string `json:"ph"` Scope string `json:"s,omitempty"` Timestamp float64 `json:"ts"` Duration float64 `json:"dur,omitempty"` ProcessID uint64 `json:"pid"` ThreadID uint64 `json:"tid"` SpanID uint64 `json:"id,omitempty"` Stack int `json:"sf,omitempty"` EndStack int `json:"esf,omitempty"` Arg map[string]interface{} `json:"args,omitempty"` ColorName string `json:"cname,omitempty"` Category string `json:"cat,omitempty"` Start int64 `json:"start,omitempty"` End int64 `json:"end,omitempty"` InitTime time.Time `json:"init_time_t,omitempty"` StartTime time.Time `json:"start_time_t,omitempty"` EndTime time.Time `json:"end_time_t,omitempty"` Time time.Time `json:"time_t,omitempty"` TimeUnit time.Duration `json:"timeUnit,omitempty"` }
Trace is an entry of trace format. https://github.com/catapult-project/catapult/tree/master/tracing
func (TraceEvent) HighAtDimension ¶
func (x TraceEvent) HighAtDimension(d uint64) int64
HighAtDimension returns an integer representing the higher bound at the requested dimension.
func (TraceEvent) ID ¶
func (x TraceEvent) ID() uint64
ID should be a unique ID representing this interval. This is used to identify which interval to delete from the tree if there are duplicates.
func (TraceEvent) LowAtDimension ¶
func (x TraceEvent) LowAtDimension(d uint64) int64
LowAtDimension returns an integer representing the lower bound at the requested dimension.
func (TraceEvent) OverlapsAtDimension ¶
func (mi TraceEvent) OverlapsAtDimension(iv augmentedtree.Interval, dimension uint64) bool
OverlapsAtDimension should return a bool indicating if the provided interval overlaps this interval at the dimension requested.
type TraceEvents ¶
type TraceEvents []TraceEvent
func (TraceEvents) Len ¶
func (t TraceEvents) Len() int
func (TraceEvents) Less ¶
func (t TraceEvents) Less(i, j int) bool
func (TraceEvents) Swap ¶
func (t TraceEvents) Swap(i, j int)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.