How to query actual "Running" duration for specific slices in slices table? #1614
-
|
I had a repeated task which would be executed every 100ms. I use following SQL command to calculate the average duration of this task: But when I look into the detail information of each slice on UI, the duration field sometimes might be sum of 3 values: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You can do this very easily with the standard library of trace processor: https://perfetto.dev/docs/analysis/stdlib-docs#slices-cpu_time. Specifically you want the thread_slice_cpu_time table. If you want the average across slices as in your example, you would do: |
Beta Was this translation helpful? Give feedback.
You can do this very easily with the standard library of trace processor: https://perfetto.dev/docs/analysis/stdlib-docs#slices-cpu_time. Specifically you want the thread_slice_cpu_time table.
If you want the average across slices as in your example, you would do: