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

Gc.full_major is invoked after each test #8

Open
monadius opened this issue May 11, 2023 · 0 comments
Open

Gc.full_major is invoked after each test #8

monadius opened this issue May 11, 2023 · 0 comments

Comments

@monadius
Copy link
Collaborator

The new OUnit test framework invokes Gc.full_major () after each test when the function OUnit.perform_test is used to call tests (see this line of OUnitRunner and this line of OUnit where conf is created). This negatively impacts performance if huge data structures are created outside of test functions (see this kata: https://www.codewars.com/kata/60cc93db4ab0ae0026761232/ocaml).

It is possible to turn off the garbage collection step by setting the property OUnitRunner.run_gc_full_major to false. But I don't see any way to change the default configuration when OUnit.perform_test is used. It seems to be necessary to call OUnitCore.perform_test directly with an appropriate configuration.

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

No branches or pull requests

1 participant