Closed Bug 1810802 Opened 1 year ago Closed 11 months ago

Consider reverting bug 1799751's custom treatment of labeled metrics with more than eight labels

Categories

(Toolkit :: Telemetry, task, P2)

task

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: chutten, Assigned: chutten)

References

Details

Attachments

(1 file)

When we upgraded to Glean v52.0.0 in bug 1805427 we introduced some codegen to take advantage of Glean's new use of Cow<str> for static labels.

However, bug 1799751 bypasses that codegen for labeled_* metrics with eight or more static labels to instead use a single long string and an array of lengths.

This bug is about trying both approaches and comparing their sizes and other relevant characteristics, evaluating whether we should remove bug 1799751's custom code and allow the Cows to herd in, and, if we decide to do so, making that change.

( https://bugzilla.mozilla.org/show_bug.cgi?id=1776386#c13 might be helpful for figuring out how to break down a Mac dmg installer's sizes... though really ls -al and/or perfherder might be all we need. )

Current:
-rwxrwxr-x 1 chutten chutten 2824611328 Apr 19 12:56 libxul.so

After Reverting bug 1799751:
-rwxrwxr-x 1 chutten chutten 2824325872 Apr 19 13:00 libxul.so

Or, a reduction of about 280kb.

The original complaint was about build speeds. To try and stress it similarly to bug 1790872 I added six labeled_counter metrics with about 3.6k labels apiece. Then I timed incremental ./mach builds with and without the new metrics. The numbers are all very close together, with the CowString approach being, if anything, slightly faster.

So I think we're good to go.

Also fix some (deliberate, not a problem) in-loop redefinitions in rust.py to
appease lint.

Pushed by chutten@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b109fa8d1c86
Use cowstrings even for labeled metrics with more than eight labels r=perry.mcmanis
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: