Skip to content

Direct mode stats - #2844

Merged
sylvestre merged 5 commits into
mozilla:mainfrom
badumbatish:direct_mode_stats
Sep 16, 2026
Merged

sylvestre merged 5 commits into
mozilla:mainfrom
badumbatish:direct_mode_stats

Conversation

@badumbatish

@badumbatish badumbatish commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Add statistics for direct mode.

This allows downstream users to inspect how efficient the direct mode caching is. My downstream work would also benefit from some form of direct mode statistics for our testing

See the new form of show-stats

Compile requests                      3
Compile requests executed             0
Cache hits                            0
Direct cache hits                     0
Cache misses                          0
Direct cache hits                     0
Cache hits rate                       -
Direct cache hits rate                -
Cache timeouts                        0
Cache read errors                     0
Forced recaches                       0
Cache write errors                    0
Cache errors                          0
Compilations                          0
Compilation failures                  0
Non-cacheable compilations            0
Non-cacheable calls                   0
Non-compilation calls                 3
Unsupported compiler calls            0
Average cache write               0.000 s
Average compiler                  0.000 s
Average cache read hit            0.000 s
Failed distributed compilations       0
Cache location                  Local disk: "/home/jjasmine/.cache/sccache"
Base directories                (none)
Use direct/preprocessor mode?   yes
Version (client)                0.17.0
Max cache size                       10 GiB

No AI is used for this PR

@codecov-commenter

codecov-commenter commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.87%. Comparing base (01c35e6) to head (4b3a343).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler/compiler.rs 85.71% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2844      +/-   ##
==========================================
- Coverage   76.32%   72.87%   -3.45%     
==========================================
  Files          72       72              
  Lines       40180    40187       +7     
==========================================
- Hits        30669    29288    -1381     
- Misses       9511    10899    +1388     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/compiler/c.rs Outdated
@sylvestre

Copy link
Copy Markdown
Collaborator

and please fix

error: all variants have the same prefix: `Direct`
    --> src/compiler/compiler.rs:1207:1
     |
1207 | / pub enum CacheType {
1208 | |     DirectHit,
1209 | |     DirectMiss,
1210 | |     DirectNotAttempted,
1211 | | }
     | |_^
     |


See the following:
```
sccache on  direct_mode_stats is 📦 v0.17.0 via 🦀 v1.97.1 via ❄️  impure (sccache-dev-env) took 2s
➜ ./target/debug/sccache --show-stats
[2026-09-10 15:58:34]
Compile requests                      3
Compile requests executed             0
Cache hits                            0
Direct cache hits                     0
Cache misses                          0
Direct cache hits                     0
Cache hits rate                       -
Direct cache hits rate                -
Cache timeouts                        0
Cache read errors                     0
Forced recaches                       0
Cache write errors                    0
Cache errors                          0
Compilations                          0
Compilation failures                  0
Non-cacheable compilations            0
Non-cacheable calls                   0
Non-compilation calls                 3
Unsupported compiler calls            0
Average cache write               0.000 s
Average compiler                  0.000 s
Average cache read hit            0.000 s
Failed distributed compilations       0
Cache location                  Local disk: "/home/jjasmine/.cache/sccache"
Base directories                (none)
Use direct/preprocessor mode?   yes
Version (client)                0.17.0
Max cache size                       10 GiB
```
@sylvestre
sylvestre merged commit 18dd633 into mozilla:main Sep 16, 2026
46 of 47 checks passed
@sylvestre

Copy link
Copy Markdown
Collaborator

:(
i didn't mean to merge it
esp as rustfmt is failing

@sylvestre

Copy link
Copy Markdown
Collaborator

please reopen

@sylvestre

Copy link
Copy Markdown
Collaborator

or create a new PR
sorry about that

@badumbatish

badumbatish commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

hi @sylvestre, no worries. I've reopened #2860 now

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.

3 participants