...
1
2
3
4
5
6
7
8
9
10
11
12
13 package format
14
15 type Data struct {
16 Events []*Event `json:"traceEvents"`
17 Frames map[string]Frame `json:"stackFrames"`
18 TimeUnit string `json:"displayTimeUnit"`
19 }
20
21 type Event struct {
22 Name string `json:"name,omitempty"`
23 Phase string `json:"ph"`
24 Scope string `json:"s,omitempty"`
25 Time float64 `json:"ts"`
26 Dur float64 `json:"dur,omitempty"`
27 PID uint64 `json:"pid"`
28 TID uint64 `json:"tid"`
29 ID uint64 `json:"id,omitempty"`
30 BindPoint string `json:"bp,omitempty"`
31 Stack int `json:"sf,omitempty"`
32 EndStack int `json:"esf,omitempty"`
33 Arg any `json:"args,omitempty"`
34 Cname string `json:"cname,omitempty"`
35 Category string `json:"cat,omitempty"`
36 }
37
38 type Frame struct {
39 Name string `json:"name"`
40 Parent int `json:"parent,omitempty"`
41 }
42
43 type NameArg struct {
44 Name string `json:"name"`
45 }
46
47 type BlockedArg struct {
48 Blocked string `json:"blocked"`
49 }
50
51 type SortIndexArg struct {
52 Index int `json:"sort_index"`
53 }
54
55 type HeapCountersArg struct {
56 Allocated uint64
57 NextGC uint64
58 }
59
60 const (
61 ProcsSection = 0
62 StatsSection = 1
63 TasksSection = 2
64 )
65
66 type GoroutineCountersArg struct {
67 Running uint64
68 Runnable uint64
69 GCWaiting uint64
70 }
71
72 type ThreadCountersArg struct {
73 Running int64
74 InSyscall int64
75 }
76
77 type ThreadIDArg struct {
78 ThreadID uint64
79 }
80
View as plain text