Closed Bug 1355961 Opened 3 years ago Closed 3 years ago

Include some sccache stats in build_metrics

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: ted, Assigned: ted)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I'd like to get some stats out of sccache into Perfherder. As a first cut I'm adding cache hit rate, cache write errors, and non-cacheable requests (compiler invocations that sccache can't handle). This should let us monitor some things that will hamper build times.
Depends on: 1354048
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #2)
> https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=33586777235fbaddf2b5c2e6885cc84f50c736cf

That didn't work. I think I'm putting the stats JSON in the wrong place.
Comment on attachment 8857620 [details]
bug 1355961 - add some sccache stats to build_metrics.

https://reviewboard.mozilla.org/r/129580/#review132210

The only potential issue I see with this is what happens in case of failure loading the JSON file. If that raises an exception, that could fail the build. I like failing fast. But if there are any cases where the stats file isn't produced, this could bite us.
Attachment #8857620 - Flags: review?(gps) → review+
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #3)
> That didn't work. I think I'm putting the stats JSON in the wrong place.

Oh, hah! In Makefile.in I wrote "sccache-stats.json", but in buildbase.py I wrote "sccache_stats.json".
OK, that's better:
    sccache cache_write_errors summary opt taskcluster-m4.4xlarge: 0
    sccache hit rate summary opt taskcluster-m4.4xlarge: 1
    sccache requests_not_cacheable summary opt taskcluster-m4.4xlarge: 49


    sccache cache_write_errors summary debug taskcluster-m4.4xlarge: 2
    sccache hit rate summary debug taskcluster-m4.4xlarge: 1
    sccache requests_not_cacheable summary debug taskcluster-m4.4xlarge: 49
https://hg.mozilla.org/mozilla-central/rev/b5552791f6c8
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Blocks: 1359880
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.