Add compilation benchmark timeout #1652
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements basic timeout handling for compilation benchmarks. I needed to refactor some things and make them asynchronous so that we could easily have a timeout for the whole benchmark (e.g. for all configurations - incr/full/... + opt/debug/...), which I think makes more sense, because we can now say something like "everything for this benchmark cannot take more than X", and attach an error to the whole benchmark, same as we do for compilation errors.
In theory we could also implement timeout on individual compilation level, i.e. that a single configuration (benchmark/scenario/profile) cannot take more than X.
I chose the timeout value to be 30 minutes, which should more than enough to find deadlocks or endless compilations. I also tried to remove passing of runtime to
bench_compile
, but it was beyond my lifetime-fu.Fixes: #1578