Closed
Bug 1458204
Opened 7 years ago
Closed 7 years ago
telemetry.js: Rename startTimer/stopTimer
Categories
(DevTools :: General, enhancement, P2)
Tracking
(firefox62 fixed)
RESOLVED
FIXED
Firefox 62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: miker, Assigned: miker)
References
Details
Attachments
(1 file, 2 obsolete files)
startTimer: doesn't call anything from telemetry but starts a timer
stopTimer: if a corresponding timer is found, calls either T.getHistogramById().add() or T.getKeyedHistogramById().add()
Replace startTimer/stopTimer by start/finish and startKeyed/finishKeyed. At the same time switch the implementation to call the real TelemetryStopwatch methods.
Assignee | ||
Updated•7 years ago
|
Has Regression Range: --- → irrelevant
Has STR: --- → irrelevant
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•7 years ago
|
||
Assignee | ||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 3•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Attachment #8973188 -
Attachment is obsolete: true
Assignee | ||
Comment 4•7 years ago
|
||
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8973231 -
Attachment is obsolete: true
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8974319 [details]
Bug 1458204 - telemetry.js: Rename startTimer/stopTimer
https://reviewboard.mozilla.org/r/242642/#review248974
Thanks for the patch Mike, and thanks for adding a detailed JSdoc for the new wrappers! One small issue + one nit.
::: devtools/client/performance/performance-controller.js:179
(Diff revision 3)
> DetailsView.off(EVENTS.UI_DETAILS_VIEW_SELECTED, this._onDetailsViewSelected);
>
> this._prefObserver.off("devtools.theme", this._onThemeChanged);
> this._prefObserver.destroy();
> +
> + this._telemetry.destroy();
We should probably remove this now that destroy was removed from telemetry.js
::: devtools/client/shared/telemetry.js:332
(Diff revision 3)
> + *
> + * @returns {Boolean}
> + * True if the timer was succesfully stopped and the data was added
> + * to the histogram, False otherwise.
> */
> - startTimer(histogramId) {
> + finishKeyed(histogramId, key, obj, cancelledOkay) {
The jsDoc uses canceled with a single l, so does the other finish() method. We should probably use canceledOkay here as well for consistency
Attachment #8974319 -
Flags: review?(jdescottes) → review+
Assignee | ||
Comment 9•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8974319 [details]
Bug 1458204 - telemetry.js: Rename startTimer/stopTimer
https://reviewboard.mozilla.org/r/242642/#review248974
> We should probably remove this now that destroy was removed from telemetry.js
You would think so but performance tools use a wrapper called `PerformanceTelemetry` around our telemetry wrapper. In this case `this._telemetry.destroy()` is calling `PerformanceTelemetry.destroy`, not `Telemetry.destroy` so we need to keep it.
> The jsDoc uses canceled with a single l, so does the other finish() method. We should probably use canceledOkay here as well for consistency
Done
Comment hidden (mozreview-request) |
Comment 11•7 years ago
|
||
Pushed by mratcliffe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eaf43c0e3a71
telemetry.js: Rename startTimer/stopTimer r=jdescottes
Comment 12•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
Updated•6 years ago
|
Updated•6 years ago
|
Product: Firefox → DevTools
Comment 13•6 years ago
|
||
I think, since this change, all DEVTOOLS_*_TIME_ACTIVE_SECONDS probes have been reporting active time in milliseconds, not seconds, since TelemetryStopwatch seems to count in ms.
You need to log in
before you can comment on or make changes to this bug.
Description
•