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

Speedup test executions & Save the planet #23564

Merged
merged 1 commit into from
Feb 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,11 @@ private static void doServerStart(Vertx vertx, HttpBuildTimeConfig httpBuildTime
}

int eventLoopCount = eventLoops.get();
int ioThreads;
final int ioThreads;
if (httpConfiguration.ioThreads.isPresent()) {
ioThreads = Math.min(httpConfiguration.ioThreads.getAsInt(), eventLoopCount);
} else if (launchMode.isDevOrTest()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure you want to do this in dev-mode as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, why not?

Copy link
Contributor

Choose a reason for hiding this comment

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

Because it's pretty significant difference between dev mode and prod mode

Copy link
Member Author

Choose a reason for hiding this comment

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

I realize I might be missing something, but I don't expect people to perform load tests in dev mode.

On the other hand, it keeps resource usage under control when running interactive exploration sessions, possibly having multiple Quarkus based microservices running.

Other than performance aspects, I don't think it would have semantic changes that impact developer's ability to explore things?

( other than facilitating debugging by not having breakpoints hit by 100 threads )

But yeah sure I get that it's debatable, no rush. That's also why I pinged Stuart too, so at least he's aware.

We can totally start doing it for tests only.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I understand the rationale completely. It's always a delicate balance...

I am not totally against doing this in dev-mode, I guess I am +0 :)

ioThreads = Math.min(2, eventLoopCount); //Don't start ~100 threads to run a couple unit tests
} else {
ioThreads = eventLoopCount;
}
Expand Down