Skip to content

Gc.full_major is invoked after each test #8

Open
@monadius

Description

@monadius

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions