Skip to content

Fix duration attributed to cache writes in the log - #1495

Merged
sylvestre merged 1 commit into
mozilla:mainfrom
glandium:duration
Dec 20, 2022
Merged

sylvestre merged 1 commit into
mozilla:mainfrom
glandium:duration

Conversation

@glandium

Copy link
Copy Markdown
Collaborator

As it is now, what ends up logged as being the time for cache writes is the compilation duration exclusively, which is also logged on its own.

For extra granularity, we also log the time spent creating the cache artifact.

While here, also log the compilation durations in cases where the result is not cached.

As it is now, what ends up logged as being the time for cache writes is
the compilation duration exclusively, which is also logged on its own.

For extra granularity, we also log the time spent creating the cache
artifact.

While here, also log the compilation durations in cases where the result
is not cached.
@glandium

Copy link
Copy Markdown
Collaborator Author

Note this still leaves the cache artifact creation unaccounted for in --show-stats.

@sylvestre
sylvestre merged commit c0c9bc0 into mozilla:main Dec 20, 2022
@sylvestre

Copy link
Copy Markdown
Collaborator

I tried to rebuild Firefox with the patch and here is the results:
https://firefoxci.taskcluster-artifacts.net/THQ6jVgKSf-gL9XiYaxKSQ/0/public/build/sccache.log

Example:
[2022-12-20T10:01:43Z DEBUG sccache::compiler::compiler] [jsrust]: Cache miss in 0.000 s
[2022-12-20T10:01:43Z DEBUG sccache::compiler::compiler] [jsrust]: Compiling locally
[2022-12-20T10:02:05Z DEBUG sccache::compiler::compiler] [jsrust]: Compiled in 21.433 s, storing in cache
[2022-12-20T10:02:05Z DEBUG sccache::compiler::compiler] [jsrust]: Created cache artifact in 0.135 s
[2022-12-20T10:02:05Z DEBUG sccache::compiler::compiler] [jsrust]: Stored in cache successfully!
[2022-12-20T10:02:05Z DEBUG sccache::server] [jsrust]: Cache write finished in 0.117 s

cc @indygreg

tottoto added a commit to tottoto/sccache that referenced this pull request Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants