sixty-north / cosmic-ray

Mutation testing for Python
MIT License
556 stars 54 forks source link

cr-filter-git: mark all as skipped in single transaction #541

Closed tomato42 closed 8 months ago

tomato42 commented 8 months ago

Because every skipped transaction is committed individually to the DB, it takes extensive amount of time for a database with few tens of thousands of mutants:

without the patch:

18.08user 3.50system 1:12.85elapsed 29%CPU (0avgtext+0avgdata 116220maxresident)k
0inputs+1014816outputs (0major+27993minor)pagefaults 0swaps

with this patch:

10.33user 0.18system 0:10.55elapsed 99%CPU (0avgtext+0avgdata 116008maxresident)k
0inputs+3176outputs (0major+27989minor)pagefaults 0swaps

And this is with a fairly fast NVME SSD, slower disk storage will take extensively more time.

abingham commented 8 months ago

This sounds great. When I'm back from vacation I'll look it over and likely merge it right in. Thanks!

Sent from ProtonMail mobile

-------- Original Message -------- On Dec 29, 2023, 12:35, Hubert Kario wrote:

Because every skipped transaction is committed individually to the DB, it takes extensive amount of time for a database with few tens of thousands of mutants:

without the patch:

18.08user 3.50system 1:12.85elapsed 29%CPU (0avgtext+0avgdata 116220maxresident)k 0inputs+1014816outputs (0major+27993minor)pagefaults 0swaps

with this patch:

10.33user 0.18system 0:10.55elapsed 99%CPU (0avgtext+0avgdata 116008maxresident)k 0inputs+3176outputs (0major+27989minor)pagefaults 0swaps

And this is with a fairly fast NVME SSD, slower disk storage will take extensively more time.


You can view, comment on, or merge this pull request online at:

https://github.com/sixty-north/cosmic-ray/pull/541

Commit Summary

  • 9ae3554 cr-filter-git: mark all as skipped in single transaction

File Changes

(2 files)

Patch Links:

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>