(name, start, end, tid = 1)
| 11 | |
| 12 | // Trace timestamps are microseconds; these helpers take milliseconds. |
| 13 | const slice = (name, start, end, tid = 1) => ({ |
| 14 | name, |
| 15 | ph: 'X', |
| 16 | pid: 1, |
| 17 | tid, |
| 18 | ts: start * 1000, |
| 19 | dur: (end - start) * 1000 |
| 20 | }); |
| 21 | const window = (start, end) => [ |
| 22 | {name: 'bench:window', ph: 'b', pid: 1, tid: 1, id2: {local: '0x1'}, ts: start * 1000}, |
| 23 | {name: 'bench:window', ph: 'e', pid: 1, tid: 1, id2: {local: '0x1'}, ts: end * 1000} |