Uh oh!
There was an error while loading. Please reload this page.
Speedup integration tests - #15
Conversation
pflanze
commented
Aug 11, 2026
PS. some numbers about the success follow--running the integration tests is now 10-20 times faster. The bottleneck are now the other parts of the test suite (especially building the code for the unit tests); but there is room for adding more test files now, should we need them, also, thanks to this optimization the memory checker is now very cheap, which means we'll be able to make it the default once we figure out what to do on macOS. |
pflanze
commented
Aug 11, 2026
On my laptop (in the VM),
This indicates that the bottleneck is not the speed of
to This shows that the leak sanitizer costs quite a bit of time per process, and now that cost is amortized across a whole integration test set. (I.e. it is basically for free now.) |
pflanze
commented
Aug 12, 2026
Ah, CI is not faster than before because |
yusufraji
commented
Aug 12, 2026
At the time of writing, AddressSanitizer isn't supported on aarch64-apple-darwin (rust-lang/rust#98473) |
pflanze
commented
Aug 12, 2026
Yes, and while the problem appears to be tiny (false positive reports) and apparently can be fixed locally by configuring ignores, that will be a bit of a pain. And not having to use +nightly is better, too. jemalloc does add a dependency, though, but it should be worth getting to know (jemalloc is a good allocator for parallel workloads; it won't matter here because split-patch uses regions (bumpalo) for allocation, thus hits the global memory allocator only rarely, but it will be useful in other apps). |
Otherwise `SplitOptions` cannot be constructed nicely from outside the crate.
- Move universal patch splitting functionality to `core.rs` - Create bin/test-split-patches-in-dir.rs: - Carries out the loops from the previous shell script - Runs the `split_patch` function directly without starting a new process - Instead of chdir uses `path_remove_common_lead` to remove the beginning of the printed output paths - Uses `rayon` for parallelization - Prints any errors and a status line with error counts in the end - Exits at the very end if the `split_patch` function fails at any point - test/run-test-for-input-dir: - Since split-patch compilation options cannot be determined by its path (`SPLIT_PATCH` env var) anymore, compile the whole `test-split-patches-in-dir` binary accordingly, and do that via a new `OUR_CARGO_BUILD_FLAGS` env var (`OUR_CARGO_FLAGS` is also used here but can't take on the "--release" flag as cargo does not accept it there). Co-authored-by: Christian Jaeger <ch@christianjaeger.ch>
It is only the SplitOptions that are actually relevant for shared use of the lib crate. This was already wrong in my commit "split-patch.rs: split off argument handling, abstract implied option" (d95a465). Also rename `args.rs` to `split_options.rs` accordingly.
…presentation This solves/bypasses the issue with wanting SplitOptions available as "plain old data" (all fields pub) for instantiation but also some of them private to enforce calling methods for access. The only way to have a plain old data struct and then prohibit read access to a field would be via a macro, something like `#[derive(Plain)]` that would make a second struct with all fields pub and a From implementation. I couldn't find any, and it feels hacky enough to avoid. Instead, write the two structs manually, and while at it, take the chance to also make a better data model where read access to all fields is fine. One (`SplitArgs`) is for clap, the derived one (`SplitOptions`) for the actual data used. (It does appear that the idea of using clap to directly instantiate the internal app config falls short somewhat regularly.)
Speedup integration tests with rayon.
The original
split-patches-in-dirshell script used for testing has been rewritten in Rust (test-split-patches-in-dir.rs). This allows us to run things in parallel with rayon.Closes#12