ui.perfetto.dev sql 查询某个事件范围内,某个事件的耗时并降序排列
- 1.打开https://ui.perfetto.dev 导入Chrome Trace Json文件
- 2.ParallelMLP.forward下的RowParallelLinear.forward
- 3.点击Query(SQL),在输入框中输入以下内容,按Ctrl+Enter,显示查询结果
- 4.点击Show timeline,点击Standalone Query Tab中相应的行,Timeline会跳到相应的位置
想查询ParallelMLP.forward中RowParallelLinear.forward的耗时,降序排列。查看耗时最多的事件并分析原因
1.打开https://ui.perfetto.dev 导入Chrome Trace Json文件
2.ParallelMLP.forward下的RowParallelLinear.forward
3.点击Query(SQL),在输入框中输入以下内容,按Ctrl+Enter,显示查询结果
WITH transformers AS (
SELECT
ts AS start_ts,
ts + dur AS end_ts
FROM slice
WHERE name = 'ParallelMLP.forward'
)
SELECT
s.*
FROM slice s
JOIN transformers t
ON s.ts >= t.start_ts AND (s.ts + s.dur) <= t.end_ts
WHERE s.name = 'RowParallelLinear.forward' ORDER BY s.dur DESC;