forked from sarchlab/akita
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask.go
27 lines (23 loc) · 842 Bytes
/
task.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
package tracing
import "github.com/sarchlab/akita/v3/sim"
// A TaskStep represents a milestone in the processing of task
type TaskStep struct {
Time sim.VTimeInSec `json:"time"`
What string `json:"what"`
}
// A Task is a task
type Task struct {
ID string `json:"id"`
ParentID string `json:"parent_id"`
Kind string `json:"kind"`
What string `json:"what"`
Where string `json:"where"`
StartTime sim.VTimeInSec `json:"start_time"`
EndTime sim.VTimeInSec `json:"end_time"`
Steps []TaskStep `json:"steps"`
Detail interface{} `json:"-"`
ParentTask *Task `json:"-"`
}
// TaskFilter is a function that can filter interesting tasks. If this function
// returns true, the task is considered useful.
type TaskFilter func(t Task) bool