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

Put remainder of packed tests into last bundle when using estimated times #429

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ksuther
Copy link
Contributor

@ksuther ksuther commented Mar 28, 2020

When using time estimates, the remainder tests get put into a new bundle when exceeding the optimal execution time. For example, if you set numSims to 5, you end up with 5 fully packed bundles and 1 one smaller leftover bundle.

This means you end up running 6 simulators even though numSims is 5. The extra time waiting for the 6th simulator to start takes a while and at least in my tests takes longer than simply appending the remainder to the final bundle.

@ravimandala
Copy link
Contributor

@ksuther, thanks for the PR. It would be great if you can add a test for this.

@@ -146,6 +146,10 @@ @implementation BPPacker
if (splitExecTime + [testTimes[test] doubleValue] <= optimalBundleTime) {
splitExecTime += [testTimes[test] doubleValue];
} else {
if ([bundles count] == [[config numSims] integerValue] - 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add tests for this change.

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.

2 participants