Skip to content

Shorten test runs using LPT algorithmn #77

@eraserhd

Description

@eraserhd

Since running test in parallel is exactly the "Multiprocessor scheduling problem", sorting the jobs by last known run time, then running longest first, should shorten the test time significantly (and also make run time more stable).

Proposal: We add a defonce atom with a map from test symbol to last known runtime in milliseconds. Sort the tests by this with some arbitrary default value if missing before assigning to threads, and record run time to the atom as tests complete. The first test run will effectively work the same way as it does today, but subsequent test runs should complete earlier. As the atom is just a heuristic, it is OK for it to be out of date.

I'm willing to do the work here, but does this sound good?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions