MCPcopy Create free account
hub / github.com/adobe/react-spectrum / slice

Function slice

perf/test/trace.test.mjs:13–20  ·  view source on GitHub ↗
(name, start, end, tid = 1)

Source from the content-addressed store, hash-verified

11
12// Trace timestamps are microseconds; these helpers take milliseconds.
13const 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});
21const 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}

Callers 1

trace.test.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected