Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More parallelism + better understandability for snapshot tests #96

Merged
merged 5 commits into from
Sep 25, 2024

Conversation

jaybosamiya-ms
Copy link
Collaborator

This PR builds on #95, separating out the various snapshot tests that were previously merged via inline-crate.

Copy link
Contributor

@parno parno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks useful to me. Out of curiosity, how much speed up do you see from the additional parallelism?

@jaybosamiya-ms
Copy link
Collaborator Author

Depends on the number of cores on the machine; quick test on my laptop changed this from ~30s to ~14s.

I was hoping for greater speedup, given that within ~2s, all the non-snapshot tests have completed, but I guess some of the files in the snapshot tests are fairly slow individually so we are likely not going to get much faster:

        PASS [   8.119s] verusfmt::snapshot-examples verus_snapshot_unchanged__01__vstd__arithmetic__div_mod_rs
        PASS [  10.373s] verusfmt::snapshot-examples ironfleet_snapshot_unchanged__07__delegation_map_v_rs
        PASS [  11.876s] verusfmt::snapshot-examples pagetable_unchanged__06__impl_u__l2_impl_rs

A non-trivial reason for testing being slow now is that verusfmt is run in debug mode during testing.

I guess my other main motivation with this change was to have the snapshots not be dependent on inline-crate, and thus actually be more readable (and eventually we migrate to having an easy way for projects to opt into being on our CI with the kind of automated snapshot pulling that we do for Verus's snapshot)

Base automatically changed from jb-glob-macro to main September 25, 2024 00:05
@jaybosamiya-ms jaybosamiya-ms merged commit 528d373 into main Sep 25, 2024
8 checks passed
@jaybosamiya-ms jaybosamiya-ms deleted the jb-separate-files-snapshots branch September 25, 2024 01:18
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