Comments (6)
Looking at https://doc.rust-lang.org/rustc/instrument-coverage.html#running-the-instrumented-binary-to-generate-raw-coverage-profiling-data it seems like there are modes which consolidate the data into a few files. Notably
%Nm
looks very useful for this use case.
I'm not sure that will fix the problem. If you are using nextest you are already using it.
Lines 214 to 230 in e3dd19f
From experience, my impression is that when there is a disk usage problem, it is easier to just free up disk space than to look for workarounds to reduce disk usage (taiki-e/portable-atomic@de87ecc, taiki-e/workflows@382d344).
from cargo-llvm-cov.
From experience, my impression is that when there is a disk usage problem, it is easier to just free up disk space than to look for workarounds to reduce disk usage
Unfortunately at the rate our test disk space are growing, that is only buying us a little time until we need to start using the larger github runners with more space.
I'm not sure that will fix the problem. If you are using nextest you are already using it.
Interesting - the idea I was thinking of was using {}-%{}m
instead of {}-%p-%{}m
so that as much re-use as possible happens. I wonder if the PID behavior on windows causes more usage than on linux/mac where we didn't hit this problem.
from cargo-llvm-cov.
the idea I was thinking of was using
{}-%{}m
instead of{}-%p-%{}m
so that as much re-use as possible happens.
Ah, interesting.
I've implemented this in llvm-profile-file-name branch. Could you try to see if it works as expected?
cargo install cargo-llvm-cov --git https://github.com/taiki-e/cargo-llvm-cov --branch llvm-profile-file-name
LLVM_PROFILE_FILE_NAME='<name>.profraw' cargo llvm-cov ...
from cargo-llvm-cov.
Nice!
Using the default profile name, running wgpu's 1000 test, test suite on my windows machine results in: 14.3 GB of profraw files.
Using "wgpu-%8n.profraw" as the profile name, I get 26 (264MB) profraw files.
Using "wgpu-%n.profraw" as the profile name, I get 13 (125MB) profraw files. This == the amount of binaries we have in our test suite, meaning it won't scale up as we add more tests.
I built the reports from the various runs and they were completely identical. Additionally, changing the number of allowed profiles didn't seem to affect runtime at all, though we generally have longer running tests (4s each). Recorded on a 20 core machine.
This is a massive win for us, and completely eliminates the problem. I might actually suggest that the nextest default be {}-%Nm
, as this feels like a much better default.
from cargo-llvm-cov.
Just tested with a subset of our tests which are very fast (<0.1s each) and the profile file name setting makes no difference in suite runtime.
from cargo-llvm-cov.
Published in v0.6.2. Thanks for testing this!
I might actually suggest that the nextest default be
{}-%Nm
, as this feels like a much better default.
Yeah, it would be preferable to do so if it would not affect the accuracy.
from cargo-llvm-cov.
Related Issues (20)
- [Proposal] Add support for `wasm-pack test`
- Exclude tag does not work properly on packages with both main.rs and lib.rs HOT 2
- Demangling HOT 4
- Failed to load coverage: *.rmeta The file was not recognized as a valid object file HOT 3
- Code compiled with different #[cfg] flags shows up as different instantiations HOT 6
- [HELP] error: failed to merge profile data: process didn't exit successfully HOT 4
- Allow running individual tests with coverage HOT 2
- `cargo llvm-cov nexttest-archive` does not work with the `--cargo-profile` flag of nextest HOT 1
- Support for fuzzing HOT 1
- List the tests that exercise a function HOT 5
- Line coverage mismatch on trybuild-based proc-macros tests HOT 2
- Coverage for a single package inside a workspace HOT 1
- Error when specifying LLVM tools that are incompatible with LLVM version of rustc (Homebrew LLVM 17.0.6 vs rustc 1.78.0-beta -- LLVM 18.1.2) HOT 6
- Runtime and instrumentation version mismatch HOT 6
- Coverage of #[no_mangle] functions in cdylib is missed HOT 5
- Add issue template (reproduction is very important!)
- Add support for specifying arbitrary `--object`s HOT 1
- No coverage for log macros HOT 1
- Rust 1.80 upcoming warning: unexpected `cfg` condition name: `coverage_nightly` HOT 2
- Performance level expecations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-llvm-cov.