Closed Bug 818549 Opened 10 years ago Closed 10 years ago

Replace test-gather-startup with a function

Categories

(Toolkit :: Telemetry, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: espindola, Assigned: espindola)

Details

Attachments

(1 file, 1 obsolete file)

Comment on attachment 688837 [details] [diff] [review]
Old one was missing a 'this'

>diff --git a/toolkit/components/telemetry/TelemetryPing.js b/toolkit/components/telemetry/TelemetryPing.js
>index 444fc26..bc5755e 100644
>--- a/toolkit/components/telemetry/TelemetryPing.js
>+++ b/toolkit/components/telemetry/TelemetryPing.js
>@@ -953,6 +953,15 @@ TelemetryPing.prototype = {
>     this._addons = aAddOns;
>   },
> 
>+  gatherStartup: function gatherStartup() {
>+    var counters = processInfo.getCounters();

Use "let" instead of "var"
Attachment #688837 - Flags: review? → review+
Nit: Also, maybe change function name back to "gatherStartupInformation".. It's a bit more descriptive
(In reply to Vladan Djeric (:vladan) from comment #3)
> Nit: Also, maybe change function name back to "gatherStartupInformation"..
> It's a bit more descriptive

https://hg.mozilla.org/integration/mozilla-inbound/rev/390569a008e5

There was already a function called gatherStartupInformation. I can rename gatherStartupInformation and/or gatherStartup in a followup patch if you want.
(In reply to Rafael Ávila de Espíndola (:espindola) from comment #4)
> There was already a function called gatherStartupInformation. I can rename
> gatherStartupInformation and/or gatherStartup in a followup patch if you
> want.

Let's change the existing "gatherStartupInformation" to "gatherStartupHistograms" and then move the "this._slowSQLStartup" line out of "gatherStartupHistograms" and have its callers do that.

It also looks like we might have a bug in the getPayload() method.. it never calls getCounters() !
https://hg.mozilla.org/mozilla-central/rev/390569a008e5
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.