Closed Bug 1251076 Opened 4 years ago Closed 4 years ago

Record ccache stats in build telemetry data

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: dminor, Assigned: dminor)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Using ccache can have a big effect on build times. We should capture whether ccache is enabled and the relevant stats in the build telemetry data.
Using ccache can have a big impact on compile times but we don't currently
capture ccache statistics.

Review commit: https://reviewboard.mozilla.org/r/36667/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/36667/
Attachment #8723675 - Flags: review?(gps)
Assignee: nobody → dminor
Status: NEW → ASSIGNED
Comment on attachment 8723675 [details]
MozReview Request: Bug 1251076 - Record ccache stats in build telemetry data r?gps

https://reviewboard.mozilla.org/r/36667/#review33211

We should also capture MOZ_USING_CCACHE from substs.
Attachment #8723675 - Flags: review?(gps)
https://reviewboard.mozilla.org/r/36667/#review33211

And should make ccache stats conditional on ccache being enabled.
Attachment #8723675 - Flags: review?(gps)
Comment on attachment 8723675 [details]
MozReview Request: Bug 1251076 - Record ccache stats in build telemetry data r?gps

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/36667/diff/1-2/
Comment on attachment 8723675 [details]
MozReview Request: Bug 1251076 - Record ccache stats in build telemetry data r?gps

https://reviewboard.mozilla.org/r/36667/#review33321

::: python/mozbuild/mozbuild/mach_commands.py:517
(Diff revision 2)
> +                for key in [key[0] for key in ccache_end.STATS_KEYS]:

We should be using ccache_diff, which is assigned above. We record ccache stats at beginning of build then generate a delta against at end of build. These deltas are more useful than the raw values. Although the __sub__ implementation of the ccache class does preserve some absolute values like cache capacity.
Attachment #8723675 - Flags: review?(gps)
Comment on attachment 8723675 [details]
MozReview Request: Bug 1251076 - Record ccache stats in build telemetry data r?gps

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/36667/diff/2-3/
Attachment #8723675 - Flags: review?(gps)
Comment on attachment 8723675 [details]
MozReview Request: Bug 1251076 - Record ccache stats in build telemetry data r?gps

https://reviewboard.mozilla.org/r/36667/#review33821
Attachment #8723675 - Flags: review?(gps) → review+
Comment on attachment 8723675 [details]
MozReview Request: Bug 1251076 - Record ccache stats in build telemetry data r?gps

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/36667/diff/3-4/
https://hg.mozilla.org/mozilla-central/rev/51e6f2f2307b
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.