Closed Bug 1226196 Opened 9 years ago Closed 9 years ago

Does MEMORY_RESIDENT need to have 200 buckets?

Categories

(Toolkit :: Telemetry, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: chutten, Assigned: ma.steiman, Mentored)

Details

Attachments

(1 file, 1 obsolete file)

By Betteridge's Law of Headlines, the answer is 'No'. 

Unfortunately, we can't just change histograms like this. So we'll need to rename it so that everything thinks it's new.

This is a good second bug.

0) Read https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Adding_a_new_Telemetry_probe 
1) Remove MEMORY_RESIDENT from toolkit/components/telemetry/bucket_whitelist.json - this makes it subject to normal bucket size rules
2) In toolkit/components/telemetry/Histograms.json, rename MEMORY_RESIDENT (to MEMORY_RESIDENT_FAST?), lower its bucket count to 100, remove the "extended_statistics_ok" line, add a "bug_numbers" line with this bug's number.
3) In toolkit/components/telemetry/TelemetrySession.jsm, rename MEMORY_RESIDENT
Hi Chris,

I've attached a patch file for this bug. If anything needs to be changed please let me know!!! Thanks, and I've assigned this bug to myself just to give you a heads up.
Flags: needinfo?(chutten)
Attachment #8690223 - Flags: review?(chutten)
Assignee: nobody → ma.steiman
Status: NEW → ASSIGNED
Comment on attachment 8690223 [details] [diff] [review]
bug1226196-MEMORY_RESIDENT-buckets.diff

Review of attachment 8690223 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me. Thanks for the patch!
Attachment #8690223 - Flags: review?(chutten) → review+
Would you like any help finding something to work on next?
Flags: needinfo?(chutten)
Keywords: checkin-needed
Keywords: checkin-needed
Ack, prematurely added checkin-needed. Fairly certain we'll want an r= in that commit message first :)
I would love help finding something next to work on!

I will update the commit message, should it be r=chutten or what? Thanks!!
Flags: needinfo?(chutten)
r=chutten on the first line so that if anything goes wrong, the sheriffs know who to hunt down :)

Then we should make sure it works. How did you test that the patch worked? A record of any testing you performed would be a helpful comment to include on this bug.
Flags: needinfo?(chutten)
Well I'm not too savvy on testing as I'm a beginner, the only thing I can tell you is it builds and runs cleanly :P is there anything else I should do to test it? Thanks for the help.
Flags: needinfo?(chutten)
I'm glad you asked!

Well, what your patch does is remove and add (or, rename) a histogram from Telemetry, Firefox's metrics system. As with seemingly everything, there's an about page for it: about:telemetry. However, if telemetry isn't turned on, most of the data (including your new histogram) will be missing.

Turning telemetry on in a developer build requires some environment variables to trick the build into thinking it's official. (In general, we don't want developer builds to report metrics. It adds noise to the data) But, temporarily, you'll need it on, so edit your .mozconfig and add:
export MOZILLA_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1

(.mozconfig is the build configuration file located in the root of your gecko source directory. You probably already have one.)

Then you'll need to rebuild: ./mach build

Once that's done we can test. A good test would be to take a look in about:telemetry and make sure that your current data shows a Histogram called MEMORY_RESIDENT_FAST and doesn't show a histogram called MEMORY_RESIDENT. (these MEMORY_* histograms are collected just after start and periodically throughout a session, so they should always have data)
Flags: needinfo?(chutten)
After adding the above to my .mozconfig and building/running the Histogram in about:telemetry is indeed showing `MEMORY_RESIDENT_FAST`! Does that mean I can go ahead and update the patch comment and resubmit?
Flags: needinfo?(chutten)
Yes, please! Feel free to review+ your reupload as the commit message has the appropriate r=. Then, set 'checkin-needed' as a keyword so that the sheriffs will get your patch included in the next merges.

And then I guess you'll be needing a new bug!
Do you like SQL? bug 1226461 has an SQL statement that's just a few steps from readable
Do you like Android Java? bug 1216344 identifies an abstraction layer that doesn't need to exist
Do you like Python? bug 1226381 is about giving more informative log messages

(these and so many more you can find and tailor to your strengths using "Bugs Ahoy": http://www.joshmatthews.net/bugsahoy/?unowned=1&simple=1 )
Flags: needinfo?(chutten)
Attachment #8690223 - Attachment is obsolete: true
Attachment #8690283 - Flags: review+
Keywords: checkin-needed
(In reply to Chris H-C :chutten from comment #10)
> Yes, please! Feel free to review+ your reupload as the commit message has
> the appropriate r=. Then, set 'checkin-needed' as a keyword so that the
> sheriffs will get your patch included in the next merges.

I have done so. Thanks, I will be taking on another bug from the list!
https://hg.mozilla.org/mozilla-central/rev/be19277b423f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: