Closed dionysus1016 closed 7 months ago
If you click on a slice in the UI you will see "Duration" with breakdown into "Running", "Runnable" or "Sleeping". Yesterday we also introduced table thread_slice_cpu_time
with duration of CPU time for a slice. It will be able to be included using INCLUDE PERFETTO MODULE slices.cpu_time
, but is not yet available on autopush.
@aMayzner, Thanks for your reply, Is it possible to know the system time when schedule event happens? E.g time in UTC, I checked metric and stats in perfecto UI, it seems beginning time is not recorded, otherwise I can calculate slice begin time by adding an offset on recording begin time.
You might want to query the sched
table (https://perfetto.dev/docs/analysis/sql-tables#sched_slice) directly to find all scheduling events.
You can also query trace beginning time by TRACE_START()
.
If you are looking for the "realtime" (i.e. wall time or UTC time) of a scheduling event, you can use the TO_REALTIME
or ABS_TIME_STR
functions and combine it with querying the sched
table that Anna linked about. Something like:
SELECT ABS_TIME_STR(ts) from sched
or
SELECT TO_REALTIME(ts) from sched
Note that requires the trace to contain clock snapshots containing the mapping from realtime to trace time: this should have been automatically generated at the start of the trace by traced
if you collected the trace using Perfetto.
I have a trace file which contains only scheduling events. How can I check the system time of a slice? for not, it shows tickets offsets