perfetto icon indicating copy to clipboard operation
perfetto copied to clipboard

feature: absolute timestamps

Open osievert-gpfw opened this issue 3 years ago • 2 comments

When I am using perfetto, I often want to know the absolute time an event happens (time t=0 being when the trace started). In the old chrome tracing tool, timestamps were "absolute" in this way. In perfetto, there are two timestamp axes shown, but even though there are twice as many time axes as in the old chrome tracking tool, neither meets this need. The top timestamp axis is absolute time, but refers only to the overall timeline and not to any of the tracing events. The bottom timestamp axis refers to the tracing events, but is relative time and not absolute time (relative to the absolute time displayed on the left-hand side of this time axis).

Because the absolute time of the left-hand edge of the tracing events is displayed, I CAN know the absolute time of any particular tracing event, but I have to do some mental math. Possible, of course, but I find myself doing approximate math in perfetto, mentally rounding the absolute time to the nearest microsecond and then rounding the delta, then adding them and mentally rounding again. I end up with less precise times, and even if that only takes 5% mental CPU that is 5% less focus I have to understand the traces.

So the ask in this feature request is to allow toggling the tracing event time axis between the old chrome-style absolute times, and the new perfetto relative times. There are several ways to do this, for example with a setting, or by toggling when you click on the time axis, or with a toggle icon on the left edge of the axis. I have no strong opinion on the mechanism.

osievert-gpfw avatar Jan 21 '23 23:01 osievert-gpfw

Thanks for filing.

We have faced the same problem and are currently designing/working on a UI switch which will allow changing timestamps between:

  • Relative from start of trace
  • Absolute trace time
  • Wall clock time

Also, the switch will allow changing between seconds/nanoseconds.

octaviantu avatar Jan 23 '23 15:01 octaviantu

Duping against https://github.com/google/perfetto/issues/272

LalitMaganti avatar Feb 26 '23 18:02 LalitMaganti