forked from sarchlab/akita
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtracereader.go
35 lines (26 loc) · 975 Bytes
/
tracereader.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package tracing
// TaskQuery is used to define the tasks to be queried. Not all the field has to
// be set. If the fields are empty, the criteria is ignored.
type TaskQuery struct {
// Use ID to select a single task by its ID.
ID string
// Use ParentID to select all the tasks that are children of a task.
ParentID string
// Use Kind to select all the tasks that are of a kind.
Kind string
// Use Where to select all the tasks that are executed at a location.
Where string
// Enable time range selection.
EnableTimeRange bool
// Use StartTime to select tasks that overlaps with the given task range.
StartTime, EndTime float64
// EnableParentTask will also query the parent task of the selected tasks.
EnableParentTask bool
}
// TraceReader can parse a trace file.
type TraceReader interface {
// ListComponents returns all the locations used in the trace.
ListComponents() []string
// ListTasks queries tasks .
ListTasks(query TaskQuery) []Task
}