执行如下SQL语句,可以查看从trace开始 + 5秒的CPU Time统计,如果想统计更长/更短时间段,可以修改ts+5000000000
select process.name, sum(dur)/1e9 as cpu_sec from sched join thread using(utid) join process using(upid) where ts <= (select ts+5000000000 from sched order by ts limit 1) group by upid order by cpu_sec desc limit 100;
要对比某个进程的CPU Time,建议要将CPU 定频定核进行对比。
示例输出: