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

Add a util method to warm up EventLoopGroup #3610

Merged
merged 2 commits into from
Jun 14, 2021
Merged

Conversation

kezhenxu94
Copy link
Contributor

@kezhenxu94 kezhenxu94 commented Jun 5, 2021

Motivation:

Netty's event loop threads are spawned lazily, i.e. they are created
on the first task is scheduled on. A user sometimes wants to ensure
the event loop threads are started when the server starts up.

Modifications:

  • Add EventLoopGroups.warmUp()

Result:

Copy link
Member

@trustin trustin left a comment

Choose a reason for hiding this comment

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

@trustin trustin added this to the 1.9.0 milestone Jun 5, 2021
@codecov
Copy link

codecov bot commented Jun 5, 2021

Codecov Report

Merging #3610 (22ca9d8) into master (c47d84e) will decrease coverage by 0.05%.
The diff coverage is 25.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3610      +/-   ##
============================================
- Coverage     73.89%   73.83%   -0.06%     
- Complexity    14367    14378      +11     
============================================
  Files          1260     1263       +3     
  Lines         54819    54878      +59     
  Branches       7021     7021              
============================================
+ Hits          40507    40521      +14     
- Misses        10732    10794      +62     
+ Partials       3580     3563      -17     
Impacted Files Coverage Δ
.../linecorp/armeria/common/util/EventLoopGroups.java 42.85% <25.00%> (-2.31%) ⬇️
...rp/armeria/server/tomcat/ManagedTomcatService.java 50.84% <0.00%> (-22.04%) ⬇️
...nternal/server/tomcat/Tomcat90ProtocolHandler.java 50.00% <0.00%> (-15.39%) ⬇️
...rp/armeria/server/tomcat/TomcatServiceBuilder.java 36.36% <0.00%> (-10.91%) ⬇️
...om/linecorp/armeria/client/HttpSessionHandler.java 73.14% <0.00%> (-8.58%) ⬇️
.../com/linecorp/armeria/server/docs/ServiceInfo.java 78.94% <0.00%> (-1.76%) ⬇️
.../com/linecorp/armeria/server/RoutingPredicate.java 70.96% <0.00%> (-1.62%) ⬇️
...m/linecorp/armeria/common/ClientCookieDecoder.java 91.66% <0.00%> (-1.05%) ⬇️
...a/com/linecorp/armeria/client/HttpChannelPool.java 78.41% <0.00%> (-0.28%) ⬇️
.../java/com/linecorp/armeria/common/CommonPools.java 100.00% <0.00%> (ø)
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c47d84e...22ca9d8. Read the comment docs.

Copy link
Contributor

@ikhoon ikhoon left a comment

Choose a reason for hiding this comment

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

Thanks! @kezhenxu94

Copy link
Contributor

@minwoox minwoox left a comment

Choose a reason for hiding this comment

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

Thanks!

@trustin trustin merged commit 42bd0d7 into line:master Jun 14, 2021
@kezhenxu94 kezhenxu94 deleted the issue/3363 branch June 14, 2021 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EventLoops.warmUp(EventLoopGroup)
4 participants