Skip to content

Add compilation benchmark timeout #1652

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

Merged
merged 4 commits into from
Jul 17, 2023
Merged

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Jul 13, 2023

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

@Kobzol Kobzol requested a review from Mark-Simulacrum July 13, 2023 14:08
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good to me.

@Kobzol Kobzol enabled auto-merge July 17, 2023 07:07
@Kobzol Kobzol merged commit 273e131 into rust-lang:master Jul 17, 2023
@Kobzol Kobzol deleted the timeout-async branch July 17, 2023 07:18
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

Successfully merging this pull request may close these issues.

Add timeout to benchmarking
2 participants