Closed Bug 1172161 Opened 9 years ago Closed 5 years ago

Remove profiler_time in favor of an API that makes it clearer that we're getting the time since process creation

Categories

(Core :: Gecko Profiler, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: shu, Assigned: tromey)

References

Details

Once bug 1159486 lands.
Depends on: 1159486
Assignee: nobody → ttromey
Status: NEW → ASSIGNED
Two notes here.

First, I think it's better not to promise any particular epoch, but just
say that it is stable over the process lifetime and that it is synchronized
with the timeline.

Second, I don't find "profiler_time" so bad.  To me it doesn't carry any
connotations of a particular starting point.

So my inclination would be to just close this bug.

But if you have a name you'd prefer, I will make the change.
"profiler_elapsed_time"?  "profiler_current_time"?


nsIProfiler has this instead, so maybe "elapsed" is preferable?

  /**
   * Returns the elapsed time, in milliseconds, since the profiler's epoch.
   * The epoch is guaranteed to be constant for the duration of the
   * process, but is otherwise arbitrary.
   */
  double getElapsedTime();
Flags: needinfo?(shu)
I agree on not promising a particular epoch. I think there is value in making it explicit that the profiler and the timeline have synced timestamps, i.e., by calling the same functions.

Is that too bothersome a thing? It's not a big deal, just a small nice-to-have IMO. Feel free to WONTFIX this bug otherwise!

As an aside, I named getElapsedTime that way because at the time, it was the elapsed time from the time when the profiler was started. Now it's less clear what "elapsed" refers to.
Flags: needinfo?(shu)

I never got to this, and it's been several years; I think WONTFIX is the way to go.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.