summaryrefslogtreecommitdiffstats
path: root/trace-event.sample2.json
blob: 2a501930c29001dc5a8393adb414f6b417916919 (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
[
    {"name":"comment", "comment":"Let's give some pids and tids names"},

    {"name":"process_name", "ph":"M", "args":{"name":"Hey"},"pid":1000, "tid":1},
    {"name":"thread_name",  "ph":"M", "args":{"name":"Foo"},"pid":1000, "tid":1},
    {"name":"thread_name",  "ph":"M", "args":{"name":"Bar"},"pid":1000, "tid":2},
    {"name":"process_name", "ph":"M", "args":{"name":"Zap"},"pid":1001, "tid":1},
    {"name":"thread_name",  "ph":"M", "args":{"name":"Mbl"},"pid":1001, "tid":1},

    {"comment":"  Two pairs of async b(egin) and e(nd) events, nested (with the same id). Don't show up at all in Chrome!?"},

    {"name":"async1",  "ph":"b", "id":1, "ts":1623142954400200, "pid":1001, "tid":1},
    {"name":"async12", "ph":"b", "id":1, "ts":1623142954400250, "pid":1001, "tid":1},
    {"name":"async12", "ph":"e", "id":1, "ts":1623142954400350, "pid":1001, "tid":1},
    {"name":"async1",  "ph":"e", "id":1, "ts":1623142954400700, "pid":1001, "tid":1},

    {"comment":"  A single pair of async b and e events. These doesn't show up in Chrome either, sigh."},

    {"name":"async2", "ph":"b", "id":2, "ts":1623142954401000, "pid":1001, "tid":1},
    {"name":"async2", "ph":"e", "id":2, "ts":1623142954401200, "pid":1001, "tid":1},

    {"comment":"  Two pairs of async S(tart) and F(inish) events, nested.  "},
    {"comment":"  These are said to be deprecated but do show up in Chrome. Yay for documentation and implementation being in sync.  "},

    {"name":"async3",  "ph":"S", "id":3, "ts":1623142954401200, "pid":1001, "tid":1},
    {"name":"async32", "ph":"S", "id":3, "ts":1623142954401250, "pid":1001, "tid":1},
    {"name":"async32", "ph":"F", "id":3, "ts":1623142954401350, "pid":1001, "tid":1},
    {"name":"async3",  "ph":"F", "id":3, "ts":1623142954401700, "pid":1001, "tid":1},

    {"comment":"  Two pairs of async S(tart) and F(inish) events, nested (without any id).  "},
    {"comment":"  Not displayed by Chrome. Is the 'id' required?  "},

    {"name":"async4",  "ph":"S",         "ts":1623142954401800, "pid":1001, "tid":1},
    {"name":"async42", "ph":"S",         "ts":1623142954401850, "pid":1001, "tid":1},
    {"name":"async42", "ph":"F",         "ts":1623142954402150, "pid":1001, "tid":1},
    {"name":"async4",  "ph":"F",         "ts":1623142954402200, "pid":1001, "tid":1},

    {"comment":"  Two pairs of async S(tart) and F(inish) events, overlapping, with an id.  "},

    {"name":"async5",  "ph":"S", "id":5, "ts":1623142954401900, "pid":1001, "tid":1},
    {"name":"async6",  "ph":"S", "id":6, "ts":1623142954401950, "pid":1001, "tid":1},
    {"name":"async5",  "ph":"F", "id":5, "ts":1623142954402050, "pid":1001, "tid":1},
    {"name":"async6",  "ph":"F", "id":6, "ts":1623142954402100, "pid":1001, "tid":1},

    {"comment":"  Events with same names at a later time, not overlapping.  "},

    {"name":"async5",  "ph":"S", "id":5, "ts":1623142954402900, "pid":1001, "tid":1},
    {"name":"async6",  "ph":"S", "id":6, "ts":1623142954402950, "pid":1001, "tid":1},
    {"name":"async5",  "ph":"F", "id":5, "ts":1623142954403050, "pid":1001, "tid":1},
    {"name":"async6",  "ph":"F", "id":6, "ts":1623142954403100, "pid":1001, "tid":1},

    {"comment":"  Some complete events. If complete events for the same thread are not nested properly  "},
    {"comment":"  (as the first two aren't, they overlap) Chrome mashes them together on the same line.  "},

    {"name":"complete1","ph":"X",        "ts":1623142954400220,"pid":1001,"tid":1,"dur":500},
    {"name":"complete2","ph":"X",        "ts":1623142954400300,"pid":1001,"tid":1,"dur":500},
    {"name":"complete3","ph":"X",        "ts":1623142954400305,"pid":1001,"tid":2,"dur":500},
    {"name":"complete4","ph":"X",        "ts":1623142954400900,"pid":1001,"tid":2,"dur":200}
]