Closed Bug 905759 Opened 12 years ago Closed 12 years ago

move telemetry sending from java into native code

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 26

People

(Reporter: froydnj, Unassigned)

Details

Attachments

(3 files)

We shouldn't need to deal with JSON for this; even though it's a small amount, even this little bit of JSON shows up at 1% or so on traces for startup times. Also reduces the amount of work we have to do in Javascript, which is a win.
Java doesn't have access to histogram IDs, so we need some way of adding samples to histograms by string ID. I hope the comment is sufficient to deter people from using the string Accumulate...
Attachment #790907 - Flags: review?(vdjeric)
This patch encompasses all the Java-side and widget-side machinery for telemetry events. Pretty straightforward.
Attachment #790909 - Flags: review?(blassey.bugs)
We don't need most of this code anymore, so let's delete it. I left the Telemetry object for the sake of not touching lots and lots of the file and that it's a little clearer, IMHO.
Attachment #790910 - Flags: review?(mark.finkle)
Comment on attachment 790909 [details] [diff] [review] part 2 - add Telemetry-specific GeckoEvent and related machinery Review of attachment 790909 [details] [diff] [review]: ----------------------------------------------------------------- yes please, more of this
Attachment #790909 - Flags: review?(blassey.bugs) → review+
Comment on attachment 790907 [details] [diff] [review] part 1 - add Telemetry infrastructure for telemetry gecko events >+ Histogram *h; >+ rv = GetHistogramByEnumId(id, &h); >+ if (NS_SUCCEEDED(rv)) >+ h->Add(sample); Nit: add curlies around the if > /** >+ * Adds a sample to a histogram defined in TelemetryHistograms.h. >+ * You should use the by-enum-id version defined above unless you have >+ * a really good reason to use this one. >+ * >+ * @param name - histogram name >+ * @param sample - value to record >+ */ >+void Accumulate(const char* name, uint32_t sample); Explain why this function even exists, so readers have a better idea of what a really good reason might be
Attachment #790907 - Flags: review?(vdjeric) → review+
Comment on attachment 790910 [details] [diff] [review] part 3 - delete browser.js code for receiving telemetry events from Java Bouncing this to Brian.
Attachment #790910 - Flags: review?(mark.finkle) → review?(bnicholson)
Comment on attachment 790910 [details] [diff] [review] part 3 - delete browser.js code for receiving telemetry events from Java Sorry I missed this review. Looks good to me.
Attachment #790910 - Flags: review?(bnicholson) → review+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: